RAG-PER-01Tier IKnowledge Grounding (RAG)

Retrieval-Augmented Generation

Ground the agent's reasoning in retrieved, cited sources rather than parametric memory, especially for domain-specific or time-sensitive facts.

Runtime: PerceiveAgentOps: Build & IntegrateSee on the matrix →
RETRIEVAL-AUGMENTED GENERATION Query Retrievevector +keyword Reranktop-K Generatewith citations Cited AnswerverifiableLewis et al. NeurIPS 2020 — ground generation in retrieved sources.
In Plain English

This page is the complete instruction page for one pattern called "Retrieval-Augmented Generation." It explains the problem this pattern solves, the idea behind the solution, when you should (and should not) use it, and what happens afterward, both the good effects and the costs.

This matters because building AI agents is not just about making them clever. It is also about making them safe and predictable. Following a well-tested pattern like this one helps avoid common mistakes, and shows you exactly which safety rules and regulations it connects to, listed under "Standards Mesh" on this page.

Context

Foundation models hallucinate confidently on specialised or recent topics. Parametric knowledge is frozen at training; enterprise knowledge is private and changes daily.

Problem

Unretrieved reasoning on domain facts produces authoritative-sounding errors.

Forces

  • Retrieval latency vs accuracy
  • Index freshness vs cost
  • Recall vs precision

Solution

Before generation, retrieve relevant passages from authoritative indexes (vector, keyword, hybrid). Provide retrieved passages in the context, require citation, and instruct the agent to decline when retrieval is empty.

Placement

Where this pattern acts in the two lifecycles

Runtime Cognitive
01Perceive
02Reason / Plan
03Decide
04Act
05Observe
06Reflect / Learn
07Terminate

01 Perceive. Ingest inputs, parse environment, structure observations. 5 of 61 catalogue patterns act at this stage.

AgentOps Lifecycle
01Design & Scope
02Build & Integrate
03Evaluate & Red-Team
04Deploy
05Operate & Monitor
06Iterate & Adapt
07Decommission

02 Build & Integrate. Model selection, tool wiring, memory design. 17 of 61 catalogue patterns act at this stage.

Stages and counts from the catalogue data. The Runtime lens is the loop the agent runs each turn; the AgentOps lens is the lifecycle the team runs the agent through. See the Matrix for every pattern at each stage.

Applicability

  • Domain-expert agents
  • Customer-support agents over product knowledge
  • Regulatory and legal agents
  • Any agent relying on stable but specialised facts

Anti-Patterns

  • Skipping retrieval "because the model knows"
  • Retrieval without citation enforcement

Consequences

  • +Reduced hallucination
  • +Citations enable verification
  • −Retrieval pipeline to maintain
  • −Misleading if retrieval returns low-relevance content