Context: topics and labels
AIsuru lets you create dynamic, context aware conversations through the use of context. This feature lets you control when certain questions are appropriate and how the agent should interpret and respond to user requests based on the conversation's context.
Context: what it is and what it's for
Context management lets you define in which specific situations a question or response makes sense.
Context tells AIsuru what's being discussed at any given moment which is necessary for guiding the conversation effectively, giving access to certain contents while restricting visibility of others.
Topics and labels
Context in AIsuru is managed through two types of elements:
Topics: name-value pairs that define a specific context
The name identifies the type of context (ANIMAL, OBJECT, etc.)
The value specifies the current context (DOG, SMARTPHONE, etc.)
Example: ANIMAL:DOG
Labels: simple contexts:
The name identifies the subject being discussed (e.g., GENERAL_QUESTIONS)
Labels are actually topics with "✔️" as a hidden value
Set context and required context
Topics and labels can be used in two different ways that affect how the Agent handles contents:
Set context ("Set topics" in the platform):
Tells the Agent what's currently being discussed
Helps the Agent prioritize the most relevant contents for the current context
Does NOT restrict access to contents, but organizes them by relevance
Example:
Question: "Let's talk about dogs"
Answer: "Sure, let's talk about dogs" [set topic:
ANIMAL:DOG]After this, the Agent will know the conversation is about dogs and can give more relevant responses
Required context ("Required topics" in the platform):
Acts as a true filter that blocks the Agent from accessing certain contents until a specific context is set
The AI can only access these contents WHEN that specific context is active
If you don't set any required topics, the Agent will always have access to your content regardless of the current context
Examples:
ANIMAL:DOG: the question is only relevant when talking about dogsOBJECT:WAND: the question is only appropriate in the context of a wand
The key difference between the two types of context is:
Set context helps the Agent better understand the conversation and prioritize the most relevant contents
Required context completely blocks access to contents until that specific context is set
How to manage context in your contents
Add a context
To add context to your contents:
Go to Contents and create or edit an existing one
Go to the "Advanced: context management" section
Choose whether to add a set topic (under "Set topics") or a required one (under "Required topics")
Choose between "New topic" or "New label" based on your needs
Fill in the name and value (if applicable) in the panel that opens
Confirm and save the content
Cancel a context
To cancel a context, add a topic with the same name and enter "-" as the value.
Example: ANIMAL:- will cancel the "ANIMAL" context, which will no longer be set and will have no value.
Practical examples
Scenario: assistant for a pet store
Agent asks the user: "What kind of animal are you interested in?"
User: "Dogs", set topic:
ANIMAL:DOGRequired topic: Question: "What are the specific dietary needs?", required topic:
ANIMAL:DOGCanceling a context: Question: "I'd like to talk about a different animal", set topic:
ANIMAL:-
Conversation flow
User: "I'd like information about pets"
Agent: "Of course! What kind of animal are you interested in?"
User: "Dogs"
Agent: (sets
ANIMAL:DOG) "Great! Dogs are wonderful animals. What would you like to know about dogs?"User: "What are their dietary needs?"
Agent: (checks
ANIMAL:DOG, question is relevant) "Dogs need a balanced diet. In general, they need high-quality proteins, carbohydrates, fats, vitamins, and minerals. The amount and type of food depends on the dog's age, size, and activity level..."User: "I'd like to talk about a different animal"
Agent: (sets
ANIMAL:-) "Of course! Which other animal would you like to talk about?"
Benefits of using context
More natural and coherent conversations
More relevant and precise responses
The ability to create complex, branching dialogue paths
Better handling of multiple topics within the same conversation
Effective use of contexts and context variables can turn your Agent into a truly intelligent, context aware assistant. Experiment with these features to create rich, dynamic conversational experiences that adapt to your users' specific needs and interests.
Last updated