Product
AI Workspace
The AI Workspace turns a question into an answer you can audit:
- Generate — your question is converted into DuckDB SQL using the data dictionary.
- Show — the SQL is displayed in an editor. You can change it.
- Validate — the SQL passes through the same guard as the SQL Explorer.
- Execute — it runs on the read-only snapshot.
- Visualize & explain — a chart is suggested and the result is summarized. The explanation only describes rows that were actually returned.
Engines
| Engine | When | Notes |
|---|---|---|
llm | An AI provider is configured (AI_PROVIDER, AI_API_KEY) and the daily budget is not exhausted. | OpenAI-compatible, OpenRouter or Anthropic. If the model produces SQL that fails validation, it gets one retry with the error. |
template | No provider configured, budget reached, or provider error. | A deterministic engine that recognizes a fixed set of question patterns. It is labeled clearly and will tell you when it cannot answer. |
The engine used is returned with every answer (engine field) and shown in the interface.
Quotas
AI questions count against a daily quota per tier (see tiers). Administrators also set a global daily budget in USD for the LLM provider; when it is reached, DataLayer falls back to the template engine instead of failing silently.
Tips
- Name the time window ("in the last hour", "today", "this week").
- Use the vocabulary of the schema: launches, trades, migrations, creators, wallets.
- If an answer looks wrong, read the SQL first — it is the ground truth of what was computed.