Manage AI context for a data model (Beta)

🚩

This documentation describes one or more public beta features that are in development. Beta features are subject to quick, iterative changes; therefore the current user experience in the Sigma service can differ from the information provided in this page.

This page should not be considered official published documentation until Sigma removes this notice and the beta flag on the corresponding feature(s) in the Sigma service. For the full beta feature disclaimer, see Beta features.

You can add AI context to a data model to help Sigma Assistant better understand how to use your data model as a data source. Adding AI context to a data model can help improve the accuracy and consistency of Sigma Assistant responses when answering questions that use the data model as a source.

This document explains how to add and manage AI context for a data model.

💡

Sigma Assistant uses AI context when answering questions that use this data model as a source. To provide context about a data model to users or metadata to help Sigma Assistant identify a data model as a suitable data source, see Edit a data model description.

Requirements

The ability to add and edit AI context for a data model requires the following:

  • An AI provider must be configured for your organization. See Configure AI features for your organization.
  • You must be assigned an account type with the Create, edit, and publish data models and Use Assistant permissions enabled.
  • You must be the data model owner or be granted Can edit access to the data model.

Add AI context to a data model

Add AI context to a data model to improve the accuracy and consistency of Sigma Assistant responses when answering questions that use the data model as a source.

  1. Open the data model.
  2. In the data model header, click Edit.
  3. From the document menu, select File > Set AI context.
  4. In the AI context modal, select Edit.
  5. In the text box, enter the AI context, using Markdown syntax for formatting and referencing tables, columns, metrics, and relationship by name.

For example, you might include the following:

  • Define aliases or alternative names for columns, tables, or metrics:

    When users ask about "COGS", always refer to the "Cost of Goods Sold" column.
  • Explain when to use a column in one table versus another:

    Use the Date column in the ORDERS table when a user asks about when an order was placed. Use the Date column in the SHIPMENTS table when a user asks about delivery or fulfillment timing.
  • Set guardrails for how data should be used:

    **Never** use this data model for forecasting or predictions. If a user attempts to use it for those purposes, please direct them to the Sales Data - Predictions and Forecasting data model.
  • Provide instructions about when to use a metric:

    If a user asks for data related to "Net Profit Margin", **always** use the NET_PROFIT_MARGIN metric. Do not write a new formula.
  • Provide guidance for formatting responses:

    When referring to dates in this data model, **always** display them in %m/%d/%Y format, regardless of how the column is formatted in the data.
  • Direct Sigma Assistant to the correct table or tables in the data model for a particular kind of query:

    If a user asks about sales regions, **always** use the REGIONS_SALES_ENRICHED table for the most up-to-date and accurate information.
  • Explain when to use a relationship:

    When a user asks about customer purchase behavior or wants to analyze transaction data with customer attributes, use the Transactions + Customers relationship to access customer columns from the TRANSACTIONS table. Do not join the tables manually.
  • Describe data freshness and refresh schedules:

    Data in this model is refreshed daily at midnight UTC. Queries about "current" or "today's" data may reflect the previous day's values.
  • Clarify units and currency:

    All monetary values are in USD unless the column name explicitly indicates otherwise (for example, REVENUE_EUR).
  • Define aggregation rules for pre-computed metrics:

    Never sum the AVG_ORDER_VALUE column. Always calculate average order value as total revenue divided by total orders.
    📘

    When writing AI context for a data model, consider the following limitations:

    • AI context is limited to 10,000 characters.
    • You cannot use dynamic text formulas.
  1. Click Add.
  2. Click Publish to set the AI context and make it available to Sigma Assistant.
📘

If you add AI context to a data model during an active Sigma Assistant chat session, you must start a new chat session for Sigma Assistant to use the updated context.

Edit AI context for a data model

You can edit AI context for a data model to refine Sigma Assistant's performance, or remove it entirely.

  1. Open the data model.
  2. In the data model header, click Edit.
  3. From the document menu, select File > Set AI context.
  4. In the AI context modal, select Edit.
  5. In the text box, add, edit, and remove context as needed.
  6. Click Save.
  7. Click Publish to update the AI context and make it available to Sigma Assistant.
📘

If you update AI context for a data model during an active Sigma Assistant chat session, you must start a new chat session in order for Assistant to access the updated context.

Review AI context for a data model

You can view the AI context for a data model from the data model overview page without opening the data model for editing in order to quickly review what has been configured. You cannot edit the AI context from this view.

  1. Open the data model.
  2. From the document menu, select File > View AI context.
  3. Review the AI context and close the modal when you are finished.