Extend and optimize message extensions for use with Microsoft 365 Copilot

Completed

In this unit, you learn how to extend and optimize your message extension for use with Microsoft 365 Copilot.

Copilot orchestrator

The Copilot orchestrator is what determines whether your plugin is called to get data in response to a user prompt, or not.

Visual illustration of the sequential steps in the text following this image.

  1. Natural language input, the user types a prompt to Copilot through Microsoft 365 chat.
  2. Search for relevant plugins, the Copilot orchestrator searches its catalog of installed and enabled plugins for an initial list of relevant skills.
  3. Reasoning, Copilot draws upon the combined knowledge of its LLM (large language model) and your organizational data from Microsoft Graph to analyze the request and determine the context of the user. It then breaks down the user's prompt into intents, or goals. Each goal is then broken into tasks.
  4. Mapping user's intent to slots, the orchestrator maps the user's tasks to plugin skills and/or built-in Copilot skill functions, mapping implicit constraints from the user's prompt to the slots (parameter values) required to execute each of the identified skills.
  5. Execute plugin, Copilot, and its plugins are called to execute their selected skills.
  6. Generate summary, Copilot merges, filters, or ranks the responses from different assistants, and generates a single response for the user.
  7. Natural language output, finally, Copilot delivers the response to the user.

Microsoft 365 Copilot can uniquely choose the right skill from thousands. But how can you make sure Copilot chooses your plugin to provide the right skill?

The answer lies in how you describe your plugin, its skills, and the parameters for skill execution.

Optimize app, command, and parameter descriptions

To ensure that Microsoft 365 Copilot selects your plugin to provide the right skill, you need to provide detailed descriptions of your plugin, its skills, and the parameters for skill execution. These descriptions are used by the Copilot orchestrator to match the user's prompt to the most relevant plugin and skill.

  • Plugin (app) descriptions, should include the user actions, the types of input, and the types of output, for which your plugin is intended.

    {
        "description": {
            "short": "Product look up tool.",
            "full": "Get real-time product information and share them in a conversation. Search by product name or target audience. Contoso products works with Microsoft 365 Chat. Find products at Contoso. Find Contoso products called mark8. Find Contoso products named mark8. Find Contoso products related to Mark8. Find Contoso products aimed at individuals. Find Contoso products aimed at businesses. Find Contoso products aimed at individuals with the name mark8. Find Contoso products aimed at businesses with the name mark8."
        }
    } 
    
  • Skill (command) descriptions, are used to interpret the user's prompt into an intent and then map that to the most relevant skill available to Copilot. Include which action the skill handles, and the expected format of input and description of the output.

    {
       "id": "Search",
       "type": "query",
       "title": "Products",
       "description": "Find products by name or by target audience",
       "initialRun": true,
       "fetchTask": false,
       "context": [...],
       "parameters": [...] 
    }
    
  • Parameter descriptions explains what the parameter is, not what the parameter does, and the expected format.

    {
        "parameters": [
          {
            "name": "ProductName",
            "title": "Product name",
            "description": "The name of the product as a keyword",
            "inputType": "text"
          },
          {
            "name": "TargetAudience",
            "title": "Target audience",
            "description": "Audience that the product is aimed at. Consumer products are sold to individuals. Enterprise products are sold to businesses",
            "inputType": "text"
          }
        ]
    }
    

Multiparameter support for complex utterances

When used directly in Microsoft Teams chat and Outlook mail compose, your message extension plugin can only interpret simple user prompts with a single parameter per command.

When used as a plugin in Microsoft 365 Copilot, the copilot orchestrator can use multiple parameters to interpret complex user prompts, up to a maximum of five parameters per command.

The copilot orchestrator can use semantic reasoning to map the user's prompt to the parameters defined in the app manifest.

Suppose you have a parameter with the description Audience that the product is aimed at. Consumer products are sold to individuals. Enterprise products are sold to businesses. The copilot orchestrator can map the user's prompt to the parameter TargetAudience based on the description provided in the app manifest.

When the user enters the prompt Find Contoso products aimed at individuals, the copilot orchestrator maps the user's prompt to the TargetAudience parameter with the value Consumer.