# AI documents

You can automatically generate descriptive text from your diagram. This is useful when you want a text snippet to include alongside the diagram in a document (e.g., design doc, SOP) or presentation.

## How to generate description from a diagram

1. Create a [new AI diagram](https://docs.eraser.io/docs/creating-a-new-ai-diagram), or a [new diagram-as-code](https://docs.eraser.io/docs/diagram-as-code).
2. Select the diagram, then on top of the sidebar, select "**AI**".

<Figure src="/assets/a0dc27bcfade307c3388fbf4495caf09822f1c470b31f51e4ab8b2f3141ad4b2-Screenshot_2025-08-26_at_13.26.55.png" alt="" border />

3. Click "**Generate description**".
4. Provide a prompt for the diagram description generation or leave it blank.

<Figure src="/assets/d67f60bef69ff01dee14ea671985d417e30f59176c487790ac95734af3e4206a-Screenshot_2025-08-26_at_13.27.07.png" alt="" border />

5. Click "**Generate**".
6. The description will be automatically generated and inserted at the end of your document.

<Figure src="/assets/53f753a60946405d084cc011cb96e3c20d566de6d047de01d2dc6e1bb33ee8c2-Screenshot_2025-08-26_at_13.27.14.png" alt="" border />
