mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
issue: With "bypass embedding and retrieval" attached files are still sent in a RAG system prompt not with the user message #6490
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mramendi on GitHub (Sep 24, 2025).
Originally assigned to: @tjbck on GitHub.
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.30
Ollama Version (if applicable)
No response
Operating System
RHEL 9
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
After enabling "Bypass embedding and retrieval", any file attached to a chat message becomes a part of the user prompt in the turn of the chat when it si attached. The system prompt is unmodified and no other role="system" messages are added by OWUI.
Actual Behavior
After enabling "Bypass embedding and retrieval", any file attached to a chat message becomes a part of a "RAG system prompt", which becomes a store of all the files ever attached to the thread. This "RAG system prompt" then becomes a message with the "system" role, which can affect LLM behaviour, especially when the main system prompt is a CoT.
Steps to Reproduce
Logs & Screenshots
A screenshot of my admin settings>documents: https://imgur.com/a/4h1w2gK
The first message being prepared https://imgur.com/a/rA1hWmk
The second message being sent - screenchot caught the briedly-appearing messages about sources: https://imgur.com/a/n7NC0eQ
Google Drive link for the S3 storage download for the exchange. The gpt-5-nano request is just the chat title, but the other two are the actual exchange, note exactly where the text file content is. https://drive.google.com/file/d/1MVzU4EdSUluKkmKG39Q4YOlZt4YJo3Rm/view?usp=sharing
The most relevant part of the
time-12-48-17-813581_chatcmpl-ad121799-66dd-4d2e-881d-1b72a0a2c2df.jsonfile:@Classic298 commented on GitHub (Sep 24, 2025):
Add to that, even if all files are in full context mode, RAG queries are still generated
@tjbck commented on GitHub (Sep 24, 2025):
@Classic298 We'll need a new issue for this, @mramendi this behaviour has been modified to use the last user message instead.
@mramendi commented on GitHub (Sep 25, 2025):
Excuse me, modified in what version? @tjbck the logs I included are all from v0.6.30 and that's the latest version according to https://github.com/open-webui/open-webui/releases
Or is this a freshly merged PR and I need to wait for v0.6.31? I checked the PRs and could not find this but maybe it's just me.
@Classic298 commented on GitHub (Sep 25, 2025):
@mramendi in dev - so in the next version
@mramendi commented on GitHub (Sep 25, 2025):
@Classic298 thanks a lot!! if possible I would prefer to see the PR - I'm trying to understand how OWUI functions under the hood - not asking to "review" just to eyeball for my own education
@Classic298 commented on GitHub (Sep 25, 2025):
should be this
f096e99059@mramendi commented on GitHub (Sep 26, 2025):
Updated to 0.6.31, the issue still persists.
Snippet from full request log:
@Classic298 commented on GitHub (Sep 26, 2025):
Ah no.
That is the citation prompt not the RAG/Query prompt
You always need this to be sent
@mramendi commented on GitHub (Sep 26, 2025):
I see now. While I would prefer not to have this prompt and to have each file in the message where it was sent (not all in he last message), this does make things better. Is the citation prompt simply hardcoded?
@Classic298 commented on GitHub (Sep 26, 2025):
the citation prompt is not hardcoded, i am pretty sure you can insert your own version of the citation prompt in the admin panel and set it to just a dot or something like that to overwrite the default prompt.
@mramendi commented on GitHub (Sep 26, 2025):
I just went through the entire admin panel and could not find the citation prompt, advice would be much appreciated.
@Classic298 commented on GitHub (Sep 26, 2025):
Admin panel > Documents > RAG-Template
@mramendi commented on GitHub (Sep 26, 2025):
@Classic298 fresh screenshot of my Admin panel > Settins > Documents is at https://imgur.com/a/TeI8WAn and no RAG-template in sight. (If I turn off "Bypass embeddings and retrieval" a couple more settings appear but sitll nothing like this).
@rgaricano commented on GitHub (Sep 26, 2025):
scrolldown, it is below
@mramendi commented on GitHub (Sep 26, 2025):
This setting was not present in the Chrome Web App but surfaced when I switched to the web page. Also, the setting is accessible only when "Bypass Embeddings and Retrieval" is disabled, but it is used even when "Bypass Embeddings and Retrieval" is enabled. Thanks for the pointers, I do think I'll be able to fix my workflow for now.