Retriever
A retriever is a software component that searches or queries an information source and returns items relevant to a query for use by downstream processes.
Machine Learning Platform Engineering
A retrieval component is a system stage that finds information relevant to a query and supplies it to downstream processing.
- How it is used
- Supports RAG systems by finding relevant document chunks for downstream LLM context construction.
- How deep it goes
- Builds indexing, persistence, compatibility, and query flow, while deferring sophisticated production context assembly beyond basic concatenation.
- Examples
- Uses Markdown documents, overlapping chunks, a FAISS index, and an encryption-key-rotation query.
- What you can do after
- Apply it via FAISS and LangChain to build a persistent retriever that returns documents for a RAG query.
Read how Machine Learning Platform Engineering explains Retriever →
Build AI-Enhanced Web Apps
A retriever is a component that obtains relevant information from an indexed or external data source in response to a query.
- How it is used
- Supports grounded question answering by supplying relevant indexed documents to LangChain.js prompt and agent pipelines.
- How deep it goes
- Explains construction, chaining, formatting, input matching, embeddings, and agent-tool integration, but not retrieval algorithm internals.
- Examples
- Demonstrates vectorStore.asRetriever(), a question-answering chain, and conversion of a retriever into an agent tool.
- What you can do after
- Build it from scratch by composing a LangChain.js retriever with document formatting, prompts, models, parsers, or agents.
Building Reliable AI Systems
A retrieval component that finds relevant information from an external collection for use as model context.
- How it is used
- Fetches query-relevant external information to ground a generator’s response in a RAG system.
- How deep it goes
- Defines the role, traces the query-to-answer flow, and shows a one-line database adapter without detailing search implementation.
- Examples
- Uses a product-warranty question, a store-policy query, and a product-database retriever call.
- What you can do after
- Apply it via `product_db.as_retriever()` to supply relevant product information to a chatbot.
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.
- knowledge baseuses · A knowledge base is an organized collection of information that can be accessed or queried to support reference, retrieval, or reasoning.
- databaseuses · A database is an organized collection of persistent data managed by software for storage, retrieval, querying, and modification.
- embeddinguses · A numerical vector representation of an item or input that encodes features or relationships useful for computational tasks.
- demonstrationuses · A demonstration is an example pairing an input, request, or prompt with a corresponding output, answer, or label to illustrate a task or expected 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.


