RAG (Retrieval Augmented Generation) architecture concept page. Shows the full pipeline: ingestion (load -> chunk -> embed -> store in Qdrant + BM25) and query (embed -> ANN search -> hybrid retrieval -> RRF fusion -> rerank -> LLM with cache). Demonstrates progression from Naive RAG to Advanced RAG (hybrid + rerank + query rewriting + HyDE) to Modular RAG per Gao 2024. Includes 5 scenarios: naive RAG baseline, hybrid retrieval with BM25+dense+RRF, advanced RAG with rewrite/HyDE/rerank, ingestion pipeline, and semantic cache hit. Includes 2 ADRs covering when complexity is worth it and vector DB / embedding model selection.
Retrieval-augmented generation combines a retrieval system with a generative model. Retrieval can miss, return stale or unauthorized content, or surface malicious instructions; generation can ignore or misstate evidence.
Grounded answer with provenance. The system retrieves authorized evidence, generates a candidate, and verifies citation support before release.
Insufficient evidence is a valid result. Retrieval can miss or conflict; the generator must not invent a conclusive answer.
Retrieved prompt injection. A document can tell the model to ignore policy or exfiltrate data; retrieved text remains untrusted.
Stale or revoked evidence. Index visibility and source authorization can change between ingestion and answer generation.
Apply identity and authorization before retrieval and again to returned evidence. Use hybrid retrieval and reranking only when measured on a versioned eval set. Treat retrieved passages as untrusted data, require provenance, allow an explicit insufficient-evidence result, and never make a high-impact action solely from generated text.
Введите числа или выберите пресет