Artifact functionality in chat #6987
Replies: 2 comments 2 replies
-
The artifact block is being enclosed with triple-backticks, which is not the correct format. This can be improved through prompting, instructing the LLM not to do so (mileage with artifacts in general will vary by how smart the LLM is). |
Beta Was this translation helpful? Give feedback.
-
Here's another example. Am I wrong? LibreChat perceives a markdown header "kotlin" existing that is not in the plain text output of the model (ignore the extra backticks inside artifact! I've eliminated that in other tests): If LibreChat just had one or two more back-end instructions about how to detect artifacts even below other text/markdown openers, the artifact window would work in more use cases I later asked the model why it kept adding backticks or identifiers above the artifact and it had an interesting explanation that made me think many models could be likely to output this one extra line of markdown since they're used to displaying code in markdown boxes: "Overgeneralization of Code Formatting: I'm trained on a massive dataset that includes a lot of code. A very common pattern in that data is to enclose entire code blocks (HTML, JavaScript, etc.) within triple backticks. My internal model likely overgeneralized this pattern to the artifact structure itself, incorrectly assuming that the entire thing needed that level of code fencing." Seems like it's pretty standard for models to output code inside markdown with an identifier ie: "```html" 🤷 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Is it possible to have LibreChat ONLY look for the ::: to determine when to display the Artifact window? And just ignore plain text above that as part of the chat message?
See attached example... the LLM output ````yaml` for some reason above the artifact, but then prevents everything after ::: from displaying even though the artifact is typed out correctly otherwise and should work.
I've noticed several LLMs try to output this identifier (or CSS/HTML/PHP/YAML) automatically even when I provide an Agent Instruction not to output any text above the artifact.
Example:
Yaml came from the LLM, but CSS is not in the text when I click the edit pencil and inspect it.
Version Information
ghcr.io/danny-avila/librechat-dev latest d8902f5bdbff 8 days ago 1.6GB
ghcr.io/danny-avila/librechat-rag-api-dev-lite latest 566585698235 13 days ago 1.8GB
Steps to Reproduce
What browsers are you seeing the problem on?
Chrome
Relevant log output
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions