[feat]: Better default prompt for title generation #717

Closed
opened 2025-11-11 14:29:43 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @yeenbean on GitHub (Apr 24, 2024).

Is your feature request related to a problem? Please describe.
I'm frustrated with the default title generation prompt because many models ignore its 3-5 word limit or prepend titles with unnecessary text like "Here is a 3-5 word concise title: [title]". Some language models will also include markdown in the generated title, or create a title that does not fit the content entirely.

Describe the solution you'd like
To improve QoL, Open WebUI should adopt a stronger prompt that accurately guides language models. Based on my testing across three models (Gemma, LLaMA, and Solar), I've found a revised prompt that works well. I recommend using it as a starting point to strengthen the default prompt.

Create a concise, 3-5 word phrase as a title for the content below. Never exceed the 3-5 word limitation. You must only respond with the title. Do not respond with more than the title. Do not wrap the title around quotation marks.

Content: {{prompt}}

Additional context

Using the current default prompt:
Screenshot 2024-04-24 at 07 46 58

Using the suggested prompt above:
Screenshot 2024-04-24 at 07 48 23

Originally created by @yeenbean on GitHub (Apr 24, 2024). **Is your feature request related to a problem? Please describe.** I'm frustrated with the default title generation prompt because many models ignore its 3-5 word limit or prepend titles with unnecessary text like "Here is a 3-5 word concise title: [title]". Some language models will also include markdown in the generated title, or create a title that does not fit the content entirely. **Describe the solution you'd like** To improve QoL, Open WebUI should adopt a stronger prompt that accurately guides language models. Based on my testing across three models (Gemma, LLaMA, and Solar), I've found a revised prompt that works well. I recommend using it as a starting point to strengthen the default prompt. ``` Create a concise, 3-5 word phrase as a title for the content below. Never exceed the 3-5 word limitation. You must only respond with the title. Do not respond with more than the title. Do not wrap the title around quotation marks. Content: {{prompt}} ``` **Additional context** Using the current default prompt: <img width="241" alt="Screenshot 2024-04-24 at 07 46 58" src="https://github.com/open-webui/open-webui/assets/7747985/aa124be1-9a7c-4aa9-9036-ce8ea09e8ed3"> Using the suggested prompt above: <img width="241" alt="Screenshot 2024-04-24 at 07 48 23" src="https://github.com/open-webui/open-webui/assets/7747985/0114d982-d93f-4a1b-b4b8-8d718b2f6ef2">
Author
Owner

@justinh-rahb commented on GitHub (Apr 24, 2024):

Related thread in discussions with a lot of testing data, let's keep further discussion of this matter here:

@justinh-rahb commented on GitHub (Apr 24, 2024): Related thread in discussions with a lot of testing data, let's keep further discussion of this matter here: - #1692
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#717