Create a Retriever in Gen AI Builder

Who is this for

Platform users configuring Retrievers in Gen AI Builder in Hybrid Manager AI Factory. Typical users include developers, AI architects, and conversational designers.

What you will accomplish

You will create a Retriever to control which Knowledge Bases your Assistants query and how content is retrieved.

You will configure:

  • Target Knowledge Bases
  • Max Tokens limit
  • Optional metadata

Retrievers enable grounded, context-aware AI responses for your Assistants.

Why create a Retriever

Retrievers are a key component of the Retrieval-Augmented Generation (RAG) pipeline:

  • Define which Knowledge Bases Assistants query.
  • Control semantic search and context size passed to the LLM.
  • Enable metadata injection for auditing, versioning, or custom logic.
  • Without a Retriever, an Assistant cannot retrieve content to ground its responses.

For background, see:

To see how Retrievers are used in Hybrid Manager deployments, visit:

Complexity and time to complete

  • Complexity: Low to moderate
  • Estimated time: 5–10 minutes

When to create a Retriever

  • Before assigning RAG capabilities to an Assistant.
  • When tuning how an Assistant retrieves and prioritizes knowledge.
  • When combining content from multiple Knowledge Bases.
  • When customizing retrieval behavior for different personas or use cases.

How to create a Retriever

1. Navigate to Retrievers

  • In Gen AI Builder UI, go to Retrievers.

2. Create a new Retriever

  • Click Create Retriever.

3. Configure Retriever fields

Name (required)

  • Provide a clear, unique name.
  • Example: Product Docs Retriever

Description (optional)

  • Describe the Retriever’s purpose or intended use.
  • Example: Retriever for product documentation and customer FAQs.

Knowledge Bases (required)

  • Select one or more existing Knowledge Bases to target.
  • Example: PG Financial Product FAQs KB, PG Financial Account Services KB

Max Tokens (optional)

  • Set the Max Tokens limit for context passed to the LLM.
  • Example: 2000

Guidance:

  • Higher token limits → more context but larger LLM prompts.
  • Lower token limits → faster response but may miss needed content.
  • Typical range: 1000–3000.

Metadata (optional)

  • Provide optional metadata as a valid JSON object.
  • Example: {"version": "1.0", "team": "AI Engineering"}

Usage:

  • Tag or version your Retriever configurations.
  • Drive advanced logic in custom Griptape Structures or Assistant templates.

4. Finalize creation

  • Click Create.
  • The new Retriever will appear in the Retrievers list.
  • It is now available to assign to one or more Assistants.

Associating a Retriever with an Assistant

  • When configuring an Assistant, go to Advanced Options.
  • Select one or more Retrievers to associate.
  • This controls which Knowledge Bases the Assistant queries at runtime.

Tip: Use different Retrievers for different personas or Assistant use cases — enabling fine-grained RAG control.

Example scenario

You want to create a Retriever for an Assistant that answers customer product questions:

  • Name: Product Support Retriever
  • Description: Fetches product specs and pricing from KBs.
  • Knowledge Bases:
  • Product Catalog Hybrid KB
  • Pricing Policies KB
  • Max Tokens: 2000
  • Metadata: {"team": "Support AI"}

Troubleshooting

Retriever not returning expected results

  • Verify that the target Knowledge Bases contain relevant content.
  • Check your Max Tokens setting.
  • Confirm that the correct Retriever is assigned to the Assistant.

Retriever not visible when configuring an Assistant

  • Ensure the Retriever was created successfully.
  • Verify that the selected Knowledge Bases are accessible and indexed.

Token impact

  • Setting too high may exceed LLM context window → risk truncation.
  • Setting too low may result in incomplete or unhelpful responses.

Tip: Start with 2000 tokens and adjust based on Assistant testing.



Could this page be better? Report a problem or suggest an addition!