Building a Timestamp-Aware AI Learning Assistant for Video Lectures
our team worked on an AI-powered learning assistant designed specifically for video-based education. The idea came from a simple problem: students often use AI while watching lectures, but a normal AI assistant can answer using information from parts of the lecture that the student has not even watched yet. That can break the learning flow. So we built BuildVerse AI Learning Assistant, a system that understands not only the lecture content, but also the student’s current progress in the video. The Problem Imagine a student is watching a 60-minute lecture and has currently reached minute 20. They ask an AI assistant a question. A normal Retrieval-Augmented Generation system may search the entire lecture transcript and retrieve an answer from minute 45. Technically, the answer may be correct. But from a learning perspective, the student has just received information that has not been introduced yet. We wanted to prevent that. Our Solution Our system uses a timestamp-aware RAG pipeline. Every lecture transcript is divided into chunks and each chunk contains its corresponding start and end timestamps. When a student asks a question, the system also receives their current video timestamp. The retrieval system is then restricted to content that has already been watched. The basic flow is: Video Lecture → Transcript → Timestamped Chunks → Embeddings → Vector Database → Timestamp Filter → RAG → AI Response So if the student has watched only the first 20 minutes, the AI can retrieve information only from those first 20 minutes. The Timestamp Guard The main feature of our project is what we call the Timestamp Guard. Before a retrieved chunk is sent to the language model, we check: Chunk Timestamp ≤ Current Video Timestamp If the content appears later in the lecture, it is excluded from the response. This helps prevent: Future-content spoilers Out-of-sequence explanations Unnecessary information overload Answers that are not aligned with the learner’s progress If the answer has not been covered yet, the system can tell the student that the topic appears later in the lecture instead of revealing it immediately. How the System Works 1. Lecture Processing The video content is converted into text using transcription. Supporting learning material such as PDFs and presentations can also be processed. 2. Chunking The transcript is divided into smaller sections. Each chunk stores metadata such as: Video ID Start timestamp End timestamp Text content Source information 3. Embeddings We generate embeddings using Sentence Transformers. These embeddings represent the meaning of each transcript chunk. 4. Vector Search The embeddings are stored inside Qdrant, which allows us to perform semantic search when the student asks a question. 5. Timestamp Filtering Before sending retrieved content to the LLM, the system filters out any chunks that occur after the student’s current position in the lecture. 6. AI Response The remaining context is provided to Gemini, which generates a grounded response based only on the allowed lecture content. Additional Features The prototype also includes: Lecture-based question answering Timestamp-aware retrieval Video timestamp citations PDF/page citations Future-content detection Out-of-scope question detection Retrieval-Augmented Generation The goal is to make AI act as a learning companion rather than simply becoming an answer generator. Tech Stack For the frontend, we used: React Vite Tailwind CSS For the backend: FastAPI Python For the AI and retrieval pipeline: Gemini Sentence Transformers Qdrant RAG Whisper For document processing: PyMuPDF python-pptx Why Normal RAG Was Not Enough Traditional RAG retrieves information based mainly on semantic similarity. For our use case, relevance alone was not enough. A chunk from minute 50 might be highly relevant to a question asked at minute 15. That is why we added another condition: Semantic relevance + Temporal eligibility Only content satisfying both conditions is allowed into the final context. This small change makes the system much more suitable for structured learning environments. What We Learned One of the most interesting lessons from this project was that building useful AI does not always mean giving the maximum amount of information. Sometimes the AI needs constraints. In education, knowing when not to answer can be just as important as knowing the correct answer. By combining RAG with timestamp-based filtering, we tried to create an AI assistant that respects the student’s actual learning journey. Future Scope The project can be extended further with: Automatic quiz checkpoints Concept mastery tracking Personalized revision questions Student progress analytics Adaptive learning paths Weak-topic detection Lecture summaries up to the current timestamp A future version could automatically pause the lecture at important checkpoints and ask short questions before allowing the student to continue. Conclusion BuildVerse AI Learning Assistant was our attempt to make AI-assisted education more context-aware and learner-focused. Instead of allowing the AI to access the entire lecture blindly, we restrict it according to what the student has already watched. The key idea is simple: AI should follow the learner’s progress, not jump ahead of it. Project Repository https://github.com/codewith-sneha/HackWithDelhiHackathon
This is a summary aggregated from Dev.to. Read the complete article on the original site:
Read full article at Dev.to