Using the Prompt Playground
To generate a test query, perform these steps:
- Click the button from the GenAI Settings page.
- Specify a natural language question in the Prompt field: something the end users might ask.
- Optionally, use the Subject Area selector to narrow the scope. This limits the AI to only the measures and attributes enabled within the selected subject area, reducing ambiguity.
- Click .
- Review the generated BQL in the Response area.
Evaluating the Response
When reviewing the generated BQL, check for:
- Correct measures: Did the AI pick the right measure for the question?
- Correct attributes: Are the grouping dimensions relevant to what was asked?
- Accurate filter values: If the question implies a filter, does the generated query use the right values from the data warehouse?
- Proper aggregation: Is the measure aggregated as expected, such as Sum, Count, Average, and so on?
- Time handling: If the question references a time period, is it filtered correctly?
Iterating on Your Configuration
If the generated query is not what you expected:
- Check Data Model Descriptions. Is the relevant measure or attribute enabled? Does it have a clear label and description?
- Check Embedding Processing. If filter values are wrong, is the attribute enabled for embedding? Is the right model selected?
- Check the Instructions. Would a custom instruction help clarify the AI's behavior for this type of question?
- Make your changes in the appropriate tab, then return to the Prompt Playground and test again.
Example Workflow
To verify how the AI handles a question about sales by region, perform these steps:
Testing AI Query generation
Use the Prompt Playground to verify how the AI interprets your semantic model and generates BQL queries.
- Test prompts that reflect how your users naturally ask questions.
- Include edge cases, such as ambiguous questions, misspellings, and indirect references to data.
- Retest your prompts after updating labels, descriptions, embeddings, or AI instructions.
- Use the Subject Area selector to focus the AI on the most relevant measures and attributes.
- Maintain a standard set of test prompts and run them after each configuration change to validate results consistently.
- Remember that the Prompt Playground uses the same AI configuration that end users experience. The generated output reflects what users will receive.
- Review the generated BQL to confirm that it matches the intent of your prompt.
- Note that the Prompt Playground does not execute queries against your data. It only displays the BQL that would be generated.
- Expect variations when you run the same prompt multiple times. If results are inconsistent, use more specific labels, descriptions, or instructions.
- If you do not select a subject area, the system automatically uses the Default Subject Area.