Skip to content
Laviyx Learn

Try

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.

Advanced 8–12 weeks 2–4 studentsUpdated

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. 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. 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. 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. 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. 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. 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.

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

  1. Abstract: the problem, your solution and the result in one paragraph.
  2. Introduction and problem statement: who has the problem and why it matters.
  3. Requirements: the features (functional) and qualities such as speed and security (non-functional).
  4. Design: architecture diagram, database tables or data flow, and screen layouts.
  5. Implementation: the main modules and the most interesting code, explained.
  6. Testing: the test cases you ran, with inputs, expected and actual results.
  7. Results: screenshots or numbers that show the project working.
  8. 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.

All project ideas →