Comment by ashryan
2 days ago
Mermaid is fantastic as a portable I/O format for LLM context. I spent some time discussing entity relationships with an LLM recently, and had it produce a Mermaid diagram to wrap up the conversation.
Once you have the diagram code, you can use that as an artifact for new LLM chats related to databases, APIs, etc.
I'm not sure what the history of mermaidchart.com specifically is, but I'm guessing it's new since the ER diagram docs are marked as "coming soon":
https://docs.mermaidchart.com/mermaid/er/syntax
I'm curious how this plugin compares to Markdown Preview Mermaid Support: https://marketplace.cursorapi.com/items?itemName=bierner.mar...
It is. I had a meeting this past week where we discussed a novel workflow and I was able to generate an initial based on the transcription of our discussion so far, then two quick revisions based on realtime feedback.
Though, I’ve used it to generate visuals of pipelines too and find it often takes coaching similar to any output that requires very high precision.
Another bit is that gpt4o and sonnet both seem to want to put syntax breaking parentheses in and struggle to avoid continuing to do so.
Once it’s right, though it is a valuable new context artifact to include in further problem solving on a domain.
Is there anybody creating Mermaid diagrams with LLMs, especially? I tried with Claude and R1 (ProxyAI plugin for Jetbrains) and I had to find the correct phrasing to interact with it. Does the Mermaid-blessed AI have any secret sauce or can I instruct any LLM?
Re: LLMs & diagrams - in general, diagrams and tables as info compression tool (both in the general sense as well as in the practical concrete "optimise for token / context window" sense) - e.g. today as part of request to do 'deep research' on Dwarf Fortress personality / psychology system, at a late point (preparing to relaunch with a fresh empty context window among other things) I asked GPT 4.5 to (among other diagrams) draw me a concise 'psychological data flow diagram' (I was kind of vague and was deliberately pushing for abstraction / compression) -
among (many elaborate) other things it gave me - and I liked it (NB don't trust it willy nilly w.r.t. the below of course) - (auto-indented by 2 spaces hope formatting works) =>
```
```
p.s. it chose the syntax/format itself; regardless, some time ago when asked for guidance re: how to manage sliding context window, it did suggest tables itself (user employing them for concise input - and likewise requesting tabulated/diagrammatic/schematic output).
p.p.s. (edit) many good very particular insights, if anyone's by chance interested then lmk, I'll ping once distilled interesting output is on a not-yet-extant blog (it's gonna happen finally)...
Don't mean to be blunt, but I found your comments really hard to comprehend. Something about the phrases feels atypical, almost like it's a different dialect. Curious if it's just me.
This is useful feedback for me. Thanks (no further comments, but I think I know the reason why it's been this way especially as of late)
Never know we can format comment like this in HN :o