Thanks for this post, Seth!
Some might be interested in installing Mermaid-JS/CLI
and then utilize the resource function MermaidJS.
(I plan to make a “MermaidJS” paclet soon.)
The advantages of using Mermaid-CLI over Mermaid-Ink:
-
Mermaid-CLI uses a “local” (on your computer) JavaScript installation – i.e. does not go to “the cloud” and share Intellectual Property (IP) drawings
-
Besides IP, Meramaid-CLI has more diagram generation options
-
(I think) Mermaid-CLI is 2-3 times faster than Mermaid-Ink
– you have earned Featured Contributor Badge ![]()
Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!
Create mermaid-js code for a graph describing the power dynamics in Game of Thrones. Make it a top down diagram. Don't separate lines of the mermaid-js code with a semi-colon. Take the Mermaid code and wrap it in a string. Then wrap the string in a Wolfram Language ResourceFunction called MermaidInk
Is this with ChatGPT-3.5 or ChatGPT-4.0?
GitHub started supporting Mermaid a year ago (or so.) Hence, ChatGPT-3(.5) would not be that trained with those kind of diagrams.
I’m not 100% sure but I believe AIAssistant uses gpt3.5-turbo by default and I did not do anything fancy to try to get it to use GPT4.
How come there’s no link between Robert Baratheon and Joffrey Baratheon ![]()
Maybe connecting the Baratheons that requires GPT4 (GoPT4?).
I was using 3.5 as well.
Of course, using “OpenAIMode” is better!
(And, yes, I was thinking to troll Christopher Wolfram’s post with those kind of statements too.)
The ability to couple an AI with the Mermaid diagramming tool is very powerful. It’s too bad that the AI got the animal taxonomy wrong.
ChatGPT is “just” hallucinating answers, so no surprise here!
Also, keep in mind that ChatGPT-3.5 is used (with temperature 0.7.) ChatGPT-4.0 and/or lower temperatures might be producing much better results.
BTW, I am working on a workaround of the ChatGPT’s code hallucinations (when it comes to code generation.) But that workaround only works for code that is already “known and parameterized.”
As promised above – check out the paclet “MermaidJS” :

