Conversational College AI: Hybrid RAG System for Campus Query Resolution
Build a campus chatbot that answers student questions from notices and rules, with sources.
About this internship
Knowledge Base Construction & Multimodal Ingestion
- Campus Data Aggregation: Gathering messy institutional data across different formats—including academic handbooks (PDFs), course syllabi, fee structures, holiday calendars, and hostel regulatory documents.
- Visual Layout Parsing: Using tools like LlamaParse, PyMuPDF, or Unstructured to accurately extract complex campus tables (like semester fee slabs or grade conversion matrices) without losing their formatting.
- Dynamic Data Scraping: Setting up lightweight scripts or APIs to pull fast-changing information directly from the college website, such as active event notices, placement data, or daily hostel announcements.
Hybrid Search & Vector Database Engineering
- Chunking & Embedding Generation: Splitting long college PDFs into optimized chunks and converting them into vector embeddings using models like OpenAI text-embeddings or Hugging Face open-source models (
bge-large). - Hybrid Retrieval Engine Setup: Combining two distinct search methods in a vector database (like Pinecone, ChromaDB, or Qdrant):
- Semantic Search: To catch the user's intent (e.g., mapping "Where do I sleep on campus?" to the Hostel Accommodation policy).
- Keyword Search (BM25): To accurately catch hyper-specific college jargon, course codes (e.g.,
CS-301), or names of administrative buildings.
- Reranking Optimisation: Integrating a reranker (like Cohere Rerank) to evaluate the top search results and ensure the most relevant policy document is placed at the top before being sent to the LLM.
Dialogue Management & "Hybrid" System Logic
- Intent Classification Router: Building a logic router that intercepts a student's message and decides how to handle it:
- Casual Intent: For general queries (e.g., "Hi", "Thank you", "Who made you?") handled directly by the LLM.
- RAG Intent: For formal queries requiring documentation (e.g., "What is the refund policy if I withdraw?").
- API Intent: For real-time data queries (e.g., "Is the library open right now?").
- Conversational Memory Tracking: Implementing Redis or LangChain memory buffers so the chatbot remembers context across a conversation (e.g., if a student asks "How much is the CSE fee?" followed by "Can I pay it in instalments?", the system knows "it" refers to the CSE fee).
Guardrails, Evaluation & UI Deployment
- Campus Guardrails & Safety: Programming safety layers (using tools like NeMo Guardrails) to prevent the bot from answering off-topic political questions, helping students cheat on assignments, or hallucinating false grading policies.
- System Evaluation (RAGAS): Rigorously testing the chatbot's accuracy on a synthetic test set of 100+ common student questions to score its faithfulness (ensuring it doesn't invent college rules) and answer relevance.
- Frontend Chat Deployment: Building a clean, accessible web interface using Streamlit or Gradio (or embedding it into a messaging platform like WhatsApp/Telegram via Webhooks) allowing users to interact with the campus AI effortlessly.