liveBook · Manning

Retrieval-augmented generation

As explained in Designing AI Agents

A technique that retrieves relevant information from an external corpus and supplies it to a language model to inform generation.

Retrieval-augmented generation (RAG) supplies a model with selected external evidence for a particular decision. A write path compiles and indexes sources; a read path retrieves and assembles an evidence package. Preserve provenance, versions, and permissions so the package contains the evidence needed to answer—or supports abstaining. section 4.3

Design and test the retrieval path for:

  • Chunk boundaries, query vocabulary, source authority, permissions, and index freshness; each can cause relevant-looking results to omit controlling evidence. section 4.3.4
  • Questions requiring multiple clauses, versions, or relationships; require citations and use verification or review when consequences warrant it. section 4.3.4
  • Accuracy, citation coverage, latency, injected-token cost, and missed-authority failures together. section 4.3

Compile sources, then retrieve

A team found its session-access and search APIs saw limited daily use. It is testing compilation of documents, logs, and prior sessions into structured artifacts with pointers to originals, then choosing exact lookup, index search, browsing, or direct reading for each question. section 4.3

How Designing AI Agents covers it

How deep it goes
Specifies write and read paths, design responsibilities, evaluation metrics, and failure modes without prescribing a single implementation.
Examples
Uses session APIs, documents, logs, prior sessions, and compiled artifacts as implementation examples.
What it assumes
Assumes an external corpus and criteria for acceptable evidence; assigns compilation and retrieval responsibilities.
What you can do after
Evaluate pipelines by accepted outcomes, token use, latency, citation coverage, and missed-authority failures.
How it connects
Connects retrieval to database indexes, full-text search, and GraphRAG for relationship-heavy corpora.

Also explained in

Compare how 46 books explain retrieval-augmented generation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Agents. The section links point to the parts of the book it draws on.