Prepare
You're building a declarative agent for Microsoft 365 Copilot that's grounded in your documents. Here, we discuss the project business logic and target behavior. We also cover the accounts and software you need.
Project specification
The declarative agent:
- is available within Microsoft 365 Copilot
- provides examples of how users can ask it questions
- answers a user's questions using the information from the referenced documents
- in the answer, includes a reference to the relevant document
- politely refuses to answer questions not related to its function
- admits when it doesn't have relevant information to answer a user's question
Setup
To complete this challenge, you need a Microsoft 365 tenant with the Microsoft 365 Copilot license, Visual Studio Code, and the Teams Toolkit extension.
Get a Microsoft 365 tenant with the Microsoft 365 Copilot license
To complete this exercise, you need a Microsoft 365 tenant with the Microsoft 365 Copilot license. You access Microsoft 365 Copilot through the Microsoft 365 tenant. You need the Microsoft 365 Copilot license to get access to semantic index and be able to ground agents in work documents.
Upload sample documents
Here we provide sample documents for you to use in the challenge. The documents contain product specifications and frequently asked questions about specific Contoso Electronics products. Upload them to your OneDrive or an existing SharePoint site so that they're available for use in the declarative agent you build.
Important
Upload the files to OneDrive or an existing SharePoint site so that they're immediately available for you to use. If you choose to use a new SharePoint Online site, the documents take longer to be indexed and available for use by Copilot.
Install Visual Studio Code
You build the agent using Visual Studio Code. Visual Studio Code is an IDE that provides you with tooling to build agents for Microsoft 365 Copilot. To install Visual Studio Code for your operating system, visit https://code.visualstudio.com/.
Install Teams Toolkit extension for Visual Studio Code
Teams Toolkit is a Visual Studio Code extension that helps developers build agents for Microsoft 365 Copilot. It provides you with the project boilerplate and tasks to automate building and deploying agents. To install the Teams Toolkit extension for Visual Studio Code visit https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension.
To get started, use the Teams Toolkit to create a new app with the declarative agent without an action template.