HomeGuidesAnnouncementsCommunity
Guides

In Max, variables are used to store and manage dynamic information that can be accessed and modified during interactions. These variables enable assistants to adjust their behavior based on different inputs, making them more responsive and adaptable. Whether defined as skill-specific variables or chat parameters, variables allow for greater flexibility in how data is processed and displayed during a conversation.

Types of Variables

Variables in Max can be of two types:

  • Skill-Specific Variables: These are variables that are set and modified at the skill level.
  • Chat Parameters: These are variables set and modified by the chat pipeline during a conversation and exposed to the skill.

Adding Variables

When adding a variable, users can define:

  • Name: A unique identifier for the variable.
  • Type: Either a string or a list of strings.
  • Default Value: The initial value for the variable when the assistant starts.

Chat Parameter Options

When a variable is included as a chat parameter, additional configuration options become available:

  • Description: Helps the language model understand the variable's purpose and how it should be used.
  • Limiting Values: Users can restrict the variable's values to a defined set, which can include manually entered items, metrics, dimensions, or filters.

Limiting Values

Variables can be limited to specific values for better control and filtering. These values include:

  • Manual List of Items: A custom list of values set by the user.
  • Metrics from the Dataset: Numerical values or KPIs relevant to the assistant's tasks.
  • Dimensions from the Dataset: Non-numeric data categories (e.g., product names, regions).
    • If there are less than 10 values for a dimension then all will be shown as part of a constrained list to the language model.
    • If there are more than 10 available values, the system will show the 10 most common dimension values as examples for language model.
  • Date Filters: Time ranges that a user may be interested to filter data to.
  • Date Dimensions: Temporal values such as days, weeks, or months.
  • Custom Dimension Filters: Users can select dimensions individually for more precise filtering.

Exposing Values to the Language Model

The description provided when configuring a variable helps the language model assign the variable appropriately. It is the description which lets the language model know the purpose of the variable and any business rules to follow.


For more details, watch the Loom video.