Originally created by @bgeneto on GitHub (Apr 10, 2025).
Originally assigned to: @tjbck on GitHub.
Check Existing Issues
I have searched the existing issues and discussions.
I am using the latest version of Open WebUI.
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
I have read and followed all instructions in README.md.
I am using the latest version of both Open WebUI and Ollama.
I have included the browser console logs.
I have included the Docker container logs.
I have listed steps to reproduce the bug in detail.
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:
<context> <source id="1">(48.26)^3 = 112398.871976000</source> </context>
<rules>
- Thoroughly analyze the context to find information relevant to the query.
- Provide the most relevant and comprehensive information from the context that answers the query.
- Include any examples, use cases, or practical applications mentioned in the context that relate to the query.
- If multiple pieces of information from the context are relevant, provide all of them in a structured manner.
- When appropriate, organize the response into sections such as Main Concept, Examples, Use Cases, and Additional Details.
- If the context contains step-by-step instructions or processes related to the query, present them clearly.
- Highlight any important definitions, key terms, or concepts found in the context that are crucial to understanding the answer.
- Answer directly and without using XML tags.
</rules>
If this is a intended "feature" and not a bug, then maybe we can add some option, to be parsed in the tool source, to not to include the rag prompt, similar to self.citation = False, maybe self.prompt = False (which defaults to True).
Originally created by @bgeneto on GitHub (Apr 10, 2025).
Originally assigned to: @tjbck on GitHub.
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
- [x] I am using the latest version of Open WebUI.
### 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
- [x] I have read and followed all instructions in `README.md`.
- [x] I am using the latest version of **both** Open WebUI and Ollama.
- [x] I have included the browser console logs.
- [x] I have included the Docker container logs.
- [x] I have listed steps to reproduce the bug in detail.
### 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
1. Enable any tool (e.g., calculator or weather) in the web UI.
2. Observe the generated system prompt.
3. 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:
```
<context> <source id="1">(48.26)^3 = 112398.871976000</source> </context>
<rules>
- Thoroughly analyze the context to find information relevant to the query.
- Provide the most relevant and comprehensive information from the context that answers the query.
- Include any examples, use cases, or practical applications mentioned in the context that relate to the query.
- If multiple pieces of information from the context are relevant, provide all of them in a structured manner.
- When appropriate, organize the response into sections such as Main Concept, Examples, Use Cases, and Additional Details.
- If the context contains step-by-step instructions or processes related to the query, present them clearly.
- Highlight any important definitions, key terms, or concepts found in the context that are crucial to understanding the answer.
- Answer directly and without using XML tags.
</rules>
```
> If this is a intended "feature" and not a bug, then maybe we can add some option, to be parsed in the tool source, to not to include the rag prompt, similar to `self.citation = False`, maybe `self.prompt = False` (which defaults to True).
GiteaMirror
added the bug label 2025-11-11 16:03:25 -06:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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