How raunakksingh78/student-doc-assistant works
Student Document Assistant is a RAG product for answering student questions about institutional rules, courses, and hostel policies with source passages and citations. The main workflow runs from a student query through the web UI or CLI, the backend and RAG generation facade, retrieval refinement, and a grounded LLM answer with sources and evaluation details. A separate ingestion path loads source documents, creates chunks, and persists a searchable vector store. The README documents these capabilities; some frontend-to-API wiring and unsampled implementation details are not visible, so uncertain links are dashed.
Main entry points: retriever.py RAG retriever · generator.py Answer generator · main.py Interactive CLI · backend.py Backend API
Components 17
User interfaces
- Web UI
frontend/src/app/page.js - Interactive CLI
app/main.py - Backend API
app/backend.py
Document ingestion
- Source documents
Data/raw - Load and chunk
src/ingestion.py - Processed chunks
Data/processed
Retrieval pipeline
- RAG retriever
src/retriever.py - Query transformation
src/query_transform.py - Hybrid search
src/hybrid_retriever.py - Dense vector search
src/vector_store.py - Passage reranker
src/reranker.py - Parent context lookup
src/parent_retriever.py - Retrieval metrics
src/metrics.py
Answer generation
- Answer generator
src/generator.py - Groq LLM
Search data
- Chroma store
chroma_store
Other components
- Student
Connections 22
- Student → Web UI: asks question
README.md - Student → Interactive CLI: asks question
app/main.py - Web UI → Backend API: submits query
- Interactive CLI → Answer generator: submits query
app/main.py - Backend API → Answer generator: runs query
app/backend.py - Source documents → Load and chunk: loads and chunks
README.md - Load and chunk → Processed chunks: writes chunks
README.md - Interactive CLI → Load and chunk: builds corpus
app/main.py - Interactive CLI → Chroma store: builds store
app/main.py - Backend API → Load and chunk: prepares chunks
app/backend.py - Backend API → Chroma store: rebuilds store
app/backend.py - Answer generator → RAG retriever: retrieves context
src/generator.py - RAG retriever → Query transformation: generates queries
src/retriever.py - RAG retriever → Hybrid search: retrieves candidates
src/retriever.py - RAG retriever → Dense vector search: retrieves candidates
src/retriever.py - Hybrid search → Dense vector search: runs dense search
src/hybrid_retriever.py - RAG retriever → Passage reranker: reranks candidates
src/retriever.py - RAG retriever → Parent context lookup: resolves context
src/retriever.py - RAG retriever → Retrieval metrics: evaluates retrieval
src/retriever.py - Dense vector search → Chroma store: reads and writes
src/vector_store.py - Answer generator → Groq LLM: generates answer
src/generator.py - Answer generator → Student: returns answer and sources