How tanishk-dot/rag-based-doc-analyst- works
This is an enterprise hybrid RAG knowledge assistant: users submit documents for ingestion and ask questions over the resulting knowledge base. The documented core stages are document processing and embedding, vector-plus-BM25 retrieval, optional reranking, and answer evaluation. The API also exposes routing, citation, context-verification, and multi-document reasoning capabilities. The graph combines README-described architecture with relationships visible in sampled routes, retriever, and ingestion excerpts; unsampled implementation details are not inferred.
Main entry points: routes.py FastAPI routes · processor.py Document processing · retriever.py Hybrid retrieval · langgraph_workflow.py LangGraph workflow
Components 19
API entry
- FastAPI routes
app/api/routes.py - Request schemas
app/models/schemas.py
Ingestion
- File validation
app/ingestion/validators.py - Document extraction
app/ingestion/extractors.py - Document processing
app/ingestion/processor.py - Embedding generation
app/embedding/generator.py
Retrieval
- Vector storage
app/retrieval/storage.py - BM25 index
app/retrieval/bm25.py - Query routing
app/routing/query_router.py - Hybrid retrieval
app/retrieval/retriever.py - Reranking
app/retrieval/reranking.py - LangGraph workflow
app/workflows/langgraph_workflow.py - Metadata filtering
app/retrieval/metadata_filter.py
Answer quality
- Context verification
app/retrieval/context_verifier.py - Citation generation
app/retrieval/citation_generator.py - Document reasoning
app/reasoning/multi_document_reasoner.py - Quality evaluation
app/evaluation/ragas_evaluator.py
Platform
- Configuration
app/config/settings.py
Other components
- Knowledge user
Connections 22
- Knowledge user → FastAPI routes: submits queries
README.md - FastAPI routes → Request schemas: validates requests
app/api/routes.py - FastAPI routes → File validation: validates uploads
app/api/routes.py - FastAPI routes → Document processing: ingests documents
app/api/routes.py - Document processing → Document extraction: extracts content
app/ingestion/processor.py - Document processing → Embedding generation: generates embeddings
README.md - Document processing → Vector storage: stores vectors
app/ingestion/processor.py - Document processing → BM25 index: indexes chunks
app/ingestion/processor.py - FastAPI routes → Hybrid retrieval: requests retrieval
app/api/routes.py - Hybrid retrieval → Vector storage: searches vectors
app/retrieval/retriever.py - Hybrid retrieval → BM25 index: searches keywords
README.md - Hybrid retrieval → Query routing: requests strategy
app/retrieval/retriever.py - LangGraph workflow → Query routing: routes queries
app/workflows/langgraph_workflow.py - LangGraph workflow → Hybrid retrieval: retrieves context
app/workflows/langgraph_workflow.py - LangGraph workflow → Reranking: reranks results
app/workflows/langgraph_workflow.py - FastAPI routes → Reranking: requests reranking
app/api/routes.py - FastAPI routes → Metadata filtering: filters results
app/api/routes.py - FastAPI routes → Context verification: verifies context
app/api/routes.py - FastAPI routes → Citation generation: generates citations
app/api/routes.py - FastAPI routes → Document reasoning: reasons across documents
app/api/routes.py - FastAPI routes → Quality evaluation: evaluates answers
app/api/routes.py - FastAPI routes → Configuration: loads settings
README.md