Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Task 01: Create and test a tool

Introduction

Using the configured knowledge sources, Contoso’s agent needs to perform actions based on user queries to provide a seamless customer experience. This task involves creating an action using generative AI orchestration.

Description

In this task, you’ll create a tool that allows the agent to interact with external connectors and perform specific tasks. You’ll configure the tool and set up the necessary inputs and outputs.

Success criteria

  • You successfully created a tool with the correct inputs and outputs.
  • You verified that the agent can use the tool based on user queries.
  • You tested the tool by asking relevant questions.

Key tasks


01: Create a tool

  1. On the command bar for the agent, select Tools.

    qxnk6iy8.jpg

  2. Select + Add a tool.

    layv4vzu.jpg

  3. In the search bar, enter and search for:

     Get forecast for today
    
  4. In the list of search results, select Get forecast for today from MSN Weather.

    rfxw5trz.jpg

  5. In the Connection section, select the dropdown arrow next to the text Not connected, and then select Create new connection.

    7d23zjeq.jpg

  6. In the Connect to MSN Weather dialog, select Create.

    wyzq9z29.jpg

  7. In the Add tool dialog, select Add and configure.

    ddi957gm.jpg

  8. On the Get forecast for today page, in the Details section, expand Additional details.

    66m1ucip.jpg

  9. In the Credentials to use section, select End user credentials.

    9wn2a1f6.jpg

    This uses the connector under the context of the agent author, rather than prompting the end user to connect.

  10. Move through the page down to the Inputs section.

    gbsx5zg2.jpg

  11. On the line for Units, select Custom value.

    azrufb12.jpg

  12. In the Value field, select Imperial.

    oqvyk9r4.jpg

  13. On the command bar for the agent, select Save.

    o6a6nuwu.jpg


02: Test the tool

  1. Open the agent testing pane and then select Start new test session.

    tkelh0bn.jpg

  2. Submit the following prompt and review the response:

     How is the weather today?
    

    30gdiy3m.jpg

  3. Respond by providing a city:

     Dallas
    

    68b17z7u.jpg

    The agent automatically updates the Inputs with the city and provides an answer.