Bedrock Agents suddenly unable to formulate valid function calls: "406: The function call format is incorrect."

3

In my current application, I use three different bedrock agents running on Claude 3 Sonnet which until two days ago worked just fine.

Now, they almost never succeed to return valid function calls and keep being sent back into thinking by an internal bedrock validation exception. 90% of the attempts now end in a loop of traces with the agent trying to invoke a function call (containing some mistake such as not "forgetting" to close a xml-tag or sthg the like) internally caught by this exception:

<stdout>406: The function call format is incorrect. The format for function calls must be: <invoke> <tool_name>$TOOL_NAME</tool_name> <parameters> <$PARAMETER_NAME>$PARAMETER_VALUE</$PARAMETER_NAME>...</parameters></invoke>.</stdout>

It seems like either the Claude 3 Sonnet model was effectively downgraded, the model's context window is somehow messed up or a new prompting/validation routine has been installed which is much more challenging for the LLM to pass. I can't find information on neither of this. This is a rather unpleasant experience having built a larger application relying on these agents.

Is there any information available on version updates for bedrock agents and bedrock hosted models?

  • Hi Georg, just letting you know that I have started experiencing the same issue with Sonnet and my agent. This would've been a world of pain if I was in Production. AWS needs to step up on this. As a sanity test I created a new agent - same. I created an agent in a new region (SYD) - same. I tried switching to Haiku and Titan - working. But those models aren't fit for my purposes so I need Sonnet working again too.

asked a year ago271 views
1 Answer
0

Hello Georg W, thank you for bringing this to our attention. To be sure we're talking about the same issue, the error message you're receiving indicates that the function calls being generated by Claude 3 Sonnet aren't following the required format, is that correct? If so, here's some potential causes and solutions for this issue:

Recent Changes to Claude 3 Sonnet or Bedrock Service: There might have been updates to the model or the validation process that are affecting how function calls are formatted. AWS occasionally updates models or validation routines which can impact existing implementations.

Prompt Engineering Issues: The model might be struggling with your current prompts in relation to the function calling format. You may need to update your prompts to be more explicit about the required XML format.

Context Window Limitations: If your prompts are lengthy, the model might be losing track of the proper formatting requirements. Try reducing the complexity or length of your prompts.

Troubleshooting Steps: Review and update your prompts to explicitly instruct the model on the correct function call format Test with simplified prompts to isolate the issue Check if there are any Bedrock service quotas or limits you might be hitting Verify if there have been any recent changes to your agent configurations

Temporary Workarounds: Consider adding more explicit instructions in your prompts about the required XML format Try implementing additional validation and retry logic in your application Test with alternative models if available to see if the issue is specific to Claude 3 Sonnet

If you continue to experience issues after trying these steps, I recommend opening a support case with AWS Support for more detailed assistance. They can provide specific information about any recent changes to the Claude 3 Sonnet model or Bedrock service that might be affecting your agents. Also, below you will find additional sources that could help answer your question. Hope this helps. Thank you for using AWS!

Sources:

[1] Amazon Bedrock with Claude Sonnet 3.5 is not working the same as when I access Claude directly | AWS re:Post

[2] Issue with Bedrock Agents and Lambda Function – Model Timeout/Error | AWS re:Post

[3] Flow Bedrock: Error Knowledge Bases | AWS re:Post

profile pictureAWS
answered 11 days 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.

Guidelines for Answering Questions