Optimizing trigger phrases and natural language understanding

Important

Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.

Some articles and screenshots may refer to Power Virtual Agents while we update documentation and training content.

What are trigger phrases in Microsoft Copilot Studio

  • Trigger phrases train your copilot's natural language understanding (NLU) model.

  • Trigger phrases are configured at the topic level and indicate to the copilot for what typical user utterances a specific topic should be triggered.

  • Trigger phrases typically capture the way an end-user would ask about a problem or issue. For example, "problem with weeds in lawn"

Tip

When creating a new topic, a maker only needs to provide a few sample phrases (ideally between five and ten). When the copilot is used, the AI will parse what the user says and trigger the topic closest in meaning to the user utterance.

The importance of the triggering context

Microsoft Copilot Studio NLU behaves differently based on the conversation state, which can sometimes lead to different behaviors for the same user utterance.

The following are the different conversation states:

  • Start of the conversation: the copilot has no context, so a user utterance is expected to either: trigger a topic directly (intent recognition), trigger a "did you mean" (Multiple Topics Matched) disambiguation question among intent candidates if there are multiple matching topics, or go to a fallback topic if the intent isn't recognized.
  • After a "did you mean" (Multiple Topics Matched) is triggered: NLU optimizes to match one of the suggested topics, with higher thresholds to move out of the presented options.
  • Switching out from a current topic: If the NLU Is trying to fill a slot In a topic, and the user is giving a user query that could trigger another topic (topic switching).

On punctuation

The NLU model Is agnostic to punctuation, including question marks.

Creating new trigger phrases

If possible, start with real production data over making up your own trigger phrases. The best trigger phrases are the ones similar to actual data coming from end users. These phrases are the ones that users ask a deployed copilot.

There's no need to leave specific words out: the model is designed to give less weight to unnecessary words, such as stop words (words that are filtered out before the processing of natural language data because they're insignificant).

Optimizing trigger phrases

# Tip Examples
1 Have at least 5-10 trigger phrases per topic
Iterate and add more as you learn from users.
Find my nearest store
Check store location
Find a store
Find me your nearest location
Store near me
2 Vary sentence structure and key terms
The model automatically considers variations of those phrases.
When are you closed
Daily open hours
3 Use short trigger phrases
Fewer than 10 words.
When are you open
4 Avoid single-word trigger phrases
This increases weight for specific words in topic triggering.
It can introduce confusion between similar topics.
Store
5 Use complete phrases Can I talk to a human assistant
6 Have unique verbs and nouns or combinations of those I need customer service
I want to speak with a consultant
7 Avoid using the same entity variation
You don't need to use all of the examples from the entity value.
The NLU automatically considers all the variations.
I want to order a burger
I would like a pizza
I want chicken nuggets

Balance the number of trigger phrases per topic

Try to balance the number of trigger phrases between topics.

Tip

That way, the NLU capabilities don't overweight a topic versus another based on the configured trigger phrases.

Assessing the impact of your changes

When updating trigger phrases, or when merging or splitting topics, there are multiple ways to assess the changes:

  • An immediate change in copilot behavior, which can be observed through the "test copilot" canvas (for example, a topic that's now triggering or not based on trigger phrase updates).
  • A change after copilot deployment and facing traffic, which translates to higher or lower deflection (non-escalation) rates. This can be observed from the analytics tab in Microsoft Copilot Studio.

Tip

You can test topic triggering and how your NLU model performs against test data in bulk, by leveraging the Copilot Test Framework.

Although the underlying features and components used to build the Copilot Test Framework (such as interacting with the Direct Line API) are fully supported, the Copilot Test Framework itself represents sample implementations of these features.

Our customers and community can use and adjust the Copilot Test Framework to implement bulk testing. If you face issues with the Copilot Test Framework, report the issue here: https://aka.ms/PVASamples. (Microsoft Support won’t help you with issues related to these samples, but they will help with related, underlying platform and feature issues.)