7 tips for getting the right numbers from the AI
How to phrase questions to the AI in onViz so charts use the right period and the right calculation, and are easy to check.
The AI in onViz looks at your table structure and writes the queries itself. The clearer the question, the fewer fixes you need. These tips help the most.
1. Say which period
Revenue last month is clearer than recent revenue. If you don't say, the AI uses the time range selected on screen.
2. Say how to calculate it
Before or after tax? Including cancelled orders? Put it in the question:
Net revenue excluding VAT by branch, leaving out cancelled invoices
3. Pick the right scope
In the scope box of AI chat, pick the database and schema that hold your numbers. Click Ask AI from a database page and the scope is already set.
4. Describe cryptic columns
With a column named st_inv or cust_id2 the AI has to guess. Add a short description (e.g. Invoice status: Paid / Cancelled); the AI reads it every time it writes a query.
5. Follow up instead of starting over
The AI remembers the context of the conversation. Instead of retyping the whole question, just say:
- only Hanoi
- split by month
- make it a line chart
6. Always glance at the numbers
Every chart has its query and table of numbers behind it. Before sending a report, check one or two figures against your books: a monthly total, or a customer you know well.
Warning
The AI can misread a vague question. If a number looks odd, read the query before trusting it.
7. Use a model that fits the job
Larger models (e.g. Claude Opus, the largest GPT) write multi-table queries more accurately; smaller ones are faster and cheaper and fine for simple questions. You can switch models any time in Settings › AI.
Tip
For questions you ask every month, pin the chart to a dashboard. Next time just open the dashboard instead of asking again.