[Bug] Custom system prompt and Modelfile system prompt not reaching Ollama #998

Closed
opened 2025-11-11 14:35:17 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Serbaf on GitHub (May 21, 2024).

Bug Report

Description

Bug Summary:
The system prompt set at Settings -> General -> System prompt is being totally ignored lately (it has correctly worked in my setup previously). Also, I have some Modelfiles defined with their own embedded system prompts. These sometimes do work, but not always.

Steps to Reproduce:
My environment consists in an Open WebUI instance in a server and an Ollama being served in a different machine.
In my user account I have the following content in Settings -> General -> System Prompt:

Eres un pirata y no puedes evitar mostrarlo al hablar. Además, siempre te acompaña tu dicharachero loro pirata, Barbeque

In addition, I have some modelfiles with a system prompt defined. E.g.:

FROM llava:7b-v1.6-mistral-q4_0

SYSTEM """

You are an expert image analysis assistant with industry experience across all facets, often used as a forensic expert to analyze evidence and advise commercial and government clients on how to use equipment to take photographs and the processing and post-production that could be applied to them. When I present you with an image, do the following:

Create a working title of the Photo.

Write a brief overview of the photo, capturing its essence and setting the scene.

Describe the photo's main subject(s) in detail, including any interesting features or characteristics.

Write an analysis of the photo's composition, such as framing, perspective, and use of light. Highlight any unique elements that draw the viewer's attention.

Describe the emotional impact or mood conveyed by the photo. Consider the feelings it evokes and any storytelling elements present.

If not described in the prompt, invent some fictional information about where the photo was taken, including geographic location or any relevant contextual details that enhance its significance.

Include technical information such as making an assumption or best guess of the camera settings, lens used, and any post-processing techniques employed.

Additional Notes: Invent additional information or anecdotes that add to the story behind the photo or its creation process.

""""

Starting a new chat with any model will trigger the 1st kind of bug (user defined system prompt) for me.
The 2nd bug (Modelfile defined system prompt) is triggered when asking the model instance derived from that Modelfile.

Expected Behavior:
I expect my user defined system prompt to always be passed to the Ollama model and receive a response which is coherent with it. And I expect models defined with a Modelfile to also take into account the specified instructions.

Actual Behavior:
Models are responding in a way that is totally unaware of both system prompts. In fact, in the Ollama logs I am seeing that the system prompts are not reaching it (details in logs and screenshots below).

Environment

  • Open WebUI Version: 0.1.125

  • Ollama (if applicable): 0.1.38

  • Operating System: Ubuntu 22.04

  • Browser (if applicable): Firefox 126.0

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:
[Include relevant Docker container logs, if applicable]

Screenshots (if applicable):
Case 1: conversation with a regular llama3-3B model

  1. I have this system prompt defined:

image

  1. Then I make the following interaction:
    image

  2. The request as shown in the browser console (no trace of the system prompt):

image

Case 2: conversation with a Modelfile instanced model

  1. The Modelfile:

image

  1. Then I make the following interaction:

image

  1. The request as shown in the browser console (no trace of the Modelfile prompt):

image

Installation Method

We are using Docker Compose to setup the Open WebUI.

Additional Information

It stopped working some days ago. To my knowledge, the only relevant changes I did since then were some updatings of the Ollama and Open WebUI versions.

Thank you!

Originally created by @Serbaf on GitHub (May 21, 2024). # Bug Report ## Description **Bug Summary:** The system prompt set at Settings -> General -> System prompt is being totally ignored lately (it has correctly worked in my setup previously). Also, I have some Modelfiles defined with their own embedded system prompts. These sometimes do work, but not always. **Steps to Reproduce:** My environment consists in an Open WebUI instance in a server and an Ollama being served in a different machine. In my user account I have the following content in Settings -> General -> System Prompt: > Eres un pirata y no puedes evitar mostrarlo al hablar. Además, siempre te acompaña tu dicharachero loro pirata, Barbeque In addition, I have some modelfiles with a system prompt defined. E.g.: > FROM llava:7b-v1.6-mistral-q4_0 > > SYSTEM """ > > You are an expert image analysis assistant with industry experience across all facets, often used as a forensic expert to analyze evidence and advise commercial and government clients on how to use equipment to take photographs and the processing and post-production that could be applied to them. When I present you with an image, do the following: > > Create a working title of the Photo. > > Write a brief overview of the photo, capturing its essence and setting the scene. > > Describe the photo's main subject(s) in detail, including any interesting features or characteristics. > > Write an analysis of the photo's composition, such as framing, perspective, and use of light. Highlight any unique elements that draw the viewer's attention. > > Describe the emotional impact or mood conveyed by the photo. Consider the feelings it evokes and any storytelling elements present. > > If not described in the prompt, invent some fictional information about where the photo was taken, including geographic location or any relevant contextual details that enhance its significance. > > Include technical information such as making an assumption or best guess of the camera settings, lens used, and any post-processing techniques employed. > > Additional Notes: Invent additional information or anecdotes that add to the story behind the photo or its creation process. > > """" Starting a new chat with any model will trigger the 1st kind of bug (user defined system prompt) for me. The 2nd bug (Modelfile defined system prompt) is triggered when asking the model instance derived from that Modelfile. **Expected Behavior:** I expect my user defined system prompt to always be passed to the Ollama model and receive a response which is coherent with it. And I expect models defined with a Modelfile to also take into account the specified instructions. **Actual Behavior:** Models are responding in a way that is totally unaware of both system prompts. In fact, in the Ollama logs I am seeing that the system prompts are not reaching it (details in logs and screenshots below). ## Environment - **Open WebUI Version:** 0.1.125 - **Ollama (if applicable):** 0.1.38 - **Operating System:** Ubuntu 22.04 - **Browser (if applicable):** Firefox 126.0 ## Reproduction Details **Confirmation:** - [X] I have read and followed all the instructions provided in the README.md. - [X] I am on the latest version of both Open WebUI and Ollama. - [X] I have included the browser console logs. - [ ] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** [Include relevant browser console logs, if applicable] **Docker Container Logs:** [Include relevant Docker container logs, if applicable] **Screenshots (if applicable):** **Case 1: conversation with a regular llama3-3B model** 1. I have this system prompt defined: ![image](https://github.com/open-webui/open-webui/assets/39710708/8060b2ef-f4a2-4c0c-8a1e-ef749df30d01) 2. Then I make the following interaction: ![image](https://github.com/open-webui/open-webui/assets/39710708/4b134c17-f581-43f5-8dbf-81aaca65926a) 3. The request as shown in the browser console (no trace of the system prompt): ![image](https://github.com/open-webui/open-webui/assets/39710708/a8060a3f-e732-4f07-8c3c-0971dea4ee98) **Case 2: conversation with a Modelfile instanced model** 1. The Modelfile: ![image](https://github.com/open-webui/open-webui/assets/39710708/cf8c13c7-a981-4bbc-8f35-24de39676877) 2. Then I make the following interaction: ![image](https://github.com/open-webui/open-webui/assets/39710708/6a720d07-b8f6-41c3-ac0e-c9b9ec296e5a) 3. The request as shown in the browser console (no trace of the Modelfile prompt): ![image](https://github.com/open-webui/open-webui/assets/39710708/af667449-3d83-470b-8795-28df0373c5fd) ## Installation Method We are using Docker Compose to setup the Open WebUI. ## Additional Information It stopped working some days ago. To my knowledge, the only relevant changes I did since then were some updatings of the Ollama and Open WebUI versions. Thank you!
Author
Owner

@justinh-rahb commented on GitHub (May 21, 2024):

As usual with any new release, we often do some fixes afterwards that push direct to main and build new Docker images. If you haven't already done so as of 3hrs ago please try re-pulling again.

@justinh-rahb commented on GitHub (May 21, 2024): As usual with any new release, we often do some fixes afterwards that push direct to `main` and build new Docker images. If you haven't already done so as of 3hrs ago please try re-pulling again.
Author
Owner

@Serbaf commented on GitHub (May 22, 2024):

Great, that fixed it, thanks!

@Serbaf commented on GitHub (May 22, 2024): Great, that fixed it, thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#998