Case & CodeA FIELD GUIDE TO AI
Start learning
Intermediate

Retrieval

In plain words

Searching a larger set of records for useful parts. Finding a passage does not prove it answers the question.

Closed book versus open book
Without retrieval

The model answers from whatever it absorbed in training, like an exam from memory.

With retrieval (RAG)

The app first finds the relevant pages in your documents and puts them in front of the model, like an open-book exam with page references.

Open book is better, but the student can still misread the page, and the search can hand it the wrong page. The page reference is what lets you check.

The fuller definition

Retrieval selects potentially relevant information from a collection for a query or task.

Go deeper

Keep the source attached as a document becomes usable text
A01 · PAGE 2

Delivery may be possible in April.

Subject to inspection.

CHUNK 1 · A01 / P2

Delivery may be possible in April. Subject to inspection.

METADATA

source_id: A01
page: 2
version: original

This fictional example keeps a condition beside the proposition it qualifies. Extraction and chunking should preserve enough context to inspect what the source actually says.

A concrete example

A system finds email passages mentioning an inspection condition before building a chronology.

The distinction that matters

Retrieved material is a candidate for use, not proof that the search was exhaustive or the source is correct.

Related terms

Where it is taught

How document-grounded AI answers work

Source and further reading

Sentence Transformers · Semantic search

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC