We don't just generate SQL. We understand what you're asking first.
When you ask "top 10 customers by revenue," we don't pattern-match keywords and hope the LLM gets it right. We route your question through one of 7 discovery strategies — entity lookup, comparison, TopK ranking, extrema detection, dimension breakdown, universal quantifier, or time-bounded analysis. Each strategy has its own SQL generation rules, its own validation path, and its own failure modes.
Seven discovery strategies
Ask "top 10 customers by revenue" and you get TopK ranking — which picks a different SQL shape than "compare revenue by region over time," which routes to comparison. The strategy determines the query structure before the model writes anything.
Explore the pipeline
Hover or tap any node to see how it works
Strategies
Entity resolution: matching your words to your data
When you say "tech stocks" or "enterprise customers," we need to figure out what those words mean in your database. That's entity resolution. We use pgvector with 384-dimensional embeddings to run vector similarity search against the column value samples we collected during schema profiling. Response time is sub-50ms.
If the search returns 0 hits, the system doesn't silently proceed with a bad query. Entity-centric strategies (like entity lookup) abort entirely and ask you to clarify. Analytical strategies (like dimension breakdown) soft-fail to entity-free mode — they still work, just without the entity filter. You get the full picture instead of a filtered subset, and the system tells you why.
Keyword probes: verifying against your actual data
After entity resolution, the pipeline runs keyword probes — small SQL queries against your database to find the actual values that match your keywords. If you ask about "Q3 revenue," the probe checks whether your date columns actually contain Q3 data and which fiscal calendar your tables use.
Probe results persist across the conversation. Once we know that "Acme Corp" maps to row ID 4217 in your customers table, we don't re-resolve it on the next turn. Fuzzy matching is capped at 12 results per keyword to prevent runaway queries against high-cardinality columns.
Example queries and their strategies
Each question routes to a specific strategy. The strategy determines the SQL structure before the LLM generates anything.
"What were our top 10 customers by revenue last quarter?"
Joins orders, customers, and line_items with date filtering and aggregation.
strategy: topk_ranked"Show me monthly active users over the past year"
Counts distinct users per month from session tables with DATE_TRUNC alignment.
strategy: time_bounded_only"Which products have the highest return rate?"
Calculates return percentage per product with NULL handling and ordering.
strategy: extrema_detection"Compare revenue by region, month over month"
Multi-dimensional grouping with temporal alignment and region-level aggregation.
strategy: comparisonStart generating verified SQL
Connect and ask your first question. Takes two minutes, no card needed.