Using the Prompt Playground

To generate a test query, perform these steps:
  1. Click the Prompt Playground button from the GenAI Settings page.
  2. Specify a natural language question in the Prompt field: something the end users might ask.
  3. 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.
  4. Click Generate Query.
  5. 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:

  1. Check Data Model Descriptions. Is the relevant measure or attribute enabled? Does it have a clear label and description?
  2. Check Embedding Processing. If filter values are wrong, is the attribute enabled for embedding? Is the right model selected?
  3. Check the Instructions. Would a custom instruction help clarify the AI's behavior for this type of question?
  4. 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:
  1. Open the Prompt Playground.
  2. Specify: "What are the total sales by region for this year?"
  3. Click Generate Query.
  4. Review the response:
    • SELECT [Sum: net_sales] 'Total Sales', [Geography.Region] 'Region'
    • FROM [ALL]
    • WHERE [Time.Year] = 2026
  5. Confirm the correct measure, attribute, and time filter are used.
  6. If the AI used [Sum: gross_sales] instead and you wanted net sales, go to Instructions and add: "When users ask about 'sales' without specifying, use net sales."
  7. Return to the Prompt Playground and test again to confirm.

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.