From 141edb30b43c6447a401ca3816e34f1ad1b41c8b Mon Sep 17 00:00:00 2001 From: root Date: Wed, 17 Dec 2025 18:54:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8D=95=E6=AD=A5=E7=94=9F?= =?UTF-8?q?=E6=88=90=E7=9A=84prompt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/scheduler/mcp_agent/prompt.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/scheduler/mcp_agent/prompt.py b/apps/scheduler/mcp_agent/prompt.py index 63fea6ad..71f605b4 100644 --- a/apps/scheduler/mcp_agent/prompt.py +++ b/apps/scheduler/mcp_agent/prompt.py @@ -1108,7 +1108,8 @@ GEN_STEP: dict[LanguageType, str] = { 3.不要选择不存在的工具。 4.如果你认为当前已经达成了用户的目标,可以直接返回Final工具,表示计划执行结束。 5.tool_id中的工具ID必须是当前工具集合中存在的工具ID,而不是工具的名称。 - 6.工具在 XML标签中给出,工具的id在 下的 XML标签中给出。 + 6.如果在历史记录中一个工具执行三次以上的连续失败或者是没有返回需要的信息,则在下一次步骤中不要再使用该工具。 + 7.工具在 XML标签中给出,工具的id在 下的 XML标签中给出。 # 样例 1 # 目标 @@ -1189,10 +1190,13 @@ GEN_STEP: dict[LanguageType, str] = { Please generate a new step based on the user's goal, current plan, and history. # A good plan step should: - 1. Use the most appropriate tool for the current step. - 2. Complete the tasks at each stage based on the current plan and history. - 3. Do not select a tool that does not exist. - 4. If you believe the user's goal has been achieved, return to the Final tool to complete the plan execution. + 1. Use the most appropriate tool to complete the current step. + 2. Be able to complete phased tasks based on the current plan and history. + 3. Do not choose non-existent tools. + 4. If you believe that the user's goal has already been achieved, you can directly return the Final tool, indicating that the plan execution is complete. + 5. The tool_id must be the tool ID that exists in the current tool set, not the name of the tool. + 6. If a tool has failed more than three consecutive times in the history or has not returned the required information, do not use that tool in the next step. + 7. The tools are given in the XML tags, and the tool IDs are given in the XML tags under # Example 1 # Objective -- Gitee