mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-05 16:28:32 -05:00
[GH-ISSUE #828] math output is not format correctly #50893
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 @elvis-cai on GitHub (Feb 21, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/828
Environment
Description
math output is not format correctly
when ask question
if a book contains 127,000 tokens, how many pages does it typically have?it's outputting
Tested with latest version
ghcr.io/open-webui/open-webui@sha256:7d43ed0ff523046c6e2b31e0e7274a64570ed66daa7789e2bc1d9a72f1f9b226let me know if anything I am missing, thank you.
@jannikstdl commented on GitHub (Feb 21, 2024):
This is not Open WebUI's fault since the output comes directly from the LLM. LLMs are generally not good at math.
In future this could trigger something like a python runner like ChatGPT does.
@AgatheBauer commented on GitHub (Feb 21, 2024):
I think this isn't the problem which @elvis-cai wanted to report @jannikstdl.
The frontend doesn't recognize the Latex format. I'm affected too.
@justinh-rahb commented on GitHub (Feb 21, 2024):
This makes more sense and should be fixable, whether the equations will be correct is another matter though lol ☝️
@jannikstdl commented on GitHub (Feb 21, 2024):
Ah got it! This should look like this

@jannikstdl commented on GitHub (Feb 21, 2024):
But wasn't this a false declaration at all?
[ \text{Number of pages} = \frac{\text{Total words}}{\text{Words per page}} = \frac{127,000}{250} = 508 ]Like this should be
\[...\]I think?@tjbck commented on GitHub (Feb 21, 2024):
@jannikstdl it is indeed, but I just added
[and](with extra space) to be considered as delimiters. I'll remove this later if it causes more issues than good.@elvis-cai commented on GitHub (Feb 21, 2024):
Thanks @tjbck, @jannikstdl for the quick fix🙇
@tracer123 commented on GitHub (Feb 27, 2024):
Below is another example of this formatting issue.
@hxypqr commented on GitHub (Apr 25, 2024):
There is a parity issue here, and we need to find a mapping method to move the part of the text that may be output by LLM out of the dollar signs in Latex in order to display it normally.