[GH-ISSUE #4027] [BUG]: Workspace System Prompt is not sent correctly anymore to the embed widget #2562

Closed
opened 2026-02-22 18:30:15 -05:00 by yindo · 6 comments
Owner

Originally created by @Alminc91 on GitHub (Jun 20, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4027

How are you running AnythingLLM?

Docker (remote machine)

What happened?

Hi.

I am using the AnythingLLM version 1.7.6. Newer versions and updates do not seem to send my workspace system prompt to the embed anymore!

Inside the web app the chatbot behaves according to my system prompt, in the embed widget the output can be wild. It seems it disregards the system prompt completely. I also tried to set it in the embed widget with: data-prompt: "example instruction", but to no avail, it is also ignored.

Is this possible or is it just my error? With the version 1.7.6. it works without problems. Same behaviour in embed and workspace chat.

Would appreciate feedback or a solution, if you could check that. Thank you very much!!!

P.S. I would love to have the new system variables feature for date and time. That is great and very useful.

Are there known steps to reproduce?

Latest version:
Create an embed widget of some workspace with a system prompt (tell it to always output some text or format in some way).
Test it: inside the workspace chat it should adhere to your instructions. Inside the embed widget that is not happening.

Originally created by @Alminc91 on GitHub (Jun 20, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4027 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? Hi. I am using the AnythingLLM version 1.7.6. Newer versions and updates do not seem to send my workspace system prompt to the embed anymore! Inside the web app the chatbot behaves according to my system prompt, in the embed widget the output can be wild. It seems it disregards the system prompt completely. I also tried to set it in the embed widget with: data-prompt: "example instruction", but to no avail, it is also ignored. Is this possible or is it just my error? With the version 1.7.6. it works without problems. Same behaviour in embed and workspace chat. Would appreciate feedback or a solution, if you could check that. Thank you very much!!! P.S. I would love to have the new system variables feature for date and time. That is great and very useful. ### Are there known steps to reproduce? Latest version: Create an embed widget of some workspace with a system prompt (tell it to always output some text or format in some way). Test it: inside the workspace chat it should adhere to your instructions. Inside the embed widget that is not happening.
yindo added the possible bug label 2026-02-22 18:30:15 -05:00
yindo closed this issue 2026-02-22 18:30:15 -05:00
Author
Owner

@shatfield4 commented on GitHub (Jun 23, 2025):

I've tested this out and can confirm the data-prompt attribute is being ignored here and we'll make a fix for this to ensure it's working properly.

I have also tried just updating the system prompt in the workspace settings directly and this does change the responses from the embed chat widget as it should.

@shatfield4 commented on GitHub (Jun 23, 2025): I've tested this out and can confirm the `data-prompt` attribute is being ignored here and we'll make a fix for this to ensure it's working properly. I have also tried just updating the system prompt in the workspace settings directly and this does change the responses from the embed chat widget as it should.
Author
Owner

@shatfield4 commented on GitHub (Jun 23, 2025):

Image

When using the data-prompt attribute you must make sure this Enable Prompt Override switch is enabled.

@shatfield4 commented on GitHub (Jun 23, 2025): ![Image](https://github.com/user-attachments/assets/0cf63596-a5e3-43d3-b971-c9e9e032def9) When using the `data-prompt` attribute you must make sure this **Enable Prompt Override** switch is enabled.
Author
Owner

@Alminc91 commented on GitHub (Jun 23, 2025):

Dear @shatfield4 , thank you very much for checking this issue rapidly.

What is strange: I have the embedding and the chat window surely linked to the same workspace (in my case chatbot). When I send messages, the message count and history are updated.

In my system prompt I have two very recognizable parts: print at the beginning WARNING and at the end (in German) I am a chatbot and can make mistakes. Check my responses.

Inside the workspace, this is printed out. In my embed it is not. I have the workspace and widget set to query mode and to two messages for the history. Do you know why that happens or is there a way to check if the workspace prompt is being used in the embed?

Workspace screenshot:
Image

Embed screenshot 1 (no WARNING!!! at the beginning):

Image


Embed screenshot 2 (no chatbot can make mistakes, check responses in German at the end):

Image

I host my own model with vllm for the ai and for embeddings I simply use the openai-small-3 model and LanceDB for vectors. The other configurations are more or less default and it is the only workspace for that test.

If you have any more hints, that would be great! Thank you very much again.

If it helps:

System prompt beginning with the WARNING instruction in German:

Image

Chat Embed of the workspace:

Image

@Alminc91 commented on GitHub (Jun 23, 2025): Dear @shatfield4 , thank you very much for checking this issue rapidly. What is strange: I have the embedding and the chat window surely linked to the same workspace (in my case chatbot). When I send messages, the message count and history are updated. In my system prompt I have two very recognizable parts: print at the beginning WARNING and at the end (in German) I am a chatbot and can make mistakes. Check my responses. Inside the workspace, this is printed out. In my embed it is not. I have the workspace and widget set to query mode and to two messages for the history. Do you know why that happens or is there a way to check if the workspace prompt is being used in the embed? Workspace screenshot: ![Image](https://github.com/user-attachments/assets/756a159d-8ab9-4199-807f-b0e73b37696e) Embed screenshot 1 (no WARNING!!! at the beginning): ![Image](https://github.com/user-attachments/assets/ea7af5f7-ca79-43d3-a51e-4882adc6502f) ------------------------------------------------------------------------------------------------------------------- Embed screenshot 2 (no chatbot can make mistakes, check responses in German at the end): ![Image](https://github.com/user-attachments/assets/98707219-40f6-4278-a465-bf95e935b416) I host my own model with vllm for the ai and for embeddings I simply use the openai-small-3 model and LanceDB for vectors. The other configurations are more or less default and it is the only workspace for that test. If you have any more hints, that would be great! Thank you very much again. If it helps: System prompt beginning with the WARNING instruction in German: ![Image](https://github.com/user-attachments/assets/2de1801d-1628-4f69-b1f5-eeb658df5719) Chat Embed of the workspace: ![Image](https://github.com/user-attachments/assets/bfc8e773-adb6-4867-89fe-0d371ee0eacf)
Author
Owner

@shatfield4 commented on GitHub (Jun 23, 2025):

Do you have the Enable Prompt Override option enabled? You'll need to disable this in order for it to use your workspace's system prompt.

@shatfield4 commented on GitHub (Jun 23, 2025): Do you have the **Enable Prompt Override** option enabled? You'll need to disable this in order for it to use your workspace's system prompt.
Author
Owner

@Alminc91 commented on GitHub (Jun 24, 2025):

@shatfield4 thank you for your reply and help.

It works now...sorry. I had overwritten the embed.js file in my docker setup with an older version.

Do you know if the embed now obtains its chat history limit from the workspace, or is it still the fixed value of 20? Back then, I changed that value manually, because a high value tended to result in more hallucinations in my RAG pipeline.

@Alminc91 commented on GitHub (Jun 24, 2025): @shatfield4 thank you for your reply and help. It works now...sorry. I had overwritten the embed.js file in my docker setup with an older version. Do you know if the embed now obtains its chat history limit from the workspace, or is it still the fixed value of 20? Back then, I changed that value manually, because a high value tended to result in more hallucinations in my RAG pipeline.
Author
Owner

@timothycarambat commented on GitHub (Jun 24, 2025):

It is currently a fixed limit
https://github.com/Mintplex-Labs/anything-llm/blob/c4f49ff6b445f8f1b15d3bd42f8a2d24317b745c/server/utils/chats/embed.js#L37

However, it may make sense to have this be a property server-side on the embed config

@timothycarambat commented on GitHub (Jun 24, 2025): It is currently a fixed limit https://github.com/Mintplex-Labs/anything-llm/blob/c4f49ff6b445f8f1b15d3bd42f8a2d24317b745c/server/utils/chats/embed.js#L37 However, it may make sense to have this be a property server-side on the embed config
yindo changed title from [BUG]: Workspace System Prompt is not sent correctly anymore to the embed widget to [GH-ISSUE #4027] [BUG]: Workspace System Prompt is not sent correctly anymore to the embed widget 2026-06-05 14:47:16 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2562