Skip to content

RAG

RAG (Retrieval-Augmented Generation) is a mechanism that retrieves information from external knowledge sources and uses it to enhance AI responses. It is configured through an assistant's Platform Metadata or Grounding settings.

Supported Configurations

For new setups, we recommend using the built-in tools in Platform Metadata.

Search Tools in Platform Metadata

On assistants with the BedrockClaude type, Claude searches external knowledge as tools.

TypeDescription
Knowledge Base Search ToolSearches a Bedrock Knowledge Base
Bedrock Managed Knowledge Base Search ToolSearches an Amazon Bedrock managed knowledge base
Azure AI Search ToolSearches an Azure AI Search index

Grounding (Deprecated)

Workflow-based configuration that runs search query generation, retrieval, and answer generation in sequence.

TypeDescription
Kendra Retrieval (Deprecated)Uses Amazon Kendra as a search engine
Bedrock Knowledge Base Retrieval (Deprecated)Uses Bedrock Knowledge Base

Processing Flow

With Platform Metadata Search Tools

  1. The user sends a message.
  2. Claude decides whether to call a search tool based on the conversation context.
  3. Related information is retrieved from the configured knowledge base or index.
  4. Claude generates a response referencing the search results.

With Grounding (Workflow-Based)

  1. The user sends a message.
  2. If Search Query Generation (SQG) is configured, an optimized search query is generated from the user input.
  3. Related information is retrieved from the configured grounding source.
  4. Search results are embedded in the RAG prompt template and passed to the AI.
  5. The AI generates a response referencing the search results.