[GH-ISSUE #8211] Examples in tag template #30569

Closed
opened 2026-04-25 04:48:24 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @robertvazan on GitHub (Dec 30, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8211

Feature Request

Is your feature request related to a problem? Please describe.

Smaller models like qwen2.5:0.5b usually fail to produce tags with the current default template.

Describe the solution you'd like

The template below works better thanks to examples and more conventional formatting:

Generate 1-3 broad tags categorizing the main themes of the chat history, along with 1-3 more specific subtopic tags.

JSON format: { "tags": ["tag1", "tag2", "tag3"] }

Examples:
- { "tags": ["Programming", "Java", "Unit tests"] }
- { "tags": ["Python", "Documentation", "Server"] }
- { "tags": ["Science", "Article summary", "Quantum computers"] }

Guidelines:
- Start with high-level domains (e.g. Science, Technology, Philosophy, Arts, Politics, Business, Health, Sports, Entertainment, Education)
- Consider including relevant subfields/subdomains if they are strongly represented throughout the conversation
- If content is too short (less than 3 messages) or too diverse, use only ["General"]
- Use the chat's primary language; default to English if multilingual
- Prioritize accuracy over specificity

RESPOND ONLY WITH THE JSON CODE.

<chat_history>
{{MESSAGES:END:6}}
</chat_history>

I actually have other customizations in the template (notably {{prompt:middletruncate:1000}} instead of {{MESSAGES:END:6}}), but examples and the ALL CAPS at the end are probably the key changes. Examples listed in this template are rather random and they could use broadening into non-technical areas, but the point is to focus on examples that small models understand instead of lengthy instructions that tend to be challenging even for frontier models.

Originally created by @robertvazan on GitHub (Dec 30, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/8211 # Feature Request **Is your feature request related to a problem? Please describe.** Smaller models like `qwen2.5:0.5b` usually fail to produce tags with the current default template. **Describe the solution you'd like** The template below works better thanks to examples and more conventional formatting: ``` Generate 1-3 broad tags categorizing the main themes of the chat history, along with 1-3 more specific subtopic tags. JSON format: { "tags": ["tag1", "tag2", "tag3"] } Examples: - { "tags": ["Programming", "Java", "Unit tests"] } - { "tags": ["Python", "Documentation", "Server"] } - { "tags": ["Science", "Article summary", "Quantum computers"] } Guidelines: - Start with high-level domains (e.g. Science, Technology, Philosophy, Arts, Politics, Business, Health, Sports, Entertainment, Education) - Consider including relevant subfields/subdomains if they are strongly represented throughout the conversation - If content is too short (less than 3 messages) or too diverse, use only ["General"] - Use the chat's primary language; default to English if multilingual - Prioritize accuracy over specificity RESPOND ONLY WITH THE JSON CODE. <chat_history> {{MESSAGES:END:6}} </chat_history> ``` I actually have other customizations in the template (notably `{{prompt:middletruncate:1000}}` instead of `{{MESSAGES:END:6}}`), but examples and the ALL CAPS at the end are probably the key changes. Examples listed in this template are rather random and they could use broadening into non-technical areas, but the point is to focus on examples that small models understand instead of lengthy instructions that tend to be challenging even for frontier models.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#30569