Retrieved document
A retrieved document is information selected from a source by an information-retrieval process and supplied as context or evidence for a query or task.
Grokking AI Applications
Textual information retrieved from a knowledge source and supplied to a language model alongside a user query.
- How it is used
- Supplies relevant external context so a language model can answer queries about new or unseen information.
- How deep it goes
- Explains top-k selection, similarity distance, prompt enrichment, and grounding, while deferring large-scale metadata and high-dimensional details.
- Examples
- Uses pet-related chunks about Fox, Kit, and Brian to demonstrate selecting context and generating an answer.
- What you can do after
- Understand how selected context enables a stateless language model to answer questions using retrieved information.
Read how Grokking AI Applications explains retrieved document →
Building Reliable AI Systems
Information selected from an external knowledge source and supplied to a model as response context.
- How it is used
- Grounds generated responses by supplying relevant knowledge-base information alongside the user’s query.
- How deep it goes
- Traces query-based retrieval and context use, without detailing retrieval or generation internals.
- Examples
- Uses an electronics e-commerce chatbot to illustrate domain background as relevant context.
- What you can do after
- Understand how retrieved information can ground a generated response in evidence.
Read how Building Reliable AI Systems explains retrieved document →
Related concepts
- retrieval-augmented generationused by · Retrieval-augmented generation is a technique that retrieves relevant information from external sources and supplies it as context to a generative model when producing an output.
- promptpart of · An input, typically containing instructions or context, supplied to an artificial-intelligence model to guide or elicit its output.
- generatorused by · A generator is a computational component or construct that produces data or values from inputs, representations, context, or specified constraints.
- verificationused by · Verification is the process of checking a system, result, or claim against specified requirements, criteria, or evidence to determine whether it conforms or is correct.
- prompt templateused by · A prompt template is a reusable structure for organizing instructions, context, and variable inputs supplied to a language model.
- fidelitymeasured by · Fidelity is the degree to which an output, model, or representation accurately reflects or is supported by its relevant source, target, evidence, or behavior.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

