Skip to content
Chat with your data · Explainer

Natural language to chart: how AI turns a question into a visual

What happens in the few seconds between typing a question and seeing a chart, step by step, and why each step matters for getting the right answer.

For the complete AI-readable content index, see /llms.txt.

DashboardGPT TeamUpdated 4 min read
On this page
  1. From question to chart in five steps
  2. Step 1: Understand the intent
  3. Step 2: Map words to columns
  4. Step 3: Write and run the query
  5. Step 4: Choose the chart
  6. Step 5: Explain what it shows
  7. How to steer each step
  8. When the chart looks wrong
  9. FAQ

Key takeaways

  • A question becomes a chart in five steps: intent, mapping, query, chart choice and explanation.
  • The AI does not draw the chart from imagination. It runs a real query and charts the result.
  • Chart type follows the shape of the result: a trend becomes a line, a ranking becomes bars.
  • You can steer every step by naming the metric, the breakdown, the window or the chart you want.

From question to chart in five steps

Type "Monthly revenue by region for the last 6 months" and a chart appears a few seconds later. Behind it, five things happen in order.

Step 1: Understand the intent

The question is broken into parts:

PartIn this question
Metricrevenue
Aggregationsum
Breakdownregion
Time grainmonth
Windowlast 6 months
Filtersnone

Most business questions fit this shape. When a part is missing, the tool fills it with a sensible default (for example, "all time" or the most recent complete period) or asks you. When a part is ambiguous, such as "revenue" when there are gross and net columns, a good tool asks rather than guesses.

Step 2: Map words to columns

Next, each part is matched to real columns. "Revenue" maps to order_value_usd, "region" to region, and "month" to the primary date column, order_date.

This step depends on the column profile created when the data was loaded. The profile records each column's type and role, so the AI knows that order_date is a date, order_value_usd is money to be summed and order_id is an identifier to be counted, never summed.

Poor column names are the most common reason this step goes wrong. val1 and dt2 give the AI nothing to work with, which is why clear names make such a difference.

Step 3: Write and run the query

With the parts mapped, the AI writes a query. For this question it is roughly:

SELECT date_trunc('month', order_date) AS month,
       region,
       SUM(order_value_usd) AS revenue
FROM orders
WHERE order_date >= date_trunc('month', current_date) - interval '6 months'
GROUP BY 1, 2
ORDER BY 1, 2;

The query runs against your data. In DashboardGPT, query execution is built on Apache Superset. This is the step that makes the numbers trustworthy: they are computed, not predicted by a language model.

Step 4: Choose the chart

The result has a time column, a category column and a measure. That shape calls for a line per region, or grouped bars if there are only a few months.

The general rules:

Result shapeChart
One numberMetric card
Measure over timeLine chart
Measure over time, split by a categoryMultiple lines, or stacked bars for parts of a total
Measure by categoryBar chart, sorted largest first
Parts of one whole, few categoriesShare chart
Two measures per itemScatter plot
Many columnsTable

The chart is chosen from the result, not from keywords in the question. Asking for "a trend" does not force a line if the result has no time column.

Step 5: Explain what it shows

Finally, a short written insight is generated from the result: which region is largest, which grew fastest, where the biggest change was. It cites the figures, so you can check them against the chart.

On the DashboardGPT canvas, the chart and its insight land together as one object. You can move it, group it with related answers or ask a follow-up about it.

How to steer each step

You control the result by what you put in the question:

  • Name the metric precisely: "net revenue after discounts" rather than "sales".
  • Name the breakdown: "by plan", "by channel", "by sales rep".
  • Name the window: "last 90 days", "Q3 2026", "since January".
  • Name the chart if you care: "as a bar chart, largest first".
  • Add filters in words: "only delivered orders", "excluding internal accounts".

And after the chart appears, you can adjust it with a follow-up: "Show this as a percentage of the total" or "Switch to weekly".

When the chart looks wrong

If a chart surprises you, check which step went wrong:

SymptomLikely stepWhat to do
Numbers far too bigMapping: an ID was summed, or a join doubled rowsAsk how it was calculated; name the right column
Wrong time rangeIntent: default window usedAdd the window to the question
Odd chart typeChart choice: result shape was unexpectedAsk for the chart type you want
Insight contradicts the chartExplanationTrust the chart's figures and report the mismatch

Frequently asked questions

It identifies the metric, breakdown and time window in the question, maps them to real columns, writes and runs a query, picks a chart that fits the result and writes a short explanation.

No. The chart is drawn from the result of a real query against your data.

Yes. Add it to the question, or ask for a different chart after the first one appears.

The AI maps the words in your question to column names and profiles. Clear names such as `order_value_usd` make that mapping reliable.

A good tool asks you to clarify, for example whether you mean gross or net revenue, instead of guessing.

Ask your data a question.

Open the playground and ask about revenue, churn or campaign spend. Charts, metrics and written insights appear on an infinite canvas.

  • No account, no install
  • Free plan with CSV and Excel uploads
  • Bring your own AI key