Skip to content

fix: add clarifying instruction to distinguish skills from tools in skill prompt (#2438) [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH] - #2442

Open
waterWang wants to merge 1 commit into
agentscope-ai:mainfrom
waterWang:fix-2438-skill-tool-distinction
Open

fix: add clarifying instruction to distinguish skills from tools in skill prompt (#2438) [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH]#2442
waterWang wants to merge 1 commit into
agentscope-ai:mainfrom
waterWang:fix-2438-skill-tool-distinction

Conversation

@waterWang

Copy link
Copy Markdown

Description

When the agent is asked "what skills do you have" (你有哪些技能?), the LLM response includes both skills (from <available_skills>) and tools from the Toolkit (file management, network requests, memory, etc.). This is because the system prompt lists both, and the LLM naturally includes everything it sees.

Root cause: The AgentSkillPromptProvider.DEFAULT_AGENT_SKILL_INSTRUCTION does not instruct the LLM to distinguish between skills and tools. The <available_skills> section shows skills, but the LLM also sees tool definitions elsewhere in the system prompt and considers them part of its "skills."

Fix: Added a clarifying instruction block after </usage> and before <available_skills> that explicitly tells the LLM:

  • <available_skills> lists only skills (specialized capabilities)
  • Tools (file management, network requests, etc.) are described separately
  • When asked about "what skills you have", list ONLY the skills from <available_skills>
  • Do NOT include tools or tool groups in the skills answer

Testing: This is a prompt-level change. The fix is verified by checking that the instruction text is added to the DEFAULT_AGENT_SKILL_INSTRUCTION constant. No functional code changes were made.

Closes #2438

[FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH]

…kill prompt (agentscope-ai#2438) [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH]
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@oss-maintainer oss-maintainer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review — Approved ✅

Overall: Simple and effective fix for #2438. The prompt clarification correctly instructs the agent to distinguish between skills (from <available_skills>) and tools (from the system prompt).

Analysis:

  1. Root Cause: The agent was conflating skills (specialized capabilities registered via SkillRepository) with tools (general capabilities like file management, network requests, etc.) when responding to "what skills do you have" queries.

  2. Fix: Added a clear instruction in the prompt template:

    • Skills are listed in <available_skills>
    • Tools are described separately in the system prompt
    • When asked about skills, only list from <available_skills>, not tools
  3. Impact: Minimal risk — this is a prompt-only change with no code logic modifications. The instruction is clear and unambiguous.

CI Status: ✅ All checks passed

Verdict: Clean, minimal fix that addresses the reported issue. The prompt instruction is well-worded and should effectively prevent the confusion between skills and tools.

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.

[Bug]:当询问有哪些技能的时候,会把对应的ToolKit里面注册的工具一并带出。

2 participants