For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bot Conversation Variables

Conversation variables act as dynamic placeholders in most chatbot, copilot, workflow messages, and prompt engineering contexts to dynamically insert specific user data (like names, timestamps, or session IDs) into live responses.

The Aisera Gen AI platform allows you to use these types of variables in Conversation Key Messages and Workflow Message Nodes. However, we have not tested every possible use case, so we recommend your use your variables on a test system before moving them to production.

Common conversation variable syntaxes and purposes:

1. Common Syntax & Examples

  • $VARIABLE (such as, $USER): Often used in conversational AI platforms to reference pre-defined system states or user-provided entities.

  • {variable} (such as, {user_name}): Common in modern LLM frameworks and JSON/API payloads.

  • %s (String Formatting): Traditional programming syntax used in Python (such as, "Hello %s" % username) or C to inject text programmatically before passing a prompt to an AI model.

  • {{variable}} (such as, {{conversation.user_name}}): Heavily used in web development, Jinja templating, and bot frameworks (like Botpress) to escape and render variables in text strings.

2. Common Scopes & Types

  • User Variables: Store data tied directly to a specific user (such as, name, email, timezone) and persist across different chat sessions.

  • Conversation Variables: Store temporary, short-term memory during a single, ongoing chat session (such as, a cart_id, ticket_number, or current state).

  • System Variables: Built-in, read-only parameters provided by the platform (such as, {$conversationId}, $current_time).

3. Practical Applications

  • Personalization: Dynamically greeting users by name: "Welcome back, $USER!"

  • Contextual Responses: Citing previous answers: "You previously selected %s as your preferred shipping address."

  • State Management: Passing memory into LLM instructions, such as injecting previous messages or a conversation_id into API payloads.

Last updated

Was this helpful?