Retrieval-Augmented Generation Generation with external evidence in the loop.
Retrieval-augmented generation, or RAG, is an architecture in which a generative model receives information retrieved from an external corpus or data source as part of the context used to produce a response.
RAG does not automatically make an answer true, grounded, cited or current. Quality depends on what was retrieved, whether the evidence is applicable, how context is assembled, whether contradictions are preserved and whether generated claims remain within the support provided by the retrieved material.
RAG is not a model type. It is a retrieval + generation architecture.
The core idea is simple: fetch information that was not necessarily contained in the model’s parametric memory, insert or otherwise expose that information to the generation process and ask the model to answer using that retrieved context.
Prompt → model → answer
The model answers from its existing parameters and the information already present in the prompt. This can be useful, but it does not dynamically pull fresh or corpus-specific evidence.
- no external candidate search
- limited to prompt + model state
- cannot dynamically consult private corpus
- current facts may be unavailable
Prompt → evidence → model → answer
The system retrieves documents, passages, records or other evidence and uses selected items as generation context. The retrieved set becomes part of the answer’s evidentiary environment.
- external or private corpus
- fresh data can enter at runtime
- source-specific claims can be supported
- retrieval quality becomes a critical dependency
Change one stage. Watch the whole answer contract move.
Select a scenario. The graph changes retrieval state, context quality, contradiction handling, generation behavior and the final risk profile.
RAG is a chain of dependencies. Failure can enter at every link.
The simplest useful decomposition is retrieval, reranking, context assembly, generation, verification and attribution. Production systems may add query transformation, tools, memory, policy gates or structured data.
Retriever
Finds candidate documents, passages, records or other evidence units relevant to the request or its subqueries.
FIND CANDIDATESReranker
Reorders candidates using richer signals so direct, applicable and specific evidence can outrank merely topical matches.
IMPROVE PRECISIONContext Builder
Selects, deduplicates and formats evidence for the model while preserving source boundaries, constraints and necessary surrounding context.
ASSEMBLE EVIDENCEGenerator
Uses the request plus retrieved context to produce an answer, comparison, plan, explanation, transformation or other task-specific output.
CONSTRUCT RESPONSEVerifier
Checks whether generated claims remain inside the available evidence and whether contradictory, stale or uncertain information was handled correctly.
CHECK SUPPORTAttribution Layer
Connects answer claims to source paths, citations or provenance metadata where the interface supports them.
TRACE CLAIMSPolicy / Permission Layer
Controls what corpus content may be retrieved or exposed, especially for enterprise, private or user-specific RAG systems.
CONTROL ACCESSObservability
Logs query transformations, candidates, context and answer outcomes so retrieval and generation failures can be diagnosed separately.
DEBUG PIPELINERetrieval finds candidates. Context assembly decides what the model actually sees.
A strong candidate can still be lost during deduplication, truncation, context budgeting or formatting. Context assembly is therefore a separate design problem from retrieval.
PROVENANCE → FIT BUDGET
RAG is not one pipeline. The retrieval substrate can change completely.
The same generation model can be augmented by web search, private documents, structured databases, graphs, multimodal collections or tool-mediated live state.
Web RAG
Retrieves public web documents or passages at runtime. Freshness, source quality, duplicate handling and page eligibility become major concerns.
query → web index → pages → answerPUBLIC INFORMATIONPrivate Corpus RAG
Retrieves internal policies, manuals, tickets, contracts or knowledge-base material. Permissions and source provenance are first-class requirements.
user ACL → internal corpus → allowed contextPRIVATE KNOWLEDGEDatabase / Record RAG
Retrieves structured records, product attributes, inventory, pricing or transaction state that can be more precise than free-text documents for factual tasks.
filter / SQL / API → records → contextSTRUCTURED FACTSGraph-Augmented Retrieval
Uses relationships among entities to retrieve connected facts or subgraphs when the question depends on multi-hop relationships.
entity → relation paths → evidence subgraphRELATIONSHIPSMultimodal RAG
Retrieves text, images, diagrams, audio, video or visual product data when one modality alone cannot resolve the request.
image + text → multimodal evidenceCROSS-MODALTool-Mediated / Agentic RAG
An agent can decide when to search, retrieve again, call tools, inspect live state or refine the query before final generation.
plan → retrieve → inspect → repeat → answerITERATIVE RETRIEVALWrong answer? Locate the failing stage before blaming the model.
The matrix separates failure domains so diagnosis can target the corpus, retriever, reranker, context builder, generator or attribution layer rather than treating “hallucination” as one undifferentiated problem.
RAG changes with the evidence environment. Four very different pipelines.
These examples show why a web RAG system, enterprise knowledge assistant, current commercial recommender and technical diagnostic assistant should not share one simplistic context strategy.
Choose a CRM under budget
Needs fresh pricing, exact seat limits and product fit. One stale pricing source can invalidate the recommendation.
Can this employee approve the expense?
Needs permission-aware retrieval from current internal policy, not general web content.
Index collapse after migration
Needs several technical evidence classes and iterative retrieval as candidate causes are eliminated.
Does passage retrieval improve long-form QA?
Needs literature, methods, benchmarks and counterevidence rather than one authoritative web page.
RAG overlaps with other concepts. Do not collapse them together.
Precision matters because retrieval, grounding, fine-tuning, memory and tool use solve different parts of the system problem.
RAG vs. Retrieval
Retrieval finds evidence. RAG adds a generation stage that consumes retrieved context. A search engine can retrieve without generating.
RETRIEVAL ⊂ POSSIBLE RAG PIPELINERAG vs. Grounding
RAG can provide external context, but grounding asks whether generated claims are actually supported or constrained by evidence.
CONTEXT ≠ GUARANTEED SUPPORTRAG vs. Fine-Tuning
Fine-tuning changes model parameters. RAG usually supplies runtime context without permanently encoding every retrieved fact into model weights.
RUNTIME CONTEXT ≠ PARAMETER UPDATERAG vs. Memory
Memory stores or retrieves prior user/session state. It can be implemented through retrieval, but user memory and external knowledge retrieval are different responsibilities.
STATE ≠ KNOWLEDGE CORPUSRAG can reduce unsupported generation. It can also import bad evidence with confidence.
A robust audit distinguishes retrieval failure from context failure and generation failure. Each produces a different remediation path.
The correct evidence never enters the candidate set, so the generator lacks the material needed to answer safely.
FIX RETRIEVER / CORPUSA highly relevant old source enters context for a current-state claim such as price, regulation, version or availability.
FRESHNESS CONTROLGeneric summaries or low-authority sources outrank primary evidence and become the basis of the generated answer.
RERANK / SOURCE ROLEToo many passages, duplicates or weak sources reduce signal density and make contradictory details harder to preserve.
PRUNE / DEDUPCritical qualifiers, exceptions or source labels are dropped when fitting evidence into the generation context.
CONTEXT BUDGETTwo valid sources disagree, but the system merges them into one confident answer instead of exposing uncertainty.
PRESERVE CONFLICTThe model connects retrieved facts with a conclusion that the sources do not actually support.
CLAIM CALIBRATIONAn answer displays citations, but the cited passages do not substantiate the nearby claim at the required specificity.
CLAIM → SOURCE CHECKPrivate RAG retrieves or exposes information outside the user’s authorization boundary.
ACL BEFORE CONTEXTRAG is powerful. It is not a truth machine.
These boundaries prevent common category errors and unsupported claims about what RAG guarantees.
If retrieval is wrong, stale or incomplete, generation can still produce a polished but incorrect answer.
RETRIEVAL QUALITY MATTERSThe model can receive evidence and still generate claims that exceed or contradict that evidence.
CONTEXT ≠ FAITHFULNESSAn implementation may use retrieved context without exposing sources, and citations can still be mismatched.
RAG ≠ ATTRIBUTIONRetrieval can be lexical, dense, hybrid, filtered, structured, graph-based, tool-mediated or multimodal.
ARCHITECTURE VARIESSome RAG systems retrieve passages or chunks; others retrieve full records, documents, database rows, graph neighborhoods or live tool output.
UNIT DEPENDS ON CORPUSAdding redundant or low-quality evidence can increase noise, contradiction and prompt cost without improving answer quality.
SIGNAL DENSITYPublic discussion of RAG in Google Search does not reveal Google’s proprietary candidate scores, embeddings, thresholds or context-selection logic.
PUBLIC CONCEPT / PRIVATE SYSTEMGoogle’s current Search guidance keeps generative-AI visibility inside normal Search technical requirements and people-first content practices.
NO SPECIAL AI SCHEMABeing indexed and technically eligible does not guarantee retrieval, supporting-link selection, citation or AI-feature appearance.
NO GUARANTEEGoogle now documents RAG directly. Use the public description, not invented internals.
Google’s current Search Central guidance explicitly names retrieval-augmented generation as a technique used by its generative AI Search features and describes the relationship between core ranking systems, retrieved pages and generated responses.
Documented: core Search retrieval feeds generative answers
Google says its generative AI Search features use techniques including RAG, relying on core Search ranking systems to retrieve relevant, up-to-date web pages from the Search index and then use specific information from those pages to generate a response with supporting links.
Documented: normal Search eligibility remains the technical base
Google states that pages surfaced as supporting links in AI Overviews or AI Mode must be indexed and eligible to appear in Search with a snippet. It does not publish special technical requirements unique to those AI features.
Audit retrieval first. Then audit whether generation stayed inside the evidence.
This checklist treats RAG as an end-to-end evidence pipeline: corpus, retrieval, reranking, context assembly, generation, verification, provenance and permissions.
AI Search research. From RAG into grounding and evidence selection.
Continue through grounding, citations, passage retrieval, optimization, entity visibility and multimodal systems while preserving the distinction between retrieved context and supported output.
What Is AI Search?
Define the retrieval, evidence and synthesis architecture behind AI-oriented search interfaces.
OPEN NODE → AIS / 02 · QUERIESQuery Fan-Out
Decompose complex requests into distinct retrieval branches and evidence responsibilities.
OPEN NODE → AIS / 03 · RETRIEVALInformation Retrieval
Locate candidate documents, passages, records and evidence before downstream synthesis.
OPEN NODE →Retrieval-Augmented Generation
Feed retrieved external evidence into generation while preserving context quality and provenance.
CURRENT NODEGrounding
Connect generated claims to information capable of supporting or constraining them.
OPEN NODE → AIS / 06 · SOURCESCitations & Source Selection
Evaluate directness, freshness, specificity, provenance and claim support.
OPEN NODE → AIS / 07 · PASSAGESPassage Retrieval
Design focused information units that can resolve precise evidence needs.
OPEN NODE → AIS / 08 · OPTIMIZATIONAI Search Optimization
Build technically accessible, differentiated and evidence-rich information systems.
OPEN NODE → AIS / 09 · ENTITIESEntity Visibility in AI Search
How explicit identity, attributes and relationships support machine interpretation.
OPEN NODE → AIS / 10 · FRONTIERMultimodal & Agentic Search
Search systems that combine language, images, context, tools and task execution.
OPEN NODE →RETRIEVE / CONTEXTUALIZE / GENERATE / VERIFY
RAG does not replace model knowledge. It gives generation an evidence environment.
The strategic value of retrieval-augmented generation is not that retrieval makes generation infallible. It is that external evidence can be selected at runtime, placed inside the generation process and audited as a separate system layer. The stronger the retrieval, context assembly, provenance and verification controls, the more defensible the resulting answer can become.