Documentation

Updating Variable Values

Once defined, you can then expose your variables for update, allowing their values to be updated by the LLM at specific points in your process.

What does exposing your variables for update mean?

  • When a variable is exposed for update, it is essentially made available to the LLM for update during that Stage of the Agent

  • The LLM can choose whether or not it should set or update the value of the variable

  • The LLM makes the decision to set or update the variable based on:

    1. The description of the variable provided by the author

    2. Any prompting provided in support of how the variable should be interpreted at that particular stage of the conversation process

    3. The past transcript of the conversation combined with the intent of the user as they respond.

Important

It’s important to understand that even though the variable has been exposed to the LLM, it may or may not set or update the variable.

This is because, as with any human conversation, this is highly dependent on context. iostack enables you to author Agents that operate in the same way, updating data based on a full understanding of the conversational context.

As a result, if you need to constrain or direct the process of the conversation depending on the value of a variable, you should model that constraint in the plain language conditions for your transitions.

It also might mean structuring your Agent with flexibiity in mind so that it can to deal with the lack of certainty inherent in natural conversation. This will also result in a more robust Agent design in the face of normal conversational patterns.

Agent-Wide Variable Update

  • To configure a variable to be updatable agent-wide, add it to the list of variables exposed for update in the Common Stage Settings section of the agent.

  • Support for updating variables agent-wide is useful for use cases where for example, a variable is used to control behaviour according to conditions or information that may differ as the agent proceeds.

  • For example, a variable that modifies the behaviour of the Agent might be the user’s chosen language.

To support consistent behaviour modification across your Agent as determined by the value of a variable, the value of this variable should be exposed to the LLM in one of the agent-wide prompting fields. This ensures that the LLM will always have the value of this controlling variable front and centre at every turn - and therefore will not have to rely on its attention picking it up just from the transcript.

Stage-Specific Variable Update

  • To configure a variable to be exposed for update during a specific stage, add it to the list of exposed variables in the stage by opening the stage (click on it in the Flow section) and adding it to the list of variables exposed for update.

  • Variables can also have default values, can be marked as externally initialised and can also have substitute values supporting obfuscation of their true value when exposed to the LLM (for example, for avoiding bias by preventing the LLM from seeing the actual value).

For more details on the various options applicable to Variables, refer to the Variables documentation.

On this page