<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/generating-diagrams-with-with-ai-llms-ffuo3xz68" -->

---
title: Generating Diagrams with with AI / LLMs | daily.dev
description: A practical guide on using AI/LLMs to generate diagrams with MermaidJS and Excalidraw. Covers how Excalidraw&#x27;s AI feature works (using OpenAI-compatible...
canonical: https://daily.dev/posts/generating-diagrams-with-with-ai-llms-ffuo3xz68
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Generating Diagrams with with AI / LLMs | daily.dev
og:description: A practical guide on using AI/LLMs to generate diagrams with MermaidJS and Excalidraw. Covers how Excalidraw&#x27;s AI feature works (using OpenAI-compatible...
og:url: https://daily.dev/posts/generating-diagrams-with-with-ai-llms-ffuo3xz68
og:image: https://api.daily.dev/og/posts/ffUO3Xz68.png
og:image:alt: Generating Diagrams with with AI / LLMs
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Generating Diagrams with with AI / LLMs

**[Sam McLeod](https://daily.dev/sources/smcleod)** · 4 min read · 0 upvotes · 0 comments

## Summary

A practical guide on using AI/LLMs to generate diagrams with MermaidJS and Excalidraw. Covers how Excalidraw's AI feature works (using OpenAI-compatible endpoints), tips for prompting LLMs to produce valid Mermaid syntax, and includes example system prompts and diagram prompts. Key advice: always specify MermaidJS as the output format and declare the diagram type (flowchart, sequence, class, etc.).

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://smcleod.net/2024/10/generating-diagrams-with-with-ai-/-llms/>

## Similar posts on daily.dev

- [This tool replaced every diagramming app I've ever used](https://daily.dev/posts/this-tool-replaced-every-diagramming-app-i-ve-ever-used-bp8r9djhw) · XDA Developers · 1 upvotes · 3 comments
- [Animated, interactive And visuals Mermaid Diagrams](https://daily.dev/posts/animated-interactive-and-visuals-mermaid-diagrams-dvfqnnec7) · Hacker News · 1 upvotes · 0 comments
- [Turn Ideas into Mind Maps with OpenAI and Vue Diagram Library](https://daily.dev/posts/turn-ideas-into-mind-maps-with-openai-and-vue-diagram-library-e1ddditmd) · Syncfusion · 1 upvotes · 0 comments

---

Tags: [#llm](https://daily.dev/tags/llm), [#prompt-engineering](https://daily.dev/tags/prompt-engineering)

[View this post on daily.dev](https://daily.dev/posts/generating-diagrams-with-with-ai-llms-ffuo3xz68)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Generating Diagrams with with AI / LLMs","url":"https://daily.dev/posts/generating-diagrams-with-with-ai-llms-ffuo3xz68","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/generating-diagrams-with-with-ai-llms-ffuo3xz68"},"datePublished":"2026-03-31T12:29:05.301Z","dateModified":"2026-03-31T12:49:22.950Z","description":"A practical guide on using AI/LLMs to generate diagrams with MermaidJS and Excalidraw. Covers how Excalidraw's AI feature works (using OpenAI-compatible...","image":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","thumbnailUrl":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","isAccessibleForFree":true,"articleSection":"Sam McLeod","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Sam McLeod","logo":"https://media.daily.dev/image/upload/s---ERPerFg--/f_auto,q_auto/v1774960030/logos/smcleod?_a=BAMAMiWQ0","url":"https://daily.dev/sources/smcleod"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/generating-diagrams-with-with-ai-llms-ffuo3xz68","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"llm,prompt-engineering","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sam McLeod","item":"https://daily.dev/sources/smcleod"},{"@type":"ListItem","position":3,"name":"Generating Diagrams with with AI / LLMs"}]}
```

