How nikhilreddy1011/campusfaq-rag works
This is a local campus FAQ helpdesk: administrators index campus documents, and students ask questions that receive grounded answers with citations or department referrals. The main runtime paths are documented in the README and partially visible in the excerpts; unsampled route details are represented only where the README or SOURCE INDEX supports them.
Main entry points: main.py FastAPI routes · retriever.py Semantic retrieval · answer_generator.py Grounding and answer generation · embeddings.py Text embeddings
Components 13
Helpdesk interface
- Chat interface
app/static/js/chat.js - Admin portal
app/static/js/admin.js - FastAPI routes
app/main.py - Page templates
app/templates
Document indexing
- Document extraction and chunking
app/document_processor.py - Text embeddings
app/embeddings.py
Retrieval and answers
- Semantic retrieval
app/retriever.py - Grounding and answer generation
app/answer_generator.py
Configuration and storage
- Runtime configuration
app/config.py - SQLite document and chunk store
app/database.py
Other components
- Student
- Administrator
- Ollama LLM
Connections 20
- Student → Chat interface: asks question
README.md - Chat interface → FastAPI routes: posts query
app/static/js/chat.js - FastAPI routes → Semantic retrieval: retrieves chunks
app/main.py - Semantic retrieval → Text embeddings: embeds query
app/retriever.py - Semantic retrieval → SQLite document and chunk store: reads chunks
app/retriever.py - FastAPI routes → Grounding and answer generation: generates answer
app/main.py - Grounding and answer generation → Ollama LLM: requests synthesis
app/answer_generator.py - Grounding and answer generation → FastAPI routes: returns citations or referral
README.md - FastAPI routes → Page templates: renders pages
app/main.py - Administrator → Admin portal: manages documents
README.md - Admin portal → FastAPI routes: calls admin routes
app/static/js/admin.js - FastAPI routes → Document extraction and chunking: processes uploads
README.md - FastAPI routes → Text embeddings: embeds chunks
README.md - FastAPI routes → SQLite document and chunk store: stores indexed chunks
app/database.py - Document extraction and chunking → Text embeddings: provides chunks
README.md - Text embeddings → SQLite document and chunk store: stores vectors
README.md - SQLite document and chunk store → Runtime configuration: reads database path
app/database.py - Semantic retrieval → Runtime configuration: uses thresholds
app/retriever.py - Document extraction and chunking → Runtime configuration: uses chunk settings
app/document_processor.py - Grounding and answer generation → Runtime configuration: uses fallback settings
app/answer_generator.py