LLM & RAG · 2026
AI Study Assistant (RAG)
Grounded Q&A over study material using FastAPI, LangChain, FAISS, Hugging Face embeddings and Mistral AI.
Model
- Generation: Mistral with a study-focused prompt (definitions, step-by-step explanations)
- Embeddings: Hugging Face sentence embeddings for semantic retrieval
- Index: flat FAISS index rebuilt on corpus change
Dataset
Study notes and course material uploaded as text/PDF — chunked, embedded and indexed in FAISS.
Results & metrics
- Index
- FAISS flat search
- Grounding
- answers restricted to notes
- Latency
- sub-second retrieval
Deployment steps
- 1Load study material and build the FAISS index at startup
- 2Expose a Q&A endpoint with FastAPI
- 3Retrieve top-k chunks, pass to Mistral with citations
- 4Optional Docker packaging for local runs
Tech stack
- FastAPI
- LangChain
- FAISS
- Hugging Face
- Mistral