AI Tutoring RAG
Curriculum-grounded university tutoring assistant using ChromaDB vector retrieval, Gemini and SQLite.
Overview
AI Tutoring RAG is a multi-tier educational prototype addressing high student-to-lecturer ratios in large public university engineering departments by grounding conversational tutoring and practice quiz generation strictly in lecturer-uploaded course handbooks, lecture notes and textbooks.
Problem Statement
Students studying specialized Computer Engineering modules often receive generic or hallucinated explanations from ungrounded chatbots that ignore departmental syllabi and notation conventions.
Technical Architecture
Three-tier Python application pairing a role-based Streamlit student/admin portal with ChromaDB persistent semantic vector indexing, PyPDF2 chunking pipelines, bcrypt-authenticated SQLite session/quiz storage and Google Gemini 1.5 Flash generation.
Presentation & Role Portal
Separate Student (RAG chat, adaptive quiz generator, progress analytics) and Administrator (PDF/TXT ingestion, student metrics, system health) interfaces in Streamlit.
Ingestion & Semantic Retrieval
DocumentProcessor extracts and chunks departmental PDFs into persistent ChromaDB embeddings queried prior to every tutor response.
Relational State & Grading
SQLite DatabaseManager persists bcrypt-hashed accounts, session logs and graded multiple-choice quiz explanations.
Technology Stack
Application & Architecture Captures
Key Engineering Decisions & Challenges
Engineering Decisions
- Separated unstructured semantic retrieval (ChromaDB) from structured learner progress and account records (SQLite) for straightforward local deployment.
- Gave course administrators direct PDF/TXT ingestion and health-monitoring views so curriculum updates require zero code edits.
Implementation Challenges
- Chunking dense engineering lecture notes without severing equations or multi-paragraph definitions across retrieval boundaries.
- Formatting structured multiple-choice quiz outputs reliably for automated grading and per-question feedback.
Testing Strategy & Demonstrated Outcomes
Testing & Verification
- Component unit tests across DatabaseManager, DocumentProcessor and AdvancedVectorStore.
- End-to-end RAG ingestion-to-quiz integration checks and manual factual evaluation on curriculum queries with student volunteers.
Demonstrated Outcomes
- Complete open-source prototype supporting student RAG tutoring, custom topic/difficulty quiz generation and administrator document management.
- Demonstrated substantially reduced off-syllabus hallucination during departmental coursework evaluation.
Lessons Learned
- Retrieval chunk quality and source-snippet visibility matter more for student comprehension than switching to larger frontier models.