Docs

Guide · 5 min read

Building dashboards with AI

Hanomina dashboards are built through a chat conversation with the AI. You type what you want in plain English; the AI writes the SQL, builds the chart, and renders it in your dashboard. This guide is about getting good results out of that loop.

The basic workflow

  1. Create a new dashboard. The page starts empty.
  2. Type a request in the chat drawer at the bottom: "show me total sales by month".
  3. The AI writes a SQL query, runs it against your data, writes the HTML/Chart.js to render the result, and drops it into the dashboard above.
  4. Iterate by replying: "make it a line chart instead", "add a YoY comparison", "split by region".

What makes a good prompt

The AI is good at:

  • Aggregate questions — "count by region", "sum by month", "average order value by customer".
  • Ranking — "top 10 customers", "which products had the worst margin".
  • Time series — daily, weekly, monthly trends. It'll pick the right granularity based on the data range.
  • Joins — "total sales by product category" (joining orders → products), "split by customer region" (joining orders → customers).
  • Layout judgment — KPI tile vs. bar chart vs. table. You can override but the defaults are usually reasonable.

It needs more help with:

  • Ambiguous terms — "active user" could mean many things. Pin definitions in the data source's Notes for the AI field.
  • Unit conventions — if amounts are stored in cents but you think in dollars, say so in the Notes field. Otherwise the AI displays raw values.
  • Multi-step analysis — "find customers who churned then came back" might need two or three follow-up clarifications. Iterate.

Asking questions without editing the page

You can ask the AI factual questions about your data without it touching the dashboard. Just ask: "which date had the highest sales?" The AI will run a one-off query, see the actual answer, and reply with the real number. Useful when you want information but don't need a permanent chart for it.

If you do want it on the page, just say "add that as a chart" on the next turn.

The AI cites its work

Every chart links to the SQL that produced it. If a number looks wrong, click through to see the query, the raw results, and the error message (if any). Three things to check when a chart looks off:

  1. The SQL. Did the AI pick the right columns and the right join keys?
  2. The results. Did the query return actual rows? Empty results usually mean a too-restrictive WHERE clause.
  3. The render code. The HTML/Chart.js reads the SQL results from window.__data["queryName"]. If the data's there but the chart is empty, the chart code is referencing the wrong field name.

Tell the AI which layer is wrong and it'll narrow its fix to the right place rather than rewriting from scratch.

Version history

Every AI edit creates a version snapshot. From the dashboard's history panel you can scrub back to any prior state — useful when an edit broke something or you changed your mind. Snapshots are kept indefinitely on Pro and above, and for 90 days on Free.

Bring your own AI key

By default, AI generation uses Hanomina's platform API key (Google Gemini 3 Flash) with a per-org monthly cap. If you have your own OpenAI, Anthropic, or Google API key, you can drop it into Settings → AI Integration to switch the underlying model and bypass the cap entirely (you pay your provider directly). Three providers supported: OpenAI (GPT-5), Anthropic (Claude Sonnet 4.5), Google (Gemini).

When the AI gets it wrong

Two specific failure modes worth knowing about:

  • It makes up numbers. Should never happen on a populated dashboard (the AI is shown the actual query results before replying), but on a brand- new empty dashboard it might guess from context. If you see a number you didn't expect, push back —"run that as a query and confirm".
  • It claims to have fixed something it didn't. Usually because the underlying data source is broken (revoked credentials, missing grants). Check the data source page for a status pill that isn't green.