I liked Mermaid but unfortunately LLMs don't understand it well, so I switched to Latex tikz which LLMs know pretty well. At least I know Gemini 2.5 Pro does a good job at tikz. 3.7 and o1 were meh.
deepseek r1 understands mermaid very well and can correct all the mistakes of Gemini and Claude
Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
41–50 of 110 posts
Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
#42Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
#43Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
#44One of my favorite applications of multimodal LLMs thus far is the ability to: 1. Draw a DAG of whatever pipeline I’m working on with pen and paper. 2. Take a photo of the graph, mistakes and all. 3. Ask ChatGPT to translate the image into mermaid.js Given how complicated the pipelines are that I’m working with and the sloppiness of the hand drawn image, it’s truly amazing how well this workflow works.
Alternatively, ask the LLM to create a mermaid DAG of your current code.
Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
#45One of my favorite applications of multimodal LLMs thus far is the ability to: 1. Draw a DAG of whatever pipeline I’m working on with pen and paper. 2. Take a photo of the graph, mistakes and all. 3. Ask ChatGPT to translate the image into mermaid.js Given how complicated the pipelines are that I’m working with and the sloppiness of the hand drawn image, it’s truly amazing how well this workflow works.
Care to share your prompt(s)? I draw a fair bit on a Kindle Scribe. I’d love to try this, but I bet your prompt would be helpful.
> I have an image of a hand drawn workflow diagram. I’d like to turn it into a mermaid.js file.
(with the image attached)
Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
#46One of my favorite applications of multimodal LLMs thus far is the ability to: 1. Draw a DAG of whatever pipeline I’m working on with pen and paper. 2. Take a photo of the graph, mistakes and all. 3. Ask ChatGPT to translate the image into mermaid.js Given how complicated the pipelines are that I’m working with and the sloppiness of the hand drawn image, it’s truly amazing how well this workflow works.
I'm a busy person. I don't have hours of time that I can take out of my schedule to generate what I regard as write only documentation (nobody will ever read or truly value it) that ticks the box of "we have stuff to point at when somebody asks (which nobody ever will)", which has a lowish value. Sometimes it's nice to have. The above is a fine example. People will glance at it, give me a little thumbs up, and then give me permission to proceed as planned and bill accordingly. Job done. It's not a reference design that anyone will ever look at for more than a few seconds.
After a few decades in the industry, I'm extremely skeptical of the value of diagrams vs. the time required to produce them. I just don't see it. A lot of good software gets produced without them. You don't need blueprints for your blueprints, which is what source code is (a blueprint for automatically compiling into working software). People value such traits as structure, readability, conciseness in source code for a reason: it allows them to treat source code as design assets. I don't write UML, I stub out data classes and interfaces instead. And then I refactor them over and over again. Diagrams just slow me down.
But a few minutes is about on the threshold of me wasting braincycles on producing them and enrich documentation that I'm writing anyway in text form. Quickly jot down some notes. Don't waste any time whatsoever obsessing about the awkward syntax of these micro languages, and just get the essentials nailed. I bet I can get it down to like a minute or so with better LLMs and larger context windows. "Examine this project, produce an overview diagram of all the database tables". That's a prompt I'd write. In the same way, letting LLMs document code is a great use of time.
Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
#47I have an almost exhaustive list [1] of browser based text to diagram tools. Some specialised tools (like https://sequencediagram.org/ ) so much better at what they do than any generic ones like mermaid. [1] https://xosh.org/text-to-diagram/
I like Mermaid fine, but nothing is perfect. I will look at your list. The tool I always wanted would let me paste in the SQL of my database schema and output a diagram of the tables and relationships. That's SQL and not Markdown or JSON or any other format. Note that DrawDB (www.drawdb.app) does this, although it does not yet handle views. But I have been happy with what it offers so far. Still, I would welcome sugg…
Disclaimer: I work for them. I’m the person who developed that feature.
Feedback welcome!
Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
#48I don't love Mermaid and generally find it less well designed than something like Graphviz/dot. I generally find a lot of the syntax needlessly strict for something non-programmer humans are meant to interact with, but the big seller for me with Mermaid is that it works inline on GitHub. I end up creating a lot of sequence diagrams and having them as editable mermaid is very convenient. I do wish GitHub giant mermaid…
Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
#49Like PlantUML?
Nicer looking but fewer diagram types Also, AFAIK, their "render locally" story is "boot up headless chrome, good luck" which isn't great
Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
#50Little weird to see this on the lead page… mermaid has been around for a long time. And in general I’ve found its real world use pretty lacking.