Ask AI on Virtual Apps and Direct SQL
Most questions are answered from a normal category. Ask AI can also answer questions about an existing document through a Virtual App, and can suggest SQL when a question needs more than a standard document.
Where | Does Ask AI work? | What it uses |
|---|---|---|
A normal category | Yes | The tables and fields your App Builder prepared |
A Virtual App | Yes | The columns of the saved document the Virtual App is built on |
A Direct SQL document | No, but Ask AI can suggest SQL for you to review | — |
Ask AI on a Virtual App
A Virtual App is built on the result of another saved document, such as an imported spreadsheet, an API fetch, a SQL query or blended data. Ask AI answers questions about that document's columns.
Prerequisites
AI turned on for the Advanced Reports app and for the app the source document uses
A saved source document
Ask a Question
Open the Virtual App in the document builder and select Ask AI.
Ask as usual: "total amount by vendor", "top 10 by count".
If the AI asks which value you meant, pick from the choices.
Good to know:
There is no Prepare for AI step. The AI works from the source document's column names and types.
To answer well, it also uses the values of short text columns and the range of number and date columns. This does not apply when Strict privacy is on, or to fields hidden in the source app.
If Starter questions is on for the app, Ask AI opens with three suggested questions.
A Virtual App uses the AI provider of the app its source document is built on.
Suggested SQL
Some questions can't be built as a standard document. Ask AI says so and explains why.
If you have permission to see SQL and to write Direct SQL, you also get Show suggested SQL and Copy SQL.
Select Show suggested SQL and review it.
Select Copy SQL.
Paste it into a new Direct SQL document in the Advanced SQL app.
Run it, check the result, and save.
Important: Ask AI never runs SQL it wrote. You review and run it yourself. Every Direct SQL document is checked to be read-only when it runs.
Best Practices
Name source columns clearly. "Invoice Amount" works far better than "col_7". Rename columns in the source document and answers improve straight away.
Make SQL results askable. Save a Direct SQL document, build a Virtual App on it, and you can ask plain-language questions of it from then on.
Source documents with prompts work, as long as the prompt can be skipped or answered.
Additional Resources
DashboardFox Academy: Ask AI on Virtual Apps and SQL