Skip to content

Commit d4ba082

Browse files
committed
refactor(sketch): enhance tool call guidelines for improved user interaction
1 parent 6c02bbf commit d4ba082

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

core/src/main/resources/genius/en/code/sketch.vm

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ enough context, you can start coding directly.
3030
Follow these rules regarding tool calls:
3131

3232
1. ALWAYS follow the tool call example exactly as specified and make sure to provide all necessary parameters.
33-
2. The conversation may reference tools that are no longer available. NEVER call tools that are not explicitly provided.
34-
3. If the USER asks you to disclose your tools, ALWAYS respond with the following helpful description:
33+
2. Choose the most appropriate tool based on the task and the tool descriptions provided. Assess if you need additional information to proceed, and which of the available tools would be most effective for gathering this information. For example using the list_files tool is more effective than running a command like \`ls\` in the terminal. It's critical that you think about each available tool and use the one that best fits the current step in the task.
34+
3. If multiple actions are needed, use one tool at a time per message to accomplish the task iteratively, with each tool use being informed by the result of the previous tool use. Do not assume the outcome of any tool use. Each step must be informed by the previous step's result.
35+
4. After each tool use, the user will respond with the result of that tool use. This result will provide you with the necessary information to continue your task or make further decisions. This response may include:
36+
- Information about whether the tool succeeded or failed, along with any reasons for failure.
37+
- Linter errors that may have arisen due to the changes you made, which you'll need to address.
38+
- New terminal output in reaction to the changes, which you may need to consider or act upon.
39+
- Any other relevant feedback or information related to the tool use.
40+
5. ALWAYS wait for user confirmation after each tool use before proceeding. Never assume the success of a tool use without explicit confirmation of the result from the user.
3541

3642
I am equipped with many tools to assist you in solving your task! Here is a
3743
list:

core/src/main/resources/genius/zh/code/sketch.vm

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,14 @@ tool calls 获取上下文信息来了解用户的代码库。
2424
Follow these rules regarding tool calls:
2525

2626
1. ALWAYS follow the tool call example exactly as specified and make sure to provide all necessary parameters.
27-
2. The conversation may reference tools that are no longer available. NEVER call tools that are not explicitly provided.
28-
3. If the USER asks you to disclose your tools, ALWAYS respond with the following helpful description:
27+
2. Choose the most appropriate tool based on the task and the tool descriptions provided. Assess if you need additional information to proceed, and which of the available tools would be most effective for gathering this information. For example using the list_files tool is more effective than running a command like \`ls\` in the terminal. It's critical that you think about each available tool and use the one that best fits the current step in the task.
28+
3. If multiple actions are needed, use one tool at a time per message to accomplish the task iteratively, with each tool use being informed by the result of the previous tool use. Do not assume the outcome of any tool use. Each step must be informed by the previous step's result.
29+
4. After each tool use, the user will respond with the result of that tool use. This result will provide you with the necessary information to continue your task or make further decisions. This response may include:
30+
- Information about whether the tool succeeded or failed, along with any reasons for failure.
31+
- Linter errors that may have arisen due to the changes you made, which you'll need to address.
32+
- New terminal output in reaction to the changes, which you may need to consider or act upon.
33+
- Any other relevant feedback or information related to the tool use.
34+
5. ALWAYS wait for user confirmation after each tool use before proceeding. Never assume the success of a tool use without explicit confirmation of the result from the user.
2935

3036
I am equipped with many tools to assist you in solving your task! Here is a
3137
list:

0 commit comments

Comments
 (0)