fix(prompts): disambiguate skills from tools to prevent direct-call failures#330
Open
sridhar-3009 wants to merge 1 commit into
Open
fix(prompts): disambiguate skills from tools to prevent direct-call failures#330sridhar-3009 wants to merge 1 commit into
sridhar-3009 wants to merge 1 commit into
Conversation
…ailures Weaker models (Qwen72B and others) misread the skills listing in the system prompt and call e.g. tavily-search(query="...") directly instead of skill(name="tavily-search"). The call fails with "unknown tool" because skills are not registered as tools — they are accessed exclusively through the skill tool. The previous wording was too subtle: "invoke it with skill(name="<skill_name>")" Changes: - Lead with "IMPORTANT: Skills are NOT tools. Do NOT call them as direct function calls." - Show a concrete invocation example using the first real skill name (e.g. skill(name="tavily-search")) instead of the abstract placeholder "<skill_name>" that models tend to ignore. - Explicitly state that calling a skill name directly as a tool will fail with "unknown tool", giving the model a clear failure signal to avoid. - Relabel the skill list with the reminder "(access each via skill(name="<name>"))" so the correct pattern stays visible next to every entry. Fixes HKUDS#292
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.
Summary
Closes #292
Weaker models (Qwen72B and similar) read the skills listing in the system prompt and call the skill name directly as a tool — e.g.
tavily-search(query="...")— instead of the correctskill(name="tavily-search"). The call fails with"unknown tool: tavily_search"because skills are not registered as tools; they are accessed exclusively through theskillbuilt-in tool.Root cause (confirmed in issue comment): The previous instruction said:
The abstract placeholder
<skill_name>is easy for a model to treat as a formatting hint rather than a literal pattern. Combined with the listing format- **tavily-search**: Search the web..., the model mistakes the skill name for a registered tool name.Fix: Three changes to
_build_skills_section():IMPORTANT: Skills are NOT tools. Do NOT call them as direct function calls.<skill_name>, so the model seesskill(name="tavily-search")verbatim.Before:
After:
Test plan
skill(name="tavily-search")instead oftavily-search(query="...").