I have searched the existing issues and discussions.
I am using the latest version of Open WebUI.
Installation Method
Git Clone
Open WebUI Version
0.5.20
Ollama Version (if applicable)
No response
Operating System
Ubuntu 22.04
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
Understood, when answering mathematical questions, the model should not include the trailing \boxed tag in the final sentence. For instance, instead of saying "9.9 is greater than 9.11"," it should simply state "9.9 is greater than 9.11." without the trailing \boxed tag.
Actual Behavior
However, the model's response ends with the display of \boxed 9.9 is greater than 9.11 on the webpage. I'm not sure what the purpose of the \boxed tag is, and why it is included every time.
Steps to Reproduce
Select a LLM model, then ask the model which is greater between 9.9 and 9.11, and you will find that the issue: the webpage displays the final answer with a \boxed tag.
Logs & Screenshots
Additional Information
No response
Originally created by @etemical on GitHub (Mar 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11623
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
- [x] I am using the latest version of Open WebUI.
### Installation Method
Git Clone
### Open WebUI Version
0.5.20
### Ollama Version (if applicable)
_No response_
### Operating System
Ubuntu 22.04
### 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
Understood, when answering mathematical questions, the model should not include the trailing `\boxed` tag in the final sentence. For instance, instead of saying "9.9 is greater than 9.11"," it should simply state "9.9 is greater than 9.11." without the trailing `\boxed` tag.
### Actual Behavior
However, the model's response ends with the display of `\boxed 9.9 is greater than 9.11` on the webpage. I'm not sure what the purpose of the `\boxed` tag is, and why it is included every time.
### Steps to Reproduce
Select a LLM model, then ask the model which is greater between 9.9 and 9.11, and you will find that the issue: the webpage displays the final answer with a `\boxed` tag.
### Logs & Screenshots

### Additional Information
_No response_
GiteaMirror
added the bug label 2026-04-25 05:43:54 -05:00
Model Behavior: Many LLMs (especially math-focused ones) are trained to highlight final answers using LaTeX's \boxed{} syntax. The model may append this tag automatically when it detects a numerical or comparative answer.
LaTeX Rendering: Open WebUI does not currently render LaTeX syntax by default, so raw tags like \boxed appear as plain text in the response.
Solutions
Modify Open WebUI to strip LaTeX formatting for non-math contexts, or
Adjust the model's behavior via the system prompt to avoid using \boxed.
Recommended Fix (immediate workaround):
Update the system prompt template in Open WebUI to explicitly instruct the model to avoid using LaTeX formatting. For example:
SYSTEM_PROMPT = """\
You are a helpful assistant. Format answers clearly and avoid LaTeX or special markup like \boxed. Use plain text only.
"""
<!-- gh-comment-id:2720657914 -->
@ArianDJ commented on GitHub (Mar 13, 2025):
**Cause**
- Model Behavior: Many LLMs (especially math-focused ones) are trained to highlight final answers using LaTeX's \boxed{} syntax. The model may append this tag automatically when it detects a numerical or comparative answer.
- LaTeX Rendering: Open WebUI does not currently render LaTeX syntax by default, so raw tags like \boxed appear as plain text in the response.
**Solutions**
- Modify Open WebUI to strip LaTeX formatting for non-math contexts, or
- Adjust the model's behavior via the system prompt to avoid using \boxed.
Recommended Fix (immediate workaround):
Update the system prompt template in Open WebUI to explicitly instruct the model to avoid using LaTeX formatting. For example:
```
SYSTEM_PROMPT = """\
You are a helpful assistant. Format answers clearly and avoid LaTeX or special markup like \boxed. Use plain text only.
"""
```
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 @etemical on GitHub (Mar 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11623
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
0.5.20
Ollama Version (if applicable)
No response
Operating System
Ubuntu 22.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Understood, when answering mathematical questions, the model should not include the trailing
\boxedtag in the final sentence. For instance, instead of saying "9.9 is greater than 9.11"," it should simply state "9.9 is greater than 9.11." without the trailing\boxedtag.Actual Behavior
However, the model's response ends with the display of
\boxed 9.9 is greater than 9.11on the webpage. I'm not sure what the purpose of the\boxedtag is, and why it is included every time.Steps to Reproduce
Select a LLM model, then ask the model which is greater between 9.9 and 9.11, and you will find that the issue: the webpage displays the final answer with a
\boxedtag.Logs & Screenshots
Additional Information
No response
@ArianDJ commented on GitHub (Mar 13, 2025):
Cause
Solutions
Recommended Fix (immediate workaround):
Update the system prompt template in Open WebUI to explicitly instruct the model to avoid using LaTeX formatting. For example: