- Newest
- Most votes
- Most comments
You're correct that there appears to be an inconsistency in how citation locations are returned in the streaming response from Amazon Bedrock's converseStream operation.
Based on the Amazon Bedrock API documentation, citation locations should indeed contain specific document location information such as documentChar, documentPage, or documentChunk depending on the document type and indexing method. These location types provide precise information about where in the document the cited content was found.
For documentChar locations, you should expect to see fields like documentIndex, start, and end character positions. For documentPage locations, you would see documentIndex along with start and end page numbers. Similarly, documentChunk locations would include documentIndex with start and end chunk identifiers.
The empty "web": {} location you're receiving in the streaming response doesn't match the expected format for document citations. This appears to be inconsistent with how the non-streaming API behaves and with what the API documentation describes.
Since you're experiencing this issue across both JavaScript and Python SDKs, it does suggest this might be a service-side issue rather than an SDK-specific problem. Continuing to work with AWS Support is the right approach, as they would need to investigate why the citation location information is not being properly populated in the streaming response.
Sources
Citation - Amazon Bedrock
CitationsDelta - Amazon Bedrock
CitationLocation - Amazon Bedrock
count_tokens - Boto3 1.40.63 documentation
answered a year ago
Relevant content
asked a year ago
