-
Notifications
You must be signed in to change notification settings - Fork 15
Agents for Amazon Bedrock Runtime not returning source metadata in APIs #746
Comments
@tim-finnigan Any ETA on this? |
I was getting crazy searching for a parameter, flag or configuration I missed in order to show the source metadata. Thanks god I've found this open issue. |
I was able to resolve this by upgrading to boto3 1.34.118 |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Hi @adoyon23 Did you have to enable or configure something else? |
Hi @tim-finnigan - I am still not able to find resolution for this issue. invoke_agent still doesnt have metadata in the output. |
Hi @edu2105 @sriram-aws thanks for following up. After speaking with an engineer on the Bedrock team, I was told that they are aware of this issue and are planning a fix soon. Will keep this open to track for now. |
@tim-finnigan - Thanks for the update! |
Hi, I'm experiencing an issue with the bedrock-agent-runtime retrieve_and_generate service. When I invoke this service, the retrievedReferences (retrieve metadata) is not included in the response. This functionality worked until the middle of last week, but it has since stopped working with any version of boto3. Please confirm if this is related to this issue, or should I open a new bug report it? python: 3.11 Request:
Response:
|
@motigors that appears to be a related issue. No timeline on addressing this but the Bedrock team informed me that they are working on it. |
Thanks for the update |
@tim-finnigan I'm having a similar issue, but with the bedrock-agent-runtime I'm glad to see this is being worked on! If there are any updates, it'd be great to hear. If my issue is unrelated, I can open a new issue if there isn't a relevant one already. Here's some info about what I was doing in case it helps. I haven't been able use a Python 3.12 response = bedrock_agent_runtime_client.retrieve(
knowledgeBaseId="ABC1234567",
# nextToken="",
retrievalConfiguration={
"vectorSearchConfiguration": {
"numberOfResults": 6,
}
},
retrievalQuery={
"text": "some information"
}
) Response:
|
I've run into this bug as well. Any updates? |
We were informed by the Bedrock team that this should be fixed now, please try updating to the latest version of your SDK and let us know if still running into any issues. |
I'm still having the issue with the When I check the retrieval results, I'm expecting to get something like this (from the documentation).
But the only keys in the retrieval results I'm getting are "content", "location", and "score". The other day I created a new knowledge base using Pinecone for the vector database hoping that might have a different response, but it was the same. When I check the vector database in Pinecone though, I'm see that all of the metadata from the metadata files I created has been included. Let me know if there's any more information I can provide that might help. |
I'll see if I can manually upgrade the boto3 version in the lambda function. It's currently running the latest execution environment supported version of the SDK as far as I know. From what I've seen, there's not an official way to upgrade the package within Lambda. If you know of a way, please let me know. |
Here is documentation on bundling Python dependencies like Boto3 in Lambda: https://docs.aws.amazon.com/lambda/latest/dg/python-package.html. Also this Knowledge Center post: https://repost.aws/knowledge-center/lambda-python-runtime-errors. |
@tim-finnigan It worked! That was my first time creating a deployment package with dependencies as a layer, but that Knowledge Center post saved me. I'm correctly getting all of the metadata attributes in the Is there somewhere that tracks when the supported version of the SDK for Lambda functions will be updated? For now, I can just leave this layer in place until it catches up with the latest version of the SDK. Thanks for your help! |
Hi @tim-finnigan thanks for the update! This is the log showing that I'm using the latest boto3 version And this is part of the log where you can see that only gives back the
|
Friends, the fact that the metadata is being returned now is fabulous. However, my Bedrock knowledge base S3 bucket is populated with documents that have our custom metadata, such as |
Hi @malikalimoekhamedov from my understanding, only the metadata attributes that were included within For the invoke_agent() method, I was not able to find them even using the latest boto3 version. If you are using another method, maybe you will be able to get your metadata in the response. |
Since the original issue was addressed here (and that was confirmed by the Bedrock team) I'm going to close this as resolved. The issue involving |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Original issue: boto/boto3#4124 (ref: P131777621)
The text was updated successfully, but these errors were encountered: