Skip to content

Does Bedrock converse() API support citations from KB?

0

Does Bedrock converse() API (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) support citations from the knowledge base? I am looking at CitationsConfig (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_CitationsConfig.html) which says it supports citations, but I am not sure if it just cites from the attached document along with the prompt or does it cite from the Knowledge base? If not, is there a way to get citations from the Knowledge base using converse() API?

1 Answer
0

Yes, the Bedrock Converse API supports citations through the CitationsConfig parameter. When enabled, this configuration allows the model to include citation information that links generated content back to specific source documents.

However, it's important to note that the citations in the Converse API are different from knowledge base citations. The CitationsConfig in Converse API is primarily designed to cite documents that are attached directly to the prompt, not to automatically retrieve and cite information from a knowledge base.

For knowledge base citations specifically, you would typically use the RetrieveAndGenerate API operation, which is designed to query a knowledge base and generate responses based on the retrieved data. The RetrieveAndGenerate response contains citation events that link the generated content to the knowledge base sources. These citations include the generated response part and information about the source, such as content, metadata, and location.

If you specifically need knowledge base citations, the recommended approach would be to use the RetrieveAndGenerate API rather than the Converse API. The RetrieveAndGenerate API is specifically designed for knowledge base integration and provides more robust citation capabilities for knowledge base sources.
Sources
Query a knowledge base and generate responses based off the retrieved data - Amazon Bedrock
Citation - Amazon Bedrock
CitationsConfig - Amazon Bedrock

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.