fix: improve system prompt and tool argument validation#1346
Open
ilonae wants to merge 1 commit intoFoundationAgents:mainfrom
Open
fix: improve system prompt and tool argument validation#1346ilonae wants to merge 1 commit intoFoundationAgents:mainfrom
ilonae wants to merge 1 commit intoFoundationAgents:mainfrom
Conversation
- Improve system prompt to discourage unnecessary tool use - Added validation for missing required tool arguments Fixes #[1345]
55e2a36 to
ca0db6b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1345
Features
Feature Docs
N/A - Bug fix for existing functionality
Influence
This fix addresses a critical usability issue where simple factual questions (e.g., "where is Boston?") would trigger unnecessary tool calls without required parameters, resulting in TypeErrors.
Impact:
Result
Before fix:
TypeError: PythonExecute.execute() missing 1 required positional argument: 'code'
After fix:
Simple query: "where is Boston?"
"Tool 'python_execute' was called with missing required arguments.
missing 1 required positional argument: 'code'.
Please ensure all required parameters are provided when calling this tool."