About AskTable
How AskTable works
How AskTable understands questions, queries data, and produces verifiable results.
AskTable queries and analyzes data within the user's permissions and retains the process used to query, calculate, and produce results.
The complete journey of a question
Retrieve semantics
After you send a question, the agent first searches your data semantics: table structures, field descriptions, business documents, skills, and historical SQL. Business documents are searched by both keywords and meaning.
The agent looks at relevant tables and documents as needed instead of handing every table structure to the model at once. It can only see content within your current permissions.
Clarify definitions
If the question lacks a time range, granularity, or metric definition, the agent asks you first (requires user clarification to be enabled). With clarification disabled, it makes reasonable assumptions from the available semantics and states them in its conclusions.
Generate and validate SQL
Before SQL runs, it is validated: only reads are allowed, and every referenced table must actually exist. The query is also rewritten for your current role, so permissions take effect before query execution, rather than hiding data after it has been queried. See How results stay reliable for validation rules and How permissions restrict access for permission rules.
Execute and return results
The data source executes the SQL. Results become data artifacts, shown as query results in the interface with row and column counts. The agent calls chart generation when charts are needed, and Python execution for complex calculations.
Record sources
Results retain the SQL actually executed and the data sources used, so you can expand them to verify the process or change conditions and rerun. The complete execution trace for that turn is written to the agent's audit logs.
How results stay reliable
Language models can misunderstand a question or invent table names and numbers. AskTable makes numbers come only from actual execution, blocks errors that can be detected before execution, and makes every conclusion checkable and correctable.
| Stage | Mechanism | What it does |
|---|---|---|
| Before execution | Understand the business first | Uses field descriptions, data profiles, AI indexes, business documents, and training sets to understand the question; see Data semantics are the source of accuracy |
| Before execution | Ask when uncertain | With user clarification enabled, the agent confirms missing conditions instead of assuming a definition for the user |
| During execution | Numbers must come from tools | For questions about specific data, numbers in the answer must come from read-only SQL or Python execution. The model cannot supply them from memory |
| During execution | Block nonexistent tables | SQL that references a table missing from the data source metadata is rejected before it runs; table names must be written as full schema.table names instead of relying on the database's default path |
| During execution | Read-only | Writes, DDL, and SELECT * are rejected |
| During execution | Fix after errors | When SQL fails, the original error is returned to the agent so it can fix the query and retry; if it still fails, the error is reported as is instead of falling back to a “rough estimate” |
| Python calculation | Isolated execution | Python code runs in a separate sandbox, and each run is independent |
| After execution | Traceability | Expand each conclusion to see the SQL actually executed, data source, and duration; change conditions and rerun |
| After execution | Improve with feedback | Users like or dislike answers, and administrators use that feedback to improve field descriptions, business documents, or training sets; see Logs and user feedback |
These mechanisms cannot guarantee that every answer is correct, but they let errors be blocked, seen, and corrected. Accuracy depends on how complete your data semantics are.
How permissions restrict access
Permissions rewrite queries before SQL runs:
| Layer | How it works |
|---|---|
| Row-level filtering | Based on your current role, filters are inserted directly into the SQL WHERE clause to restrict visible rows at the data layer |
| Field visibility | Fields you are not authorized to view are excluded during semantic retrieval. Even if a question names such a field directly, SQL can only reference visible fields; SQL that references a hidden field is rejected before it runs |
| Training sample retrieval | Historical question–SQL samples are filtered by visible tables during retrieval, preventing examples from leaking hidden structures |
| Entry-point identity | Requests from Feishu, embedded pages, and APIs have their identity and scope established at the entry point before entering this workflow |
See Permissions and data scopes for the three configuration locations and their precedence.
Object model
Project
├── Data sources Queryable databases, files, or workbooks
├── Data agents User-facing entry points for data questions
│ ├── Skills Reusable analysis methods
│ ├── Business documents and preferences Persistent analysis context
│ └── Channels / scheduled tasks / embedding External entry points
├── Analysis canvases Node-based in-depth analysis workflows
├── Data dashboards Pages of refreshable results for ongoing monitoring
├── People / roles / policies Members, data scopes, and row-level conditions
└── Result assets Saved data tables and chartsA project is the isolation unit, and all resources belong to a project. A data agent packages data sources, skills, capability switches, and permissions into a ready-to-use assistant. Business users interact with it without needing to know which databases are connected underneath.
Data semantics are the source of accuracy
AskTable does not inherently know your business. It uses the following information to understand terms such as “revenue” and “active users”:
| Semantic source | Purpose |
|---|---|
| Field descriptions | Explain a field's business meaning, with precedence: manual > native database description > AI-generated |
| Data profiles | When metadata syncs, AskTable samples the data automatically to count rows, distinct values, and nulls, record value ranges, and read the database's primary and foreign keys |
| Semantic types | Mark primary keys, foreign keys, email addresses, regions, and similar types to help determine joins and groupings |
| Field visibility | Determine whether a field is visible to the AI |
| Masking types | Apply type-specific masking to names, phone numbers, national ID numbers, bank card numbers, and email addresses |
| AI indexes | Map abbreviations in questions to actual field values |
| Training sets | Provide examples of questions paired with correct SQL for retrieval |
| Business documents | Define metrics, business rules, and industry terminology; see Business documents |
When business definitions are wrong, improving data semantics is more effective than rephrasing the question.
Next steps
- Connect your own data: Connect data sources
- Help AI understand your business definitions: Table and field descriptions
- Control who can see what: Permissions and data scopes
- Inspect each execution: Logs and user feedback