Final-year project
College Help Chatbot with RAG (Retrieval-Augmented Generation)
An AI assistant that answers students' questions from the college's own documents — fee notices, the academic calendar, rules and syllabus — using embeddings, a vector search and an LLM, with sources for every answer.
PythonFastAPIsentence-transformersFAISS or ChromaAn LLM APISimple web chat UI
The problem
Students ask the same questions again and again: When is the fee due? What is the attendance rule? When do exams start? The answers are buried in PDFs and notices. A plain chatbot would make up answers. A RAG chatbot first finds the right passages in the college's own documents and then answers only from them, showing where each answer came from.
Features to build
- Upload documents (PDF and text) and split them into overlapping chunks
- Turn each chunk into an embedding and store it in a vector index
- For each question, retrieve the most similar chunks and send only those to the LLM
- Answers cite their sources, with document name and page
- Say 'I could not find this in the college documents' instead of guessing when nothing relevant is found
- A chat web page, with the conversation's previous question used for follow-ups
- An evaluation set of at least 50 real questions with expected answers, and a score for each version
- Admin page to add or remove documents and rebuild the index
Build plan
- 1
Collect and clean documents
Gather public college documents with permission. Extract text from PDFs, keep page numbers, and remove headers and footers that repeat on every page.
- 2
Chunk and embed
Split text into chunks of a few hundred words with some overlap, embed each with a sentence-transformers model, and store them in FAISS or Chroma with their source details.
- 3
Retrieve
Embed the question, find the top 4 to 5 chunks by cosine similarity, and drop any below a similarity threshold you choose from tests.
- 4
Generate the answer
Send the chunks and the question to the LLM with instructions to answer only from the passages, cite them, and say when the answer is not there.
- 5
Evaluate
Run your question set and measure retrieval (was the right chunk retrieved?) and answer quality. Change chunk size, overlap and top-k, and compare.
- 6
Serve it
Wrap everything in a FastAPI service with a chat page, keep the API key in an environment variable, and log questions that found no answer.
Learn these first
Each part of the project is taught in one of these free lessons.
- Embeddings and Semantic Search Explained (with Python)
- Using LLM APIs in Python: Claude API Beginner Guide
- Text Classification in Python: Bag of Words and TF-IDF
- Serving a Machine Learning Model with FastAPI
- MLOps Basics: Monitoring Models and Detecting Data Drift
- Python File Handling: Read, Write and Append Files (with open and pathlib)
- Working With APIs in Python: requests, JSON, Parameters and Errors
- Python JSON: Read, Write and Parse JSON Data
Make it stand out
- Answers in Telugu or Hindi
- Re-rank retrieved chunks with a cross-encoder for better accuracy
- Hybrid search: combine keyword (BM25) and embedding search
- A WhatsApp or Telegram version of the bot
Viva and interview questions
Try to answer each one aloud before you open it.
What is retrieval-augmented generation?
A way to answer questions from your own documents: first retrieve the passages most related to the question, then give only those passages to a language model and ask it to answer from them. The model's answer is grounded in real text that can be cited.
Why use RAG instead of fine-tuning a model on the documents?
Fine-tuning is costly and does not reliably make a model remember exact facts like dates and fees. With RAG, updating a document updates the answers immediately, and every answer can show its source.
How does the chunk size affect results?
Small chunks are precise but may cut an answer in half. Large chunks keep context but bring in unrelated text and use more of the model's context window. Overlap helps keep sentences that cross a boundary. The best size is found by testing on real questions.
How do you reduce hallucinations?
Tell the model to answer only from the given passages and cite them, refuse when retrieval finds nothing above the similarity threshold, keep the temperature low, and check answers against an evaluation set.
What is cosine similarity?
It measures the angle between two vectors: 1 means they point the same way, 0 means unrelated. For embeddings, a higher cosine similarity means the texts have more similar meaning.
What to put in your project report
- Abstract: the problem, your solution and the result in one paragraph.
- Introduction and problem statement: who has the problem and why it matters.
- Requirements: the features (functional) and qualities such as speed and security (non-functional).
- Design: architecture diagram, database tables or data flow, and screen layouts.
- Implementation: the main modules and the most interesting code, explained.
- Testing: the test cases you ran, with inputs, expected and actual results.
- Results: screenshots or numbers that show the project working.
- Conclusion and future scope: what you achieved and what you would add next.
Your college may give its own format. Follow that first, and use this list to check nothing is missing.
More project ideas
- Password Generator and Strength Checker in PythonMini project
- Student Result Management System in PythonMini project
- Unbeatable Tic-Tac-Toe with MinimaxMini project