Post

Figuring out a workflow to make Claude better at creating diagrams and illustrated explanations. By default it is pretty crap - see this example. Labels overlap. Arrows in the wrong place. Text too small. But it's also decent at identifying what's wrong once it takes a screenshot.

Claude's second attempt at fixing some of the problems, with a lot of additional steering from me on improving the visual details. It's still unable to make an arrow go where it needs to, or make two elements connect with a line. But it's a decent starting point - enough for me to cleanup by hand.

The best diagram outputs an LLM can get to are still crap by my standards. It helps speed me up a bit and give me starting points, but it's still disappointing that their visual reasoning and graphic design skills are really weak. The layouts and visual language are always predictably boring too

0 reposts7 likes

My theory here is the major labs have done very little or no RLHF on visual explanations and diagrams? Seems like a blind spot. Image generation alone or text generation alone are very well optimised but the combination seems uniquely hard for current models.

It’s been a while But there are markup languages for diagrams like mermaid. Not sure if there are any styling mechanisms for them similar to css. Perhaps a mermaid > structured HTML then style that with css?

One way I got to some interessting results was think in a more multi modal way. A prompt is translated into a blueprint diagram, then translate into node based logic gates structure (they are good at that), and then render the outcome. This one was prompt to new game.

We’ve reached identical conclusions. If you figure this out I’d be very keen to hear how you did it!

Something that helped when I was writing my prompt caching post was constraining it to a smaller grid. I created a little SVG library in React where I could create nested grids for easier positioning and the LLM seemed to appreciate that. It also made it easier to clean up when it got it wrong.

Oh man a grid constraint is a good idea! This is the first time I've tried prompting diagrams in earnest and gotten promising results (attempts ~6 months ago were too crap to even entertain, lol) I'll try building out a Claude skill for it - some mix of tight instructions and verification loops

But it still wasn’t perfect and this is very anecdotal. I haven’t done any sort of rigorous verification that it helps.

Gemini / Nano Banano became the best at it with the recent large update, any context I'm missing on why to use Claude here?

Using Claude because I need these to be in working code – SVG, CSS, HTML, JS. It allows me to have have fine-grained control over details. And I usually add in animations and interactions, plus I need them to be responsive for mobile. Nano banan still has a ways to go 😄 bsky.app/profile/magg...

Maggie Appleton@maggieappleton.com

I hadn't tried out Nano Banana for diagrams yet so I had a little play. Wonderfully promising and hilariously crap in the details. So close and yet so far.