About This Architecture
Local RAG Document Q&A Architecture combines hybrid retrieval—BM25 keyword search and vector embeddings—with a local LLM endpoint to answer questions over PDF documents without cloud dependencies. PDF documents flow through ingestion (text chunking, embedding, and BM25 indexing) into a Vector Database and BM25 Index Store, while user queries are processed through a Streamlit UI that executes parallel retrieval paths and reranks results before assembly into prompts. The architecture enforces safety guardrails on LLM responses and logs all query traces for auditability and debugging. This pattern enables privacy-preserving, cost-effective document Q&A with full control over model inference and data residency.