mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-11 00:04:08 -05:00
issue: RAG template for documents is automatically added to prompt when a tool is enabled #4800
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 @bgeneto on GitHub (Apr 10, 2025).
Originally assigned to: @tjbck on GitHub.
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.2
Ollama Version (if applicable)
No response
Operating System
Debian 12
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
The RAG template should not be automatically added to the system prompt when a tool is enabled or called.
Actual Behavior
The RAG template (for documents, with xml stuff) is automatically added to the system prompt when any tool is enabled, resulting in an irrelevant and potentially confusing prompt. This results in less-than-ideal tool performance.
Steps to Reproduce
Enable any tool (e.g., calculator or weather) in the web UI.
Observe the generated system prompt.
Verify that the RAG template is automatically added to the prompt when the tool is called, resulting in instructions that have no significance, such as the one below:
Logs & Screenshots
Additional Information
When a tool is enabled in the web UI, the RAG template is automatically added to the prompt. This is problematic specially when using a custom RAG template designed for document information extraction, which is not relevant when using tools like calculator or weather or many others. Example of an auto-included (pointless) prompt:
@bgeneto commented on GitHub (Apr 10, 2025):
Related to #12324
@tjbck commented on GitHub (Apr 13, 2025):
Addressed with
881d81d87f