Select Language:
When working with AWS Bedrock, you will come across two different types of IDs: the $SOURCE_ID$ and the x-amz-bedrock-kb-chunk-id. Understanding the role of each can help you better manage how your system retrieves information and displays responses.
The $SOURCE_ID$ is a placeholder used in the agent’s orchestration prompt template. This placeholder gets replaced with a simple, easy-to-read code that represents each source document or reference. For example, you might see short 4-character codes like pSGY or t9zu in the final answer. These are simplified IDs that make it easier for users to see where the information originated from, without cluttering the response with long, complex identifiers.
On the other hand, the x-amz-bedrock-kb-chunk-id is a system-generated ID that the system assigns to each piece of content in your knowledge base. These IDs are long, usually between 20 and 30 characters, and are used internally by Bedrock to keep track of each content chunk during the retrieval process. They aren’t intended for user viewing but are crucial for managing data within the system.
In summary, the long internal chunk IDs help Bedrock find and organize the content behind the scenes, while the shorter IDs replace the internal ones in responses to make the information more understandable for users. The process involves mapping between these two types of IDs—using the long IDs for system functions and the short ones for display—to create a smooth experience.
If you’re setting up or troubleshooting your system, knowing this difference can help you better understand how your knowledge base works within AWS Bedrock. For more details, you can refer to official AWS resources or documentation that explain how content chunking and ID management operate behind the scenes.




