---
title: "Asking your AI"
description: "How to ask your AI for readable diagrams, and how to point it at what needs fixing."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.dia.rakudeji.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Asking your AI

Your AI creates the diagrams in dia. Adding a little information to your request makes the result much easier to read.

## What to include in a request

| Include | Example |
| --- | --- |
| What the diagram is about | "An architecture diagram of our e-commerce order processing" |
| The question it answers | "Where does an order go before it is stored?" |
| What appears in it | "Web, API, inventory service, an external payment service, PostgreSQL" |
| What arrows mean | "Use arrows for data flow only" |
| Flow direction | "Top to bottom" or "left to right" |
| Where to put it | "In the project Payments" |

Tips for readable diagrams:

- **One diagram, one question.** If you have several questions, ask for separate diagrams.
- **One meaning for arrows.** Mixing data flow, calls, and control in one diagram leads to crossing arrows. Ask for other relationships to go into labels or the description.
- **Short labels.** Ask for assumptions, notes, and numbers to go into the diagram's description.
- **Ask the AI to check its work.** Your AI can render a diagram as an image to check it. Adding "check the image and fix anything hard to read" helps.

> **Note**
>
> Layout is automatic; positions and sizes can't be specified. To move things, ask the AI to change the arrows, the groups (frames around elements), or the flow direction.

## Split large systems

Putting everything in one diagram makes it unreadable. Ask for a large system to be split into several diagrams in one document:

- An overview first
- Then one diagram per area or per flow

To show each flow within a single diagram instead of adding diagrams, ask for views.

## Ask for views

A view highlights some of the elements in a diagram. A diagram can have several named views, such as "Sign-in flow" and "Order flow." Viewers switch between them in the toolbar at the bottom of the screen. See [Viewing diagrams](/en/view).

## Ask for a steps document

To build up an architecture gradually, or to compare before and after, ask for a steps document.

- From the second diagram on, each diagram builds on the one before it.
- Elements from the previous diagram stay in the same place. New parts animate in on screen.
- Changes to an earlier diagram carry over to the later ones.

The document kind is fixed when the document is created and can't be changed later, so say "as a steps document" in your first request.

## Point the AI at what to fix

To point at specific elements, use Copy as AI instruction (AI への指示にコピー).

1. Click the elements or arrows you want changed. Shift-click to select more than one; Shift-drag to select an area.
2. A list of the selection appears. Choose Copy as AI instruction (AI への指示にコピー).
3. Paste it into your conversation with the AI and write what you want after it.

The copied text identifies the document, diagram, and elements, so the AI finds the right target. The text is in Japanese; the AI understands it either way.

```text
dia のドキュメント『Payments』（id: …）の図『Overview』（id: …）の要素『API』（id: api）について：
Put Redis to the right of this element and label the arrow from API "cache lookup".
```

The same list also has Copy text (テキストをコピー), which copies element names only, and Copy ID (ID をコピー).

Other places also let you copy a ready-made request:

- In a document with no diagrams, Copy request for AI (AI への依頼文をコピー) copies a request to add diagrams to that document.
- In a project with no documents, Copy request for AI (AI への依頼文をコピー) copies a request to create a document in that project.

## Specify icons

To have the AI use a particular icon, choose Copy name for AI (AI 用の名前をコピー) on the [Icons](/en/icons) page and include that name in your request.

## Example requests

Create a new diagram:

```text
In dia, create an architecture diagram of our e-commerce order processing.
It includes Web, API, an inventory service, an external payment service, and PostgreSQL.
Use arrows for data flow only, flowing left to right.
Put assumptions and numbers in the diagram description.
```

Split a large system:

```text
Create diagrams of our internal data platform in the dia project "Data platform".
In one document, start with an overview, then add one diagram each for ingestion, processing, and delivery.
```

Compare before and after:

```text
Draw the move from our current architecture to the one with a cache, as a steps document.
The first diagram is the current architecture; later diagrams add to it.
```

Add views:

```text
Add views for the sign-in flow and the order flow to the diagram "Overview" in the dia document "Payments".
```

Go back a version:

```text
Restore the diagram "Overview" in the dia document "Payments" to the previous version.
```

Your AI can read the version list and restore a given version. To do it yourself, see [Version history](/en/versions).

Source: https://docs.dia.rakudeji.com/en/ask/index.mdx
