Working with Retrievers in Gen AI Builder v1.2
What is a Retriever
A Retriever in Gen AI Builder is a specialized Griptape Structure that defines how your AI Assistants retrieve information from Knowledge Bases. Retrievers enable precise, customizable information retrieval — the core of Retrieval-Augmented Generation (RAG) workflows.
At query time, your Assistant uses its configured Retriever(s) to:
- Search one or more Knowledge Bases
 - Select the most relevant results ("chunks") based on semantic similarity and other filters
 - Feed that context into the Large Language Model (LLM) to generate an informed response
 
In short: A Retriever connects user queries → Knowledge Base content → AI answers.
For a deep dive, see Retrievers explained. For step-by-step configuration, see Create a Retriever.
Why use Retrievers
- Ground AI responses: Retrievers ensure that Assistants provide factually grounded answers based on your organization’s Knowledge Bases.
 - Support explainability: Retrieved content can be referenced in the Assistant’s responses, enabling transparent and auditable AI.
 - Control search behavior: You can configure which Knowledge Bases are queried, control token limits, and supply advanced metadata.
 - Enable multi-source RAG: Retrievers can target multiple Knowledge Bases simultaneously — useful for complex Assistants with broad knowledge scope.
 
When to use Retrievers
- Whenever you are building an AI Assistant that needs to answer questions based on internal content.
 - Whenever your content is stored in Knowledge Bases and you want dynamic, query-time retrieval.
 - When you want your AI application to support semantic search and not rely solely on the LLM’s internal training.
 
Examples:
- Support chatbots answering questions from product documentation
 - Financial advisors surfacing policies and legal disclaimers on demand
 - Sales tools providing quick access to internal pricing documents and competitive intelligence
 
How do Retrievers work
At runtime, the process is:
- User asks a question.
 - Assistant forwards the query to its assigned Retriever(s).
 - Retriever runs semantic + optional structured search across configured Knowledge Bases.
 - Retriever returns the most relevant results.
 - Assistant passes this context to the LLM.
 - LLM generates a response incorporating the retrieved information.
 
Under the hood: A Retriever is implemented as a Griptape Structure, giving you flexibility in how it performs retrieval.
See Griptape concepts for more on Structures.
Key components of a Retriever
- Knowledge Bases targeted: Determines the scope of retrieval.
 - Max Tokens: Controls how much content is retrieved per query.
 - Metadata: Optional structured data for advanced configuration or tagging.
 - Associated Assistants: Controls which Assistants can use this Retriever.
 
Getting started
Pre-requisites
- One or more Knowledge Bases created and populated in Gen AI Builder.
 
First steps
- Create a Retriever and configure it to target your Knowledge Bases.
 - Associate the Retriever with an AI Assistant.
 - Test the Assistant to verify that retrieved content is correctly influencing responses.
 
See Create a Retriever for the full step-by-step guide.