Skip to content

Bedrock agent action incorrectly exceeds 25Kb response limit?

0

I have a bedrock agent with one of the actions that invokes a lambda to fetch additional data to be incorporated as part of its response. The additional data is a huge text file so I could not return it as a response from Lambda function because we have a 25KB limit to response to agent. So i tried to instead create a presigned s3 url and instructed the agent to download the s3 url and analyze it as part of the response. however I keep getting error about 25kb response limit exceeded. It appears that the agent treats the contents of the s3 url as part of lambda's response? Is there any alternative way to do this?

1 Answer
1

Take a look at the Bedrock Serverless Prompt Chaining example from the Bedrock documentation. This example demonstrates workflow orchestration using Step Functions or Bedrock Flows which would allow you to break down your steps.

AWS

answered 2 years ago

  • This solution basically means not to use Agents. Agents can do prompt chaining internally without needing step functions.

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.