How subhamparajuli/hybrid-rag works
Hybrid RAG Assistant accepts document uploads and questions through a Streamlit UI or FastAPI, indexes supported files locally, and answers from hybrid retrieval context using Ollama. The graph follows documented upload and answer flows, plus the optional evaluation capability. Source excerpts show the main calls; LangSmith and Ollama are external services, and some README-described subsystem details rely on documentation rather than sampled implementation.
Main entry points: api.py FastAPI Routes · evaluate.py Retrieval Evaluation · chain.py Context and RAG Chain · vectorstore.py Embeddings and Chroma
Components 13
User Interfaces
- Chat and Upload UI
app.py
API Service
- FastAPI Routes
api.py - Runtime Settings
src/config.py
Document Indexing
- Load and Split
src/ingestion.py - Embeddings and Chroma
src/vectorstore.py - Local Vector Store
Retrieval and Generation
- Hybrid Retrieval and RRF
src/retriever.py - Context and RAG Chain
src/chain.py - Local Ollama Model
Evaluation
- Retrieval Evaluation
src/evaluate.py - Evaluation Examples
src/examples.py
Other components
- User
- LangSmith
Connections 16
- User → Chat and Upload UI: uses
README.md - User → FastAPI Routes: queries directly
README.md - Chat and Upload UI → FastAPI Routes: posts uploads and questions
app.py - FastAPI Routes → Load and Split: runs ingestion
api.py - Load and Split → Embeddings and Chroma: persists chunks
src/ingestion.py - Embeddings and Chroma → Local Vector Store: stores embeddings
README.md - FastAPI Routes → Context and RAG Chain: initializes and asks
api.py - Context and RAG Chain → Hybrid Retrieval and RRF: retrieves context
src/chain.py - Hybrid Retrieval and RRF → Embeddings and Chroma: opens vector store
src/retriever.py - Hybrid Retrieval and RRF → Local Vector Store: searches and reads chunks
README.md - Context and RAG Chain → Local Ollama Model: generates answer
README.md - FastAPI Routes → Chat and Upload UI: returns answer
app.py - Retrieval Evaluation → Evaluation Examples: loads examples
src/evaluate.py - Retrieval Evaluation → Context and RAG Chain: uses RAG chain
src/evaluate.py - Retrieval Evaluation → Embeddings and Chroma: opens store
src/evaluate.py - Retrieval Evaluation → LangSmith: uploads and evaluates
README.md