17.1 Why RAG? The Core Problem It Solves
LLMs have three fundamental limitations that RAG addresses:
- Knowledge Cutoff: Models don’t know about events after their training cutoff
- Hallucination: Models generate plausible but factually incorrect information
- No Access to Private Data: Models can’t natively access enterprise-specific documents
17.2 Business Value of RAG
| Use Case | Before RAG | After RAG | Business Impact |
|---|---|---|---|
| Employee Q&A | Search + read 10 docs manually | Instant answer with citations | 60-80% time savings |
| Customer Support | Agent reads knowledge base | AI suggests answer, agent verifies | 40% faster resolution |
| Compliance Review | Manual document review (days) | AI highlights relevant sections | 10x faster review |
| Research | Manual literature review | AI synthesizes across sources | 5x research acceleration |
17.3 End-to-End RAG Architecture (Pipeline Diagram)
flowchart TD
subgraph Offline["Offline Indexing Pipeline (Data Ingestion)"]
Sources["Enterprise Data Sources\n(SharePoint / Confluence / S3 / SQL)"] --> Parser["Document Parser & OCR\n(Layout Analysis, Table Extraction)"]
Parser --> Cleaner["PII Redaction & Sanitization\n(Presidio / Regex Masking)"]
Cleaner --> Chunker["Semantic Chunking Engine\n(Hierarchy & Overlap Preservation)"]
Chunker --> Embedder["Embedding Generation\n(Text-Embedding-3 / BGE / Voyage)"]
Embedder --> VectorDB[("Enterprise Vector Database\n(Pinecone / Qdrant / pgvector)\nEmbeddings + Dense Vectors + Metadata")]
end
subgraph Online["Online Retrieval & Generation Pipeline (Query Time)"]
UserQuery["User Input Query"] --> Transform["Query Transformation\n(HyDE / Multi-Query / Rewriting)"]
Transform --> Cache{"Semantic Cache Hit?"}
Cache -->|Yes| DirectReturn["Instant Cached Response"]
Cache -->|No| Search["Hybrid Search\n(Dense Vector + BM25 Sparse Lexical)"]
Search <--> VectorDB
Search --> Rerank["Cross-Encoder Reranker\n(Cohere Rerank / BGE-Reranker)"]
Rerank --> ContextFilter["Access Control (ACL Filter)\n& Context Window Budgeter"]
ContextFilter --> PromptBuilder["Augmented Prompt Assembly\n(System Prompt + Grounded Chunks)"]
PromptBuilder --> Generator["Frontier LLM Generator\n(GPT-4o / Claude 3.5 Sonnet)"]
Generator --> Response["Synthesized Answer\n+ Verifiable Inline Citations"]
end
Section 17 — Interview Q&A
Q: Explain RAG’s business case to a non-technical stakeholder. A: RAG lets the AI answer questions using your organization’s actual documents instead of only what it learned during training — so answers stay current as your documents change, and every answer can be traced back to a specific source, which builds trust and supports auditability. Concretely: employee Q&A drops from “search and read 10 documents” to an instant cited answer (60-80% time savings), compliance review that used to take days becomes hours, and customer support resolution speeds up because agents get an AI-drafted answer they can verify rather than researching from scratch.