mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-11 10:34:13 -05:00
[GH-ISSUE #16531] issue: Default RAG prompt is injected even when disabled/overridden #72550
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 @Szadam88 on GitHub (Aug 12, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16531
Check Existing Issues
Installation Method
Docker
Open WebUI Version
6.2
Ollama Version (if applicable)
No response
Operating System
Alpine linux
Browser (if applicable)
non-relevant
Confirmation
README.md.Expected Behavior
If the RAG template is blank/disabled, no RAG text should be added to the system prompt—regardless of tools/attachments/KB state.
Actual Behavior
Output:
Steps to Reproduce
Steps to reproduce
Start Open WebUI via Docker.
In the UI, set a very simple/empty RAG prompt (e.g., just "emptyEmptyEmptyEmptyEmptyEmpty" or blank).
Start a new chat (fresh session), optionally enable a tool/KB or attach a file. in my scenario i noticed that at n8n side:
I have configured n8n pipeline
Logs & Screenshots
System prompt:
Rag template:
Additional Information
Proposed Fixes
Provide a single authoritative switch (env + UI) like OPENWEBUI_DISABLE_RAG=true that guarantees no RAG injection in any code path.
Centralize prompt composition to one function that respects the disable flag and empty template.
Ensure user/workspace settings override defaults consistently and avoid rehydrating defaults from persistence when empty/disabled.
@tjbck commented on GitHub (Aug 12, 2025):
Above is tag generation.