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 the Grounding settings of an assistant.

Supported Grounding Types

TypeDescription
Kendra RetrievalUses Amazon Kendra as a search engine
Bedrock Knowledge Base RetrievalUses Bedrock Knowledge Base

Processing Flow

  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.