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.
| Type | Description |
|---|---|
| Knowledge Base Search Tool | Searches a Bedrock Knowledge Base |
| Bedrock Managed Knowledge Base Search Tool | Searches an Amazon Bedrock managed knowledge base |
| Azure AI Search Tool | Searches an Azure AI Search index |
Grounding (Deprecated)
Workflow-based configuration that runs search query generation, retrieval, and answer generation in sequence.
| Type | Description |
|---|---|
| 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
- The user sends a message.
- Claude decides whether to call a search tool based on the conversation context.
- Related information is retrieved from the configured knowledge base or index.
- Claude generates a response referencing the search results.
With Grounding (Workflow-Based)
- The user sends a message.
- If Search Query Generation (SQG) is configured, an optimized search query is generated from the user input.
- Related information is retrieved from the configured grounding source.
- Search results are embedded in the RAG prompt template and passed to the AI.
- The AI generates a response referencing the search results.