Test your agents

Completed

Because an agent consists of instructions, topics, tools, and knowledge, each component must function correctly and work together as intended. You should validate how the agent guides customers through conversations and ensure the conversation flow behaves as expected.

Test panel

You can test your agent in real-time by using the test agent panel, which you can enable by selecting Test in the upper right-hand side of the application. To hide the test pane, select the Test button again.

Screenshot of Test button and Test panel.

The Test your agent panel interacts with your agent just as a user would. As you enter text into the test agent window, information is presented as it would be to a user.

By testing your agents often throughout the creation process, you can ensure that the conversation flows as anticipated. If the dialog doesn't reflect your intention, you can change the dialog and save it. The latest content is pushed into the test agent, and you can try it out again.

Testing classic orchestration

If you have classic orchestration enabled, your agent likely contains multiple topics. As you engage with a specific topic, it might be handy to have the application take you to that topic.

You can accomplish this task by setting Track between topics to On at the top of the Test panel.

A screenshot of the track between topics toggle.

Track between topics follows along with the agent as it implements the different topics. For example, typing "hello" would trigger the Greeting topic, and then the application opens the Greeting topic and displays its conversation path in the window. If you type "Hello" the application switches to display the Greetings topic. As each topic is displayed, you can observe how the path progresses, which help you evaluate how your topics are doing.

Testing generative AI orchestration

If you have generative AI orchestration enabled, the agent can select multiple tools or topics at once. Once knowledge, tools, and topics are selected, the agent generates a plan that determines their execution order. You can display this plan and the steps being run.

You can accomplish this task by setting Show activity map when testing to On at the top of the Test panel.

A screenshot of the show activity map toggle.

The activity map is a visual mapping of your agent's sequence of inputs, decisions, and outputs within a session.

Screenshot of an activity map.

Testing variable values

You can observe the values of your variables as you test your agent.

  1. Select Variables on the secondary toolbar. The Variables panel appears.

  2. Switch to the Test tab and expand the desired variable categories. As you proceed with your test conversation, you can monitor the value of the variables in use.

    Screenshot of variables pane test tab.

Testing generative answers

The agent uses generative answers as a fallback when it's unable to identify a topic that provides an acceptable answer.

When testing the generative answer capabilities, you should ask a question relevant to the data sources that you defined for generative AI, but that can't be answered by any of your topics. Your agent uses the defined data sources to find the correct answer.

Once an answer is displayed, you can ask more follow-up questions. The agent remembers the context, so you don't have to provide further clarification. For example, if you asked an agent that was connected to Microsoft Learn as a data source a question such as "What is an IF statement used for in Microsoft Excel?" the agent returns details about the IF statement function. If you then asked it to "Provide me with an example." The agent would realize that you're still talking about Microsoft Excel and provide you with an example.

We'll now look at how to monitor the performance of your agents.