[GH-ISSUE #2558] [BUG]: Broken math equation render #1657

Closed
opened 2026-02-22 18:25:55 -05:00 by yindo · 1 comment
Owner

Originally created by @alaireselene on GitHub (Oct 30, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2558

How are you running AnythingLLM?

All versions

What happened?

I'm currently using OpenAI for LLM Model. When AnythingLLM generate math equation, it is a bit strange:
image
What I expected is:
image

Are there known steps to reproduce?

Model: chatgpt-4o-mini
System prompt:

You will act as a Complex Analysis university math teacher. Your task is to explain mathematical equations or concepts in easy-to-understand terms. This includes:

1. Providing step-by-step instructions for solving problems.
2. Demonstrating various techniques with visuals.
3. Recommending online resources for further study.

Given the ongoing conversation context and a follow-up question from the user, reply only to the user's current question as per the provided instructions. Always respond in Vietnamese.

Important: Ensure every LaTeX math equation is compatible with Markdown by using single dollar signs `$` to enclose all equations as inline blocks.

Example inline format:
$E = mc^2$

The user's conversation and question will be provided below:
"""
...insert conversation context and subsequent question here...
"""

User prompt:

Ý tôi là, ví dụ như cos(z) sẽ khai triển thành chuỗi. Các chuỗi cơ bản đó là gì?
Originally created by @alaireselene on GitHub (Oct 30, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2558 ### How are you running AnythingLLM? All versions ### What happened? I'm currently using OpenAI for LLM Model. When AnythingLLM generate math equation, it is a bit strange: ![image](https://github.com/user-attachments/assets/f45222c6-d169-48f6-b64e-acf959afdd9f) What I expected is: ![image](https://github.com/user-attachments/assets/96d3b2ab-fe6d-475a-875b-2338c9c5c103) ### Are there known steps to reproduce? Model: `chatgpt-4o-mini` System prompt: ``` You will act as a Complex Analysis university math teacher. Your task is to explain mathematical equations or concepts in easy-to-understand terms. This includes: 1. Providing step-by-step instructions for solving problems. 2. Demonstrating various techniques with visuals. 3. Recommending online resources for further study. Given the ongoing conversation context and a follow-up question from the user, reply only to the user's current question as per the provided instructions. Always respond in Vietnamese. Important: Ensure every LaTeX math equation is compatible with Markdown by using single dollar signs `$` to enclose all equations as inline blocks. Example inline format: $E = mc^2$ The user's conversation and question will be provided below: """ ...insert conversation context and subsequent question here... """ ``` User prompt: ``` Ý tôi là, ví dụ như cos(z) sẽ khai triển thành chuỗi. Các chuỗi cơ bản đó là gì? ```
yindo added the possible bug label 2026-02-22 18:25:55 -05:00
yindo closed this issue 2026-02-22 18:25:55 -05:00
Author
Owner

@timothycarambat commented on GitHub (Oct 30, 2024):

https://github.com/Mintplex-Labs/anything-llm/issues/2018#issuecomment-2273973514

@timothycarambat commented on GitHub (Oct 30, 2024): https://github.com/Mintplex-Labs/anything-llm/issues/2018#issuecomment-2273973514
yindo changed title from [BUG]: Broken math equation render to [GH-ISSUE #2558] [BUG]: Broken math equation render 2026-06-05 14:41:57 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1657