This time, we’ll use the preview “Orchestration” feature in Copilot Studio to combine multiple actions and generate responses.
Orchestration Feature
Agents with Generative AI enabled can
analyze the user’s question, identify the appropriate “topics,” “actions,” and “knowledge,” and autonomously generate responses using them.

When the orchestration feature is activated,
the agent can combine multiple actions, topics, and knowledge (taking their execution order into consideration) to generate responses.
*Similar to Semantic Kernel’s Planner or LangChain’s Plan-and-Execute approach.

In this article, we will explore how to use this orchestration feature.
What We Want to Do This Time
This time, we’ll add the action “Retrieve User Information (e.g., email) by Name” to the agent that already contains the action “Retrieve User’s Schedule” from the previous article. Using these actions, we’ll try to
check a user’s schedule based on their name.
- Ask the agent, “Tell me ○○’s schedule.”
- The agent retrieves the user’s email address using the action “Retrieve User Information by Name.”
- Next, using the retrieved email address, the agent uses the action “Retrieve User’s Schedule” to fetch the user’s schedule.
- Finally, the agent generates a response based on the information collected above.
Building the Action “Retrieve User Information (e.g., Email) by Name”
First, go to [Add an Action]:

Select [New Power Automate Flow]:

Add “User’s Name” as a parameter to the flow:

Use the “Search for Users” action from the Office 365 connector to search for user information based on the user’s name:

Apply the [Select] action to the search results to extract only the necessary information:

Return the extracted information to the agent. This completes the Power Automate flow setup.
*In this setup, if multiple users are found (e.g., users with the same name), multiple search results will be returned. However, we won’t address this issue for now.

Go back to Copilot Studio and add the Power Automate action you just created:

From [Edit]:

Write a detailed “Description” to ensure the agent can correctly use this action:

Finally, verify the descriptions for [Inputs] and [Outputs] to ensure the agent processes input and output correctly, completing the agent setup:

Action Testing: Individual Action
Prepare a user with an easily recognizable name for testing purposes.

When prompting the agent to call the action created earlier, it requests a connection. Select [Connect].

Go to connection management and create a new connection.

Perform the test again, and the user’s information is successfully retrieved, generating a response.

Action Testing: Orchestration
Create a mock schedule for the user:

Ask the agent about the user’s schedule using their name. First, the agent retrieves the user’s information (email address):

Based on the email address retrieved, it fetches the corresponding user’s schedule:

By leveraging multiple actions and knowledge resources while considering the order of execution to generate a response based on user queries, the process feels more interactive and highlights the capabilities of generative AI. It makes the experience both efficient and enjoyable.
Bonus: When Multiple Candidates (e.g., Same Name) Exist
Add another “Tanaka” user to test the scenario:

When asking the same question, the “Retrieve User Information” action correctly returns information for both “Tanaka” users. However, generative AI autonomously assumes the question is directed at the first “Tanaka” and generates a response accordingly.

Hence, when building such functionalities for production, it is necessary to utilize topics and incorporate “Human-in-the-Loop” mechanisms to ensure accurate functionality.
Related Articles
コメント