Edit

Share via


Create and deploy a CQA agent

This article gives you clear steps and important tips for building and deploying a CQA agent. Whether you're new to this process or updating your skills, this guide helps you set up and launch your agent successfully.

Note

  • If you already have an Azure AI Language or multi-service resource—whether used on its own or through Language Studio—you can continue to use those existing Language resources within the Azure AI Foundry portal. For more information, see How to use Azure AI services in the Azure AI Foundry portal.
  • In Azure AI Foundry, a fine-tuning task serves as your workspace for your CQA solutions. Previously, a fine-tuning task was referred to as a CQA project. You might encounter both terms used interchangeably in older CQA documentation.
  • We highly recommend that you use an Azure AI Foundry resource in the AI Foundry; however, you can also follow these instructions using a Language resource.

Prerequisites

Before you get started, you need the following resources and permissions:

Step 1: Get started

Let's begin:

  1. Navigate to the Azure AI Foundry.

  2. If you aren't already signed in, the portal prompts you to do so with your Azure credentials.

  3. Once signed in, you can create or access your existing projects within Azure AI Foundry.

  4. If you're not already in your Foundry project with your deployed CQA knowledge base, select it now.

Step 2: Deploy an OpenAI model in Azure AI Foundry (required)

An OpenAI model serves as the foundational source of intelligence and advanced reasoning for your agent.

  1. Select Models + endpoints from the My assets section of the navigation menu:

    Screenshot of the deploy model button menu in Azure AI Foundry.

  2. From the main window, select the + Deploy model button.

  3. Select Deploy base model from the drop-down menu.

    Screenshot of the connected resources menu selection in Azure AI Foundry.

  4. From the Select a model window, select the gpt-4 base model for this project.

    Screenshot of the select a model selection in Azure AI Foundry.

  5. Next, select the Confirm button.

  6. In the Deploy gpt-4 window, keep the default values and select the Deploy button.

    Screenshot of the gpt-4 deployment window in Azure AI Foundry.

  7. Great! The model deployment step is complete.

Step 3: Connect a custom key (required)

A custom key serves as an enhanced security credential for your agent.

  1. Navigate to Management CenterConnected Resources.

    Screenshot of Management center navigation menu's connected resources selection in Azure AI Foundry.

  2. From the main window, select the + New connection button.

  3. From the Add a connection to external assets window, under Other resource types, select Custom keys.

    Screenshot of add your custom keys selection in Azure AI Foundry.

  4. In the Connect a custom resource window, configure the connection as follows:

    • Authentication. Leave this field set to Custom (default).

    • Custom keys. Select + Add key value pairs and complete the two fields as follows:

    • First field. Complete this field with the following key name:

      Ocp-Apim-Subscription-Key
      
      
    • Second field. Complete this field with the key value from your Azure portal Azure AI Foundry or Azure AI Language resource used to create your CQA knowledge base. Make sure to check the is secret box.

      Screenshot of the connect a custom resource window in the Azure AI Foundry.

    • Next, add a Connection name.

    • Finally, select the Add connection button.

  5. Your new Custom key connection is listed on the Manage connected resources in this project page.

  6. We now provisioned all the necessary resources to create an agent. Select the Go to project button to return to your project with your deployed CQA knowledge base.

    Screenshot of go to project button in Azure AI Foundry.

Step 4: Create an agent

With your OpenAI deployment and custom key in place, you're ready to begin building your agent, grounded in the knowledge base you chose for this project.

  1. From your project's overview page, select Fine tuning from the left navigation menu.

  2. In the main window, select the model name, created with your deployed CQA knowledge base, from the displayed list.

  3. Select Deploy knowledge base from the Getting started menu.

  4. Under next steps, select the Create an agent button.

    Screenshot of the create agent button in Azure AI Foundry.

  5. In the Create new CQA agent window, complete the fields as follows:

    • AI Foundry Project Name. The name of your project should already appear in this field by default.
    • Deployment Model. The name of the model that you deployed in Step 2 should already appear in this field by default.
    • Agent Name. Name your agent (don't use dashes or underscores).
    • Custom Connection. The name of the custom key that you connected in Step 3 should already appear in this field by default.
  6. Select the Next button:

    Screenshot of create CQA agent window in Azure AI Foundry.

  7. Review the details of your new agent, and then select the Create agent button.

  8. Once your agent is successfully created, select the Try in playground button.

    Screenshot of create CQA agent review and create window in Azure AI Foundry.

Step 5: Test in agents playground

The agents playground provides a sandbox to test and configure a deployed agent—adding knowledge and defining actions—before deploying it to production, all without writing code.

  1. From the Create and debug your agents window select the Try in Playground button.

    Screenshot of the **Create and debug your agents** window and **Try in playground** button in Azure AI Foundry

  2. Once the agent is successfully uploaded to the playground, you can test it by sending test queries.

    Screenshot of the agents playground in Azure AI Foundry.

That's it! The agent creation and deployment processes are complete. You now know how to deploy a CQA agent using your own custom knowledge base.

Clean up resources

To clean up and remove an Azure AI resource, you can delete either the individual resource or the entire resource group. If you delete the resource group, all resources contained within are also deleted.

Next Steps