Documentation

Variables

Variables allow the Agent's state to be stored.

  • Variable values can be 'shown' to the LLM as part of prompting so that the LLM can react to changes in the state of the Agent as the dialog progresses.

  • The author can choose when to show specific variables to the LLM, enabling focused prompting relevant to the task at hand in any Stage.

  • Variable values can also be made available for direct update by the LLM, allowing the author to leverage the intelligence of the LLM to extract nuanced answers - or to allow for variables to be changed on the fly as the interaction between the agent and the user evolves over time.

  • Similarly to showing a variable to the LLM, the author can choose when to expose specific variables to the LLM for update, enabling focused data extraction relevant to and supported by the specific prompting in any given Stage.

  • Variables can also be shown to or made available for update by the LLM over the whole course of the Agent interaction i.e. at every turn.

  • Variables are the entities that get populated by or passed to external integrations to connect your Agent with the real world.

What’s in a variable definition?

A Variable definition includes (among other attributes):

Name

This is exposed to the LLM when allowing the LLM to update its value, so it should be consistent with its purpose.

Purpose

This is also exposed to the LLM so it should be consistent with its purpose and verbose enough for the LLM to infer when and how it should update your variable.

Type

An appropriate data type reflecting the variable's use. This is important for ensuring that the LLM will update your variable with the correct type of value as well as enabling accurate communication of your variable to the outside world.

On this page