liveBook · Manning

Information retrieval

As explained in Machines that Think

Retrieval is the computational process of selecting relevant information from an external collection in response to a query.

Information retrieval selects relevant material from an external collection in response to a query. In retrieval-augmented generation (RAG), it supplies a model with selected evidence without loading an entire archive into the context window. section 6.4.4

A RAG pipeline converts a question into an embedding, compares it with document embeddings in a knowledge base, and ranks documents by semantic similarity. The system inserts the selected passages as text into the prompt; the model reads that text, not the vectors. New documents can be indexed without changing the model’s parameters. section 6.4.4

Figure 6.8 Retrieval-augmented generation pipeline. A user query is transformed into an embedding, a vector representation used for similarity comparison against embedded documents in a knowledge base. The system ranks documents by semantic similarity and inserts only the top matches as text into the prompt before generation. The model’s response is thus conditioned on both its internal parameters and selectively retrieved external knowledge.

The pipeline diagram shows how a query becomes an embedding, relevant documents are ranked, and selected text enters the prompt. section 6.4.4

Retrieval improves access to relevant information but does not ensure that a generated answer stays grounded in it. A model may underuse retrieved evidence or add claims that cannot be traced to the sources. Reliable deployment may also require traceability, access boundaries, and integration with organizational systems. section 6.4.5 section 6.2.3

How Machines that Think covers it

How deep it goes
Explains query embeddings, similarity ranking, and prompt insertion, then distinguishes retrieval from guaranteed grounding.
Examples
Uses legal archives, medical databases, corporate repositories, and query-to-document matching as examples.
What you can do after
Evaluate retrieval as a way to expose relevant evidence while recognizing that it cannot guarantee grounded generation.
How it connects
Connects retrieval to retrieval-augmented generation, embeddings, context windows, and grounding.

Also explained in

Compare how 17 books explain information retrieval →

Related concepts

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