How honeybadger-rex/advance-rag works
This is a PDF question-answering RAG application: users upload a document, then ask questions answered from its contents. The backend loads and chunks PDFs, embeds and persists chunks, retrieves and reranks relevant passages, evaluates retrieval quality, optionally tries corrective retrieval, then builds context and generates an answer. The graph includes the React interface and the backend’s distinct processing stages. The README is empty; frontend upload wiring is not visible in the excerpt, so that connection is left unverified.
Main entry points: main.py FastAPI endpoints · App.jsx RAG interface · retriever.py Vector retrieval · vector_storage.py FAISS indexing
Components 15
Web interface
- RAG interface
frontend/src/App.jsx
API orchestration
- FastAPI endpoints
src/main.py
Document indexing
- PDF loading
src/ingestion/loader.py - Text chunking
src/ingestion/chunker.py - Text embeddings
src/indexing/embedding.py - FAISS indexing
src/indexing/vector_storage.py - Index and chunks
src/vector_store
Retrieval and evaluation
- Vector retrieval
src/retrieval/retriever.py - Result reranking
src/retrieval/reranker.py - Retrieval evaluation
src/evaluator/evaluate_retrieval.py - Corrective reranking
src/evaluator/corrective_reranking.py - Query expansion
src/evaluator/coracttive_retrieval.py
Answer generation
- Context assembly
src/generation/context_builder.py - Answer generation
src/generation/genrater.py
Other components
- User
Connections 18
- User → RAG interface: uses
frontend/src/App.jsx - RAG interface → FastAPI endpoints: posts question
frontend/src/App.jsx - RAG interface → FastAPI endpoints: uploads PDF
- FastAPI endpoints → PDF loading: loads PDF
src/main.py - FastAPI endpoints → Text chunking: chunks pages
src/main.py - FastAPI endpoints → Text embeddings: embeds chunks
src/main.py - FastAPI endpoints → FAISS indexing: builds and saves
src/main.py - FAISS indexing → Index and chunks: writes index and chunks
src/indexing/vector_storage.py - FastAPI endpoints → Vector retrieval: retrieves passages
src/main.py - FastAPI endpoints → Result reranking: reranks results
src/main.py - FastAPI endpoints → Retrieval evaluation: evaluates results
src/main.py - FastAPI endpoints → Corrective reranking: requests correction
src/main.py - Corrective reranking → Query expansion: uses query expansion
src/evaluator/corrective_reranking.py - FastAPI endpoints → Context assembly: builds context
src/main.py - FastAPI endpoints → Answer generation: generates answer
src/main.py - Vector retrieval → Index and chunks: reads index and chunks
src/retrieval/retriever.py - Query expansion → Vector retrieval: repeats retrieval
src/evaluator/coracttive_retrieval.py - Answer generation → Context assembly: uses context builder
src/generation/genrater.py