# Build a Document with Ask AI

Source: https://help.dashboardfox.com/ai-query/build-a-document-with-ask-ai

Ask AI is a panel in the document builder. Describe what you want to see in plain language, and you get back a real document you can refine, edit, save, schedule and add to a dashboard.

## Prerequisites

- **Composer** role on an app where AI is turned on
- An AI provider assigned to you by your Admin

**Don't see Ask AI?** Your Admin hasn't set it up for this app or for you yet. You can still build documents by hand as usual.

## Ask a Question

1. In the document builder, choose the app and category, then select **Ask AI**.
2. Type your question in the box and press **Enter**.
    
    
    - Name the **measure**, the **grouping** and the **period**: *"Total invoiced by customer this quarter"*.
    - Type **@** to choose an exact field by name.
3. Review the answer: the data grid and, under **Details**, the **Built with** description.

**Tip:** Not sure where to start? Use one of the sample questions, select **Tips**, or ask *"What can I ask?"*

## Check the Answer

Under **Details**, **Built with** describes in plain words what was built: the measure, grouping, period and filters. Anything left out is listed as **Not included**. Read it before relying on the numbers.

**Important:** AI can misread a question. Always check a document before you rely on it.

## Refine It

Type what should change, for example:

- *"only the West region"*
- *"add last year"*
- *"sort highest first"*
- *"top 5 and the rest as Other"*
- *"make it a bar chart"*

For a new topic, select **Start a new question**.

## Switch the View

Under **Show as**, switch between the **Data grid** and the suggested visualization, such as a KPI card or chart. See [Create KPI Cards and Charts with Ask AI](https://help.dashboardfox.com/ai-query/create-kpi-cards-and-charts-with-ask-ai).

## Save It

1. Select **Use this report**. The answer loads into the builder as a normal, unsaved document.
2. Adjust fields or the visualization if needed.
3. Save it to a folder.

**Note:** **Use this report** replaces the fields currently in the builder. Refine first, then load it and make any manual edits.

## Other Answers You May See

| You see | What it means | What to do |
|---|---|---|
| **Quick question first** | Your question could mean more than one thing | Answer it or pick a suggested choice |
| **Nothing matched the filters** | The document is right but no rows match | Select **Try without filters** |
| **This looks like a question for another category** | Another category fits better | Select **Ask in…** to ask there |
| **This can't be built as a standard report** | The question needs something a standard document can't do | Rephrase it, or see [Ask AI on Virtual Apps and Direct SQL](https://help.dashboardfox.com/ai-query/ask-ai-on-virtual-apps-and-direct-sql) |
| **An answer about the category** | You asked about the category itself | No data is read. Try a suggested next question. |

## More Features

- **Recent:** reopen questions you asked earlier in the session.
- **Earlier answers:** select **Show** to reopen one, and **Use this earlier report** to load it.
- **Ask AI in the Preview header:** reopens the panel once a document has fields.
- **Show SQL:** shows the query behind an answer, if your role allows it.
- **Feedback:** thumbs up or down, with an optional comment, goes to your Admin to help improve answers.

## Best Practices

- **Be specific.** "Total invoiced" beats "sales".
- **Start simple, then refine.** Ask for the core document first, then add to it.
- **Ask for a prompt** when the value should change each run: *"let me pick the region when I run it"*.
- **Rolling periods stay rolling.** "Last 30 days" stays current in a scheduled document.
- **Don't type sensitive data** into a question. What you type is sent to your AI provider.

## Additional Resources

- [What You Can Ask: Questions and Examples](https://help.dashboardfox.com/ai-query/what-you-can-ask-questions-and-examples)
- [Troubleshooting Ask AI](https://help.dashboardfox.com/ai-query/troubleshooting-ask-ai)
- **DashboardFox Academy:** [Ask AI: build a report from a question](https://dashboardfox.com/academy/ask-ai-first-report/)
