Remove system prompt requirement for xml tags to be on their own line

This commit is contained in:
Saoud Rizwan
2024-10-04 16:24:58 -04:00
parent 61068fb387
commit 766ead99dd
2 changed files with 48 additions and 75 deletions

View File

@@ -14,20 +14,27 @@ export const formatResponse = {
`[ERROR] You did not use a tool in your previous response! Please retry with a tool use.
# Instructions for Tool Use
Tool uses are formatted with the name of the tool enclosed in XML tags on their own line.
Each parameter is defined within its own set of XML tags, also each on their own line.
Example:
Tool uses are formatted using XML-style tags. The tool name is enclosed in opening and closing tags, and each parameter is similarly enclosed within its own set of tags. Here's the structure:
<tool_name>
<parameter1_name>
value1
</parameter1_name>
<parameter2_name>
value2
</parameter2_name>
<parameter1_name>value1</parameter1_name>
<parameter2_name>value2</parameter2_name>
...
</tool_name>
Ensure that each tool use follows this structure for consistent parsing and execution.
For example:
<attempt_completion>
<result>
I have completed the task...
</result>
</attempt_completion>
Always adhere to this format for all tool uses to ensure proper parsing and execution.
# Next Steps
If you have completed the user's task, use the attempt_completion tool.
If you require additional information from the user, use the ask_followup_question tool.
Otherwise, if you have not completed the task and do not need additional information, then proceed with the next step of the task.