Skip to content
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

Make anthropic tool reminder injection optional #701

Conversation

tw-aisi
Copy link
Contributor

@tw-aisi tw-aisi commented Oct 15, 2024

Only one of this PR and #700 should be merged. These two PRs are two variants of a fix.

This PR contains:

  • New features
  • Changes to dev-tools e.g. CI config / github tooling
  • Docs
  • Bug fixes
  • Code refactor

What is the current behavior? (You can also link to an open issue here)

Currently, whenever we call an Anthropic model with tool calls enabled, a system message "Before answering, explain your reasoning step-by-step in tags." is forcibly injected at the end of the existing system message.

This injection cannot be turned off and is very difficult to detect in the log viewer -- you can see it in the json details of the transcript log which logs raw model requests but not the main Messages view.

What is the new behavior?

The existing behavior is maintained but can now be turned off by setting the anthropic_tool_reminder_injection flag in GenerateConfig. This flag can also be adjusted using the environment variable ANTHROPIC_TOOL_REMINDER_INJECTION and the CLI flag --anthropic-tool-reminder-injection or --no-anthropic-tool-reminder-injection.

An alternate solution is to remove this behavior entirely and give no option for turning it back on (unless the user hardcodes it in at some higher layer of the stack). #700 implements the complete removal change.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No.

@jjallaire
Copy link
Collaborator

Closing in lieu of #700

@jjallaire jjallaire closed this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants