memory: disambiguate tool descriptions to reduce agent tool-misuse (measured +34.5 pts)#4519
Open
sujugithub wants to merge 1 commit into
Open
Conversation
Measured with an agent harness (11 scenarios x 5 runs each, live server): agents confused create_entities/add_observations and search_nodes/open_nodes, and padded tasks with unnecessary lookups. With only these description changes: tool hit rate 80.0% -> 100.0%, strict success (right tool + right args + no extra calls) 61.8% -> 96.4%. No behavior changes.
Author
|
The measurement harness is now public: https://github.com/sujugithub/hitrate — the memory scenario suite is |
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.
What
Rewrites 6 tool description strings in
src/memory/index.ts. No code or behavior changes — only the text agents read when choosing tools.Why
Agents pick tools from names + descriptions + schemas alone. I measured how a mid-tier agent actually uses this server (11 realistic scenarios × 5 runs each, live server, every tool call recorded) and found two systematic failures:
create_entitiesvsadd_observations, andsearch_nodesvsopen_nodes— the current descriptions don't say when to prefer the sibling.open_nodes/search_nodesbefore writes and deletes that don't need a lookup first.Measured effect of this diff (nothing else changed)
Method: agent = gpt-oss-120b (a deliberately mid-tier model — weaker agents are hurt most by ambiguous descriptions), N=5 runs per scenario, descriptions applied via in-memory override so before/after used the identical server build. Happy to share the full per-run data and the scenario suite, or re-run against any revision of this text — treat the exact wording as a starting point.
Notes
🤖 Generated with Claude Code