- Newest
- Most votes
- Most comments
Hi there,
This behavior is actually the expected functionality of the tool implementation architecture. The standard tool execution workflow follows this sequence:
- The calling application submits tool definitions and an initiating message to the language model
- Upon matching a tool definition, the model generates a tool use request with appropriate parameters
- The calling application extracts these parameters and routes them to the corresponding local tool function
- The calling application can either:
- Utilize the tool result directly
- Return the result to the model for additional processing
- The model then either generates a final response or initiates another tool request
The observed pausing occurs because the model is generating the tool request but not automatically executing it. The subsequent user prompt triggers the complete workflow of tool execution and response generation.
To resolve this, you'll need to implement an additional Converse API call that handles the tool request and returns the tool output to the user.
For detailed implementation guidance, please reference:
Tool workflow documentation: https://builder.aws.com/content/2hW5367isgQOkkXLYjp4JB3Pe16/intro-to-tool-use-with-the-amazon-bedrock-converse-api Code examples for tool request handling: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use-examples.html
answered a year ago
This inconsistent tool calling behavior with Amazon Nova Sonic appears to be related to how the model decides when to use tools. The issue you're experiencing is that the model sometimes gathers the necessary parameters but doesn't immediately proceed to call the tool.
To address this issue, you can try the following approaches:
- Use the
toolChoiceparameter to more explicitly control tool usage:
- Set
toolChoiceto "any" to force the model to select at least one available tool each time - Set
toolChoiceto "tool" with a specific tool name to force the model to use that particular tool - The default "auto" setting leaves tool selection entirely up to the model, which may be causing your inconsistency
- Optimize your tool configurations:
- Ensure your tool descriptions are clear and specific
- Use descriptive tool names that clearly indicate their function
- Make sure your input schema is well-defined
- Consider your temperature and top_p settings:
- While you've already set temperature and top_p to "greedy" levels (1.0), you might try reducing temperature further (closer to 0) to make the model's behavior more deterministic
- This can help ensure more consistent tool calling patterns
- Improve your system prompt:
- Include explicit instructions about when tools should be called
- Specify the expected conversation flow
- Provide clear guidance on gathering parameters and immediately using tools once parameters are collected
The key issue appears to be that the model sometimes enters a "thinking" state after collecting parameters rather than proceeding directly to tool use. By using the toolChoice parameter and optimizing your prompts, you should be able to achieve more consistent tool calling behavior.
Sources
Tool choice with Amazon Nova models | AWS Machine Learning Blog
Invoking a tool - Amazon Nova
answered a year ago
Relevant content
asked 6 months ago
asked 8 months ago

Hello,
Thank you for providing your insights.
I want to provide additional clarifications about the problem because the sequence of events do not point to a problem of tool request not being executed as you suggested. Rather the tool request was never generated by the LLM in the first place.
I'm particularly working the Nova Sonic speech model. I have a function to process the
toolUseevents sent by the LLM when it decides to call a tool. That is how I got the expected behavior for about 85% of the time. However, the issue with tool calling I'm experiencing (for about 25% of the times) is thetoolUseevent was never generated by the LLM. Since notoolUseevent was generated therefore my local code did not execute the tool function. The question I have then, why notoolUseevent generated by the LLM for those 25% of the times despite the LLM asking the user for the parameter values needed to the tool, then receiving those parameter values and then tell user that it is performing the task.