Skip to Content
v0.8.0 · shippedNative mobile SDKs, optional Sentry enrichment, and bring-your-own keys/storage. Read the changelog →
Admin consoleNatural-language query
Read-only Postgres with saved queries sidebar · · open live demo ↗

Natural-language query

The Query page lets you ask questions about your project’s data in plain English. Type a question, get SQL, get a chart — no SQL knowledge required.


How it works

  1. You type a question — e.g. “How many critical bugs touched the checkout component last week, grouped by browser?”
  2. The LLM generates SQL — the prompt includes the schema for every table in the allow-list so the model can write accurate queries.
  3. The SQL is validated — a deterministic allow-list check confirms the query only reads from permitted tables. Any mutation (INSERT, UPDATE, DELETE, DROP, …) is rejected before execution.
  4. The query runs — against a read replica (or a read-only Postgres role on self-hosted setups).
  5. Results render as a chart — the LLM picks the most appropriate chart type (bar, line, pie, table) based on the result shape. You can override the type from the chart toolbar.

Allow-listed tables

Only these tables are reachable from the query page:

TableWhat’s in it
reportsEvery incoming user report with classification fields
mistake_clustersDeduplicated clusters of similar reports
lessonsPromoted learning rules with names and summaries
fix_attemptsAgent fix runs — status, PR URL, files changed
end_usersIdentified reporter profiles (rewards-linked)
end_user_pointsPer-user point totals and tier
classification_evaluationsNightly judge scores per report
graph_nodesInventory model nodes (stories, pages, elements, actions)
synthetic_runsSynthetic monitor walk results

Attempting to query any table not on this list returns a table_not_allowed error before the SQL reaches the database.


Example questions

"Which component has the most open critical reports in the last 30 days?" "Show me the daily report volume trend for the past 3 months." "What are the top 5 reporters by points this month?" "How many fix attempts failed vs. succeeded last week?" "Which lessons have been injected into the most PR reviews?" "Show reports where severity is critical and status is open, created this week."

Audit log

Every query is written to the audit log with:

  • Executing user and timestamp
  • The natural-language prompt
  • The generated SQL (full text)
  • The row count of the result
  • Whether the query was blocked by the allow-list

The audit log is accessible in Settings → Audit and is exportable as CSV.

The allow-list blocks access to end_user_activity, api_keys, project_settings, and all private.* schema tables. If a generated query tries to UNION or use a subquery to reach a blocked table, the validator catches it.


Chart types

TypeAuto-selected when
BarComparing counts or sums across categories
LineTime-series data with a date/timestamp column
Pie / DonutProportional breakdown with ≤ 8 categories
TableMore than 8 columns, or the LLM can’t infer a useful chart shape

Click the chart type selector in the toolbar to override. Charts are exportable as PNG or the underlying CSV via the menu.


Saved queries

Click Save to store a query by name. Saved queries appear in the left panel and can be shared with teammates by copying the URL. Saved queries are project-scoped — they’re visible to every member with at least Viewer access.


See also

Last updated on