epam / ai-dial-chat

A default UI for AI DIAL
https://chat.lab.epam.com
Apache License 2.0
57 stars 24 forks source link

Fix issues with markdown #140

Open VolhaBazhkova opened 10 months ago

VolhaBazhkova commented 10 months ago

Author is @adubovik

We need to improve Markdown recognition in the model output. Currently, it's assumed that the entire output of the model is always markdown.

This leads to problems when the model

  1. prints a dollar symbol (this triggers formula rendering for us) or
  2. prints something in several lines (the lines are merged into one because newline in markdown is "\n\n", not "\n").

See examples attached.

Check how it works in ChatGPT - it recognizes Markdown-like markup locally, it doesn't apply it to the whole model output. 

image

[Aliaksei Vavilau] Requires investigation. Should we use heuristic? If yes, then what is the logic?

VolhaBazhkova commented 5 months ago

As far as I see the 1st example with $ sign is not reproduced anymore; but the 2nd one is still reproduced

epam_aidial-_development_chat_conversation_4-9.json

image