Day 3:Embedding the "Ask the AI Mentor" RAG Chatbot
Battle-tested daily lesson note • 100% runnable code, interview Q&A, test suite & interactive quiz
Day 3: Embedding the "Ask the AI Mentor" RAG Chatbot
1. Executive Overview & Product Vision
A static course website is passive; an interactive learning platform is an active, conversational mentor. By embedding a floating "Ask the AI Mentor" widget powered by our Hybrid RAG Retrieval Engine (Month 3) and Streaming Microservice (Month 5), visitors to your website can ask technical questions:
"What is the mathematical difference between LoRA and QLoRA?" "How does vLLM's PagedAttention solve KV cache fragmentation?" "Which week covers Model Context Protocol (MCP) servers?"
The AI Mentor answers with grounded explanations, code examples, and direct clickable citations to the exact curriculum day and source code file!
2. Technical Architecture: Grounded Curriculum Index
- Deterministic Indexing:
- The knowledge base indexes all 168 daily modules: week title, daily topic, theoretical equations, and code summaries.
- Hybrid Retrieval:
- Combines BM25 lexical token matching with dense vector semantics, ensuring exact keyword queries (e.g.,
LoRALinear,NF4,Q4_K_M) match perfectly alongside conceptual queries.
- Combines BM25 lexical token matching with dense vector semantics, ensuring exact keyword queries (e.g.,
- Citation Guarantee:
- Every claim in the synthesized response is mapped to an authoritative file path in the repository.
In Simple English: Grounded "Ask the AI Mentor" Search Assistant
Adding a helpful mentor chatbot onto your course website without hallucinations follows 3 golden steps:
- Chunk every lesson by section (
h1/h2) tagged withurl_slug&day_id. - Retrieve Top 3 lesson sections with Hybrid BM25 + Vector Search.
- Force inline clickable citations (
[Week 7 Day 1](/ai/roadmap/w07-d01)) so students click straight to the exact chapter!