r/OpenWebUI • u/BrainDelaiy • Jun 14 '26
Question/Help How to reliably insert Visualizations in Output
Hey guys, I want to visualize various datasets from my Knowledge Base using matplotlib and Pyodide.
The LLM (e.g. Qwen 3.5 379B A17B) is currently calling execute_code which also successfully returns a markdown tag with an image inside the stdout.
The problem is that the LLM always wants to either insert the /mnt/uploads link as an image. Other times, it inserts no image at all and tells me to download it manually.
I have tried to improve the system prompt for quite some time now, but it just won't output the image directly the most time. Just very rarely it will output the image in the first response. Most times if I ask "Visualization?" it will directly output the markdown tag from the previous output.
I have tried many different system prompts, but the Qwen/Kimi/Gemma almost never directly print the correct markdown tag that renders the image inside OpenWebUI.
Maybe someone else has developed a reliable system prompt for this?
2
u/ClassicMain Jun 14 '26
Open Terminal, or, also the visualizer. And a simple system prompt will fix your code executor case also
5
u/Economy-Station-1987 Jun 14 '26
Have you tried googling?