-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Change code tags to xml #1442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change code tags to xml #1442
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
| This plan should involve individual tasks based on the available tools, that if executed correctly will yield the correct answer. | ||
| Do not skip steps, do not add any superfluous steps. Only write the high-level plan, DO NOT DETAIL INDIVIDUAL TOOL CALLS. | ||
| After writing the final step of the plan, write the '\n<end_plan>' tag and stop there. | ||
| After writing the final step of the plan, write the '<end_plan>' tag and stop there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not aligning this tag as well, and use </plan> instead of <end_plan>?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here since there's no opening tag , maybe alone would be strange?
The idea of <end_plan> is to cut generation and prevent the model from doing anything else after generating its plan.
| 10. Don't give up! You're in charge of solving the task, not providing directions to solve it. | ||
| {%- if custom_instructions %} | ||
| Here are custom instructions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are custom instructions:
Does this sentence add value to the prompt? Does the LLM treat differently "custom instructions" versus "regular"(?) instructions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I've removed this sentence since it adds little value.
| assert "```python" in tool_message.content | ||
| else: | ||
| assert expected in tool_message.content | ||
| assert expected in tool_message.content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the if/else here since I didn't see why it was needed!
albertvillanova
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Co-authored-by: Albert Villanova del Moral <[email protected]>
Change code tags to XML to align with the widespread usage of XML tags within chat template for most LLMs.
For instance gemma-3 chat template uses XML formatting: check it out here. Many other models also use XML: Qwen for instance.
Testing XML tags on models like GPT-4o, Claude-4-Sonnet, Llama-3.1 8B & 70B, or Mistral 7B, didn't show any performance degradation.