Skip to content

Ask the AI

The Ask the AI panel lives in the Saiku workbench toolbar. Click the ⚡ button and a drawer slides in from the right where you can type questions in plain English and get back a structured cube query without writing MDX.

It’s the fastest way to get to “first useful number” on a cube you haven’t memorised yet — and the panel always shows you the query it generated, so the machinery never feels opaque.

Opening the panel

  1. Pick a cube in the left sidebar — the panel always asks against the currently selected cube.

  2. Click the ⚡ Ask the AI button in the workspace toolbar. (Keyboard: there’s no global shortcut yet — the button is your entry point.)

  3. The drawer slides in from the right. If no cube is picked, the empty state tells you to pick one first.

Asking a question

Type your question into the textarea at the bottom and press Send — or ⌘/Ctrl + Enter to send without reaching for the mouse. Plain Enter inserts a newline so multi-line questions work too.

Examples that resolve well:

  • “Show sales by country for last quarter.”
  • “Top 5 customers by store sales in 1997.”
  • “How does unit sales break down by store type and quarter?”
  • “Just the totals by region.”

The model only sees this cube’s schema — measure names, dimension hierarchies, level names, sample members — so questions that reference things present in the cube resolve well. Questions about data on a different cube don’t (the AI doesn’t see other cubes).

Multi-turn — follow up on the previous answer

Once you’ve asked one question, the next one can reference the first:

“Show sales by country last quarter.” → 3 rows.

“Now break it down by region as well.” → still using sales last quarter, but with region added.

Prior turns are sent back to the model as context, so follow-ups resolve naturally. Clear conversation (🗑 in the panel header) wipes that context if you want a fresh start.

Reading the answer

Each answer is a bubble in the chat thread containing:

  • A one-line summary — “12 rows returned.” or a self-correction message when the model picked something invalid.
  • ▶ Generated MDX — click to expand. This is the exact MDX the engine ran. Inside the expanded view:
    • Copy — drops the MDX onto your clipboard.
    • Edit in canvas — loads the MDX into your active query tab and re-runs it on the workbench. The chart, the grid, sort, drill, export — everything you’d do with a hand-built query just works.
  • via model-name — small footer showing which LLM produced this answer. Useful for “why did this question behave differently yesterday?” debugging.

The result also lives in the panel — you only need Edit in canvas when you want the full workbench around it.

Self-correction — when the model picks something invalid

The model can name a measure or dimension the cube doesn’t have. When it does, you’ll see a bubble that says “The model emitted a query that didn’t validate” with a small Did you mean (for <field>) section listing the closest valid names as clickable chips.

Click any chip → the chip’s text is appended to your prompt → ask again. The model uses the correction as a hint and usually gets it right the second time.

This is the same self-correcting validation envelope the AI Query API exposes to agents, surfaced here as clickable suggestions.

What the panel doesn’t do

The panel is deliberately narrow:

  • One cube at a time. Cross-cube questions (“compare Sales vs HR”) aren’t supported — pick the right cube first.
  • No streaming. The reply appears once the model finishes; the ❄️ thinking dots are your status indicator.
  • No SQL output. The panel speaks MDX (the OLAP language Saiku uses internally) — if you need raw SQL, use the MDX & Export tools after Edit in canvas.
  • No history across sessions. The chat thread lives in the drawer’s open state. Closing the drawer or refreshing the page starts a fresh conversation.

Privacy

Each question is sent to your configured LLM provider (Anthropic or OpenAI) along with the active cube’s schema (measure names, dimension names, sample member captions). It does not see:

  • Other cubes you can access — only the one in the request.
  • The underlying SQL or warehouse credentials.
  • Conversation history from other users.
  • The HTTP request, your session cookie, or any header.

If your deployer uses an OpenAI-compatible endpoint pointed at on-prem infrastructure (Azure / vLLM / Ollama), the questions never leave that boundary. See the AI Ask API page for the provider model.

When to use Ask the AI vs the rest of the workbench

GoalUse
Get a first useful number on a new cubeAsk the AI, then Edit in canvas
Build a query field-by-field with full controlDrag and drill in the workbench
Author a complex chartCharts
Reach into existing MDX or export raw dataMDX & Export
Let an agent query Saiku without a UIMCP server

The panel is an entry point — once you have a query, the rest of the workbench is where you live.

Where to go next