How sujithvarma-ai/advanced-rag-knowledge-base works
This repository is an enterprise-knowledge RAG assistant. Markdown collections are loaded, chunked, embedded, and stored for retrieval; the chat interface sends user questions through retrieval and LLM answer generation, with retrieved context displayed alongside the answer. A separate advanced RAG module demonstrates query rewriting and reranking, but its integration with the primary answer path is not established by the sampled code. Evaluation covers retrieval metrics and LLM-judged answer quality. The graph reflects the sampled source and README; evaluation test-loading details and the advanced module’s runtime wiring are only partly evidenced.
Main entry points: answer.py Answer orchestration · app.py Chat interface · eval.py RAG evaluation · ragadvanced.py Advanced RAG demo
Components 18
Knowledge ingestion
- Knowledge documents
knowledge-base - Load Markdown
ingest.py - Chunk documents
ingest.py - Embed and index
ingest.py - Vector database
Question answering
- Chat interface
app.py - Answer orchestration
answer.py - Semantic retrieval
answer.py - Gemini model
- Retrieved context
answer.py
Advanced RAG
- Advanced RAG demo
ragadvanced.py - Query rewriting
ragadvanced.py - Result reranking
ragadvanced.py
Evaluation
- Evaluation dataset
tests.jsonl - Test loading
test.py - RAG evaluation
eval.py - Evaluation dashboard
evaluator.py
Other components
- User
Connections 18
- Knowledge documents → Load Markdown: loads
README.md - Load Markdown → Chunk documents: splits
ingest.py - Chunk documents → Embed and index: embeds chunks
ingest.py - Embed and index → Vector database: stores vectors
ingest.py - User → Chat interface: asks
app.py - Chat interface → Answer orchestration: calls
app.py - Answer orchestration → Semantic retrieval: requests context
answer.py - Semantic retrieval → Vector database: searches
answer.py - Semantic retrieval → Retrieved context: returns documents
answer.py - Answer orchestration → Gemini model: generates answer
answer.py - Retrieved context → Answer orchestration: provides grounding
answer.py - Answer orchestration → Chat interface: returns answer
app.py - Advanced RAG demo → Query rewriting: defines
ragadvanced.py - Advanced RAG demo → Result reranking: defines
ragadvanced.py - Evaluation dataset → Test loading: test cases
README.md - Test loading → RAG evaluation: loads tests
eval.py - RAG evaluation → Answer orchestration: evaluates answers
eval.py - Evaluation dashboard → RAG evaluation: runs evaluations
evaluator.py