Retrieved document
A retrieved document is information selected by an information-retrieval process from a source 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 →
Also covered in
- LLM Evaluation and Alignment, The Foundational IdeasIn early access (MEAP)
- Retrieval Augmented Generation, The Foundational IdeasIn early access (MEAP)
- Build AI-Enhanced Web Apps
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
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 · A prompt is text or other input supplied to an AI model to provide instructions, context, or other information that guides its response or generated output.
- context recallused by · Context recall is a retrieval-quality metric measuring how completely retrieved context contains the relevant information needed to answer a query or question.
- 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.
- generatorused by · A generator is a computational component or construct that produces data or values from inputs, representations, context, or specified constraints.
- GPT modelused by · A GPT model is a generative, autoregressive Transformer language model in the family developed by OpenAI.
Questions about retrieved document
What is retrieved document?
A retrieved document is information selected by an information-retrieval process from a source and supplied as context or evidence for a query or task.
Which Manning books explain retrieved document?
Grokking AI Applications and Building Reliable AI Systems.
What should I know before learning retrieved document?
Manning books that teach retrieved document usually introduce language model first.
What is retrieved document part of?
Retrieved document is part of prompt. A prompt is text or other input supplied to an AI model to provide instructions, context, or other information that guides its response or generated output.
What is retrieved document also called?
Retrieved document is also called retrieved context.
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.

