> For the complete documentation index, see [llms.txt](https://docs.toucanai.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toucanai.cloud/build/charts/how-to/create-a-chart-with-ai.md).

# Create a chart with AI

### Objective

In this tutorial, you will learn how to create a chart using AI in Toucan AI. You will interact with the AI to automatically generate a chart based on your data.

***

### Prerequisites

* A [connected database](https://toucan-toco.gitbook.io/toucan-ai/build/data-connections/how-to/add-a-database) (as seen in the previous tutorials).
* A clear idea of the chart you want to create, *such as employee counts by contract type.*

***

### Steps

#### 1. Access the "Library" Tab

* From the home page of Toucan AI, click on the **Library** tab.
* In the top-right corner, click on the **Add Visualization** button.

#### 2. Choose the "Add Chart" Option

* Click on **Add Chart** to start creating a new chart.
* This will open the AI-powered conversational interface where you can interact with the AI to generate a chart.

#### 3. Enter Your Prompt for AI

* In the conversational interface, type a relevant prompt.
  * *For example, you could type **"Show me the number of employees by contract type"** if you have HR Data for instance.*
* Once you send the prompt, Toucan AI will start analyzing your connected database and propose a chart based on the model.

#### 4. Review the AI-Generated Chart

* The chart will appear on the right side of the screen. The AI will also provide a brief summary of the proposed chart along with insights and steps to understand the data transformation process.
* You should verify the suggested metrics and dimensions to ensure they match your needs.

<figure><img src="/files/iP0LbHrJv0zNnirmCJaS" alt="AI-Generated Chart"><figcaption></figcaption></figure>

***

### Conclusion

Congratulations! You've successfully created your first chart using AI in Toucan AI. You can now refine, adjust, and save it to use in your dashboards.

**Suggested Next Steps**: [create a dashboard with AI](https://toucan-toco.gitbook.io/toucan-ai/build/dashboards-and-layouts/how-to/create-a-dashboard-with-ai)!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.toucanai.cloud/build/charts/how-to/create-a-chart-with-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
