Ask a question over a permitted model
The Ask a question panel in Query Console translates supported wording into read-only SQL over the selected model. It is distinct from editing SQL yourself and starting a durable saved-query run.
Run and inspect an answer
- Select the intended workspace and semantic model, and inspect its available entities, dimensions, metrics and relationships.
- Start with an offered example or a concrete question using that model's vocabulary. Include only information approved for the configured service.
- Choose Ask once and wait for its outcome. Ask can translate and execute the generated SQL; it is not a preview-only action.
- Inspect the interpretation, generated SQL, clarification and actual returned rows. A translation or confidence score alone is not an executed result.
- Open the generated SQL in the editor to review or change it. Choosing Execute there is a separate execution.
If a question needs clarification, use the explanation and model vocabulary to revise it. A missing join path or unrecognized value is not permission to query another model or bypass governance. Handle source errors, access refusals and quota responses as their actual outcomes.
Follow-up wording, such as “only paid orders” or “and by region,” refers to earlier answered questions in the conversation. Start a new conversation when changing intent. Keep history within the same user, workspace and model; do not carry another person's questions into an API request.
API users who require translation without execution can use semTranslateQuestion; semAskQuestion is the translate-and-execute operation. See the natural-language API reference for inputs, statuses and limits.
Optional AI assistance (BYOK settings)
The normal grounded translator is separate from optional provider-assisted rewording. When a question returns NO_MATCH or LOW_CONFIDENCE, an enabled workspace can send the question and the model's vocabulary (never data rows) to its own OpenAI or Anthropic connection so the provider can propose a reworded question.
- Connect OpenAI or Anthropic under Integrations in the same workspace. Keys are stored encrypted in the Integrations service, never inside SemanticFed.
- In Query Console → AI assistance, toggle Reword unmatched questions with my AI provider, select the connection, and optionally specify a model (defaults:
gpt-4o-minifor OpenAI,claude-opus-5-5for Anthropic). - Select Save. Reading settings (
semNlSettings) requiresreadonsemanticfed-model; updating settings (semUpdateNlSettings) requiresupdateonsemanticfed-access-policy(held by Federation Owner and Governance Lead). Seeing the panel does not grant write permission.
The provider proposes a reworded question only; replies that look like SQL are discarded, and the deterministic parser still validates and builds the query under workspace access policies.
Assistance status outcomes
assist status | Meaning |
|---|---|
NOT_NEEDED | Deterministic parser answered on its own, or rewording cannot resolve the issue (such as NO_JOIN_PATH). |
SKIPPED | Caller set allowAssist: false on the request. |
DISABLED | AI assistance is turned off for the workspace. |
NOT_CONFIGURED | Selected connection is missing, revoked, or not OpenAI/Anthropic. |
QUOTA_EXHAUSTED | Workspace reached its daily semanticfed.ai.operations allowance. |
QUOTA_UNAVAILABLE | Allowance check could not complete, so the provider was not called. |
PROVIDER_ERROR | Provider was unreachable, rejected the key, or returned an error. |
NO_IMPROVEMENT | Provider returned a rewrite, but it still could not match the model. |
REPHRASED | Provider reworded the question and the grounded translator succeeded (engine: semantic-parser-v1+llm-rephrase). |
Limits, clarifications and privacy
- Question length: maximum 1,000 characters (
TOO_LONGotherwise). - Conversation history: up to the last 10 prior questions (
history, oldest first); keep history strictly within the same user, workspace and model. - Execution bounds:
maxRowsdefaults to 1,000 (maximum 10,000);timeoutMsdefaults to 30,000 ms (maximum 60,000 ms). - Metering:
semTranslateQuestionis not metered as a query run;semAskQuestionmeters one query run (semanticfed.query_runs.monthly). Each BYOK provider call counts as onesemanticfed.ai.operationsoperation (daily plan allowances: Free 25, Starter 250, Growth 2,500, Business 25,000); inference charges are billed directly by your provider. - Privacy and audit: Activity logs record a SHA-256 hash of the question rather than raw question text, alongside follow-up and
assistmetadata. - Clarification reasons (nothing is executed when
statusisNEEDS_CLARIFICATION):EMPTY_QUESTION,TOO_LONG,NO_MATCH,NO_JOIN_PATH,UNSUPPORTED_AGGREGATION(for exampleMEDIAN),INVALID_FILTER,LOW_CONFIDENCE,INVALID_QUERY, andUNPLACED_VALUE(a follow-up value without a single text column in context).
What this guide does not demonstrate
The synthetic SQL recording demonstrates direct SQL over invented records. It does not demonstrate a paid AI provider, first-time provider setup, or durable saved-query execution. Verify provider-connected workflows separately with approved noncustomer fixtures.