-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tools SDK BUG in Response] Using tools sdk, and Sonnet model, the model rather than returning a text block with "thinking" followed by a "tool_use" block, it returns all as text inside the first "text" block #381
Comments
I root caused the main affecting factor causing it to burst being a system prompt like this:
My idea here was to provide some good examples for Haiku to guide its decisions. Maybe all those examples should be removed from system prompt and rather added to "description" inside each individual tool for max performance? I imagine it will do; but I think still nice to report this here so you guys are aware that it can be easily be bricked, even if you try to instruct it to do the same thing it is supposed to do. |
Example:
Response content of ToolMessage on a prompt "change theme to blue":
Of course, it is returning stop reason as end_turn rather than tool_use, which indicates we have a problem either with the underlaying model, or the SDK, or API or both:
The funny thing, is that this does not happen with Haiku and Opus after extensive testing (it still create two separate blocks, like "text" and "tool_use"). However, it does happen if you are using Sonnet, all the time. Of course, I can implement a parser, since it seems to get right 99% of the time. The problem is just that the object structure it is returning is not what we see on https://docs.anthropic.com/claude/docs/tool-use#best-practices-for-tool-definitions
The text was updated successfully, but these errors were encountered: