How to Author an Agent
Last updated
Last updated
This tutorial builds upon the simulation created by the How to author AI Chat tutorial. We will be using the simulation from that tutorial as our starting point.
Note
The agents feature is only available for select HyperSkill users. If you would like access to the Agent's feature, please contact info@siminsights.com and inquire about getting access to the feature.
This guide will walk you through creating and configuring an Agent in HyperSkill to analyze cashier performance within a customer complaint scenario.
1. Accessing the Agent Editor:
Open HyperSkill and log in to your author account.
Navigate to your simulations list and enter edit mode for the chit-chat simulation
Click the AI tab, then the Agents sub-tab.
You'll see the following page:
2. Configuring the Agent:
In the "Create a new agent" section, click +Create to create a new Agent.
In the "Customize Your Agent" section, select your newly created agent. By default, the newly created agent will be selected for you.
Give the agent a name of your choosing
Under "When to run," choose Run through state machine.
Keep "Use History" toggled on.
Select your preferred language model (Azure or Google).
In the "Instructions" field, paste the following text:
Your task is to evaluate the performance of a cashier in handling a customer complaint. Instructions: - Grade the performance of the cashier based on the provided criteria. - Provide constructive feedback on areas of strength and improvement. Criteria for Evaluation: - Active Listening: Did the cashier actively listen to the customer's complaint without interrupting? Empathy: Did the cashier demonstrate empathy towards the customer's concerns? Problem Resolution: Did the cashier effectively address the customer's complaint and offer a satisfactory solution? Communication: Was the communication clear and courteous throughout the interaction? Professionalism: Did the cashier maintain professionalism and composure while dealing with the complaint? Customer Satisfaction: Did the resolution result in the customer leaving the store feeling satisfied? Grade Scale: 0 - 100 Feedback: Provide detailed feedback on the cashier's performance, highlighting strengths and areas for improvement based on the evaluation criteria.
Next we need to describe what attributes the agent should update in HyperSkill. Select a virtual object in your simulation (e.g., customer virtual person).
Add two attributes to this object:
Score (Integer): Set the initial value to -1.
Feedback (String): Leave the value empty.
In the "Describe Your Agent's Output" section, click the +Add button twice to create two output boxes.
In the first output box:
Set the name of the output to: Score
Set the description of the output to: The score for the user from 0-100
For the destination dropdowns:
Select the virtual object you added attributes to (e.g., customer virtual person).
Choose "Score" from the dropdown menu.
In the second output box:
Set the name of the output to: Feedback
Set the description of the output to: Feedback for the user
For the destination dropdowns:
Select the virtual object you added attributes to (e.g., customer virtual person).
Choose "Feedback" from the dropdown menu.
3. Testing the Agent:
Click the "Start Conversation" button at the bottom of the page to test your agent in a multi-round dialogue.
Talk with the chit-chat roleplaying character for 5 turns or however long you want the discussion to go
Once you reach a point in the conversation where you want to run the agent, click on the "Agents" tab.
Select your agent from the dropdown menu at the bottom of the page.
Click "Run Test" to run the Agent using the multi-turn dialogue.
The agent will begin running. The bottom rightmost window will show the results from the agent. You'll see a window like so.
All results from the agent will automatically update the attributes you selected in step 2. In the sample above, the "Score" attribute will update to 90 and the feedback attribute will update with the agent's feedback. As the author, you can branch based on the score the user got using a condition, or give feedback to the user using a feedback panel.
Conclusion
Congratulations! You've built your first agent. This powerful feature can enable dynamic and personalized learning experiences. Explore the agent's capabilities or try creating a new one to see what's possible!