Use Language in Azure prompt flow

Important

Some of the features described in this article might only be available in preview. This preview is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

Prompt flow in Azure AI Studio is a development tool designed to streamline the entire development cycle of AI applications powered by Large Language Models (LLMs). You can explore and quickly start to use and fine-tune various natural language processing capabilities from Azure AI Language, reducing your time to value and deploying solutions with reliable evaluation.

This tutorial teaches you how to use Language in prompt flow utilizing Azure AI Studio.

Prerequisites

  • An Azure subscription - Create one for free.

  • You need an Azure AI Studio hub or permissions to create one. Your user role must be Azure AI Developer, Contributor, or Owner on the hub. For more information, see hubs and Azure AI roles.

    • If your role is Contributor or Owner, you can create a hub in this tutorial.
    • If your role is Azure AI Developer, the hub must already be created.
  • Your subscription needs to be below your quota limit to deploy a new flow in this tutorial.

Create a project in Azure AI Studio

Your project is used to organize your work and save state.

To create a project in Azure AI Studio, follow these steps:

  1. Go to the Home page of Azure AI Studio.

  2. Select + New project.

  3. Enter a name for the project.

  4. Select a hub from the dropdown to host your project. For information about the relationship between hubs and projects, see the hubs and projects overview documentation. If you don't yet have a hub, select Create a new hub.

    Screenshot of the project details page within the create project dialog.

    Note

    To create a hub, you must have Owner or Contributor permissions on the selected resource group. It's recommended to share a hub with your team. This lets you share configurations like data connections with all projects, and centrally manage security settings and spend. For more options to create a hub, see how to create and manage an Azure AI Studio hub. A project name must be unique between projects that share the same hub.

  5. If you're creating a new hub, enter a name.

  6. Select your Azure subscription from the Subscription dropdown. Choose a specific Azure subscription for your project for billing, access, or administrative reasons. For example, this grants users and service principals with subscription-level access to your project.

  7. Leave the Resource group as the default to create a new resource group. Alternatively, you can select an existing resource group from the dropdown.

    Tip

    Especially for getting started it's recommended to create a new resource group for your project. This allows you to easily manage the project and all of its resources together. When you create a project, several resources are created in the resource group, including a hub, a container registry, and a storage account.

  8. Enter the Location for the hub and then select Next. The location is the region where the hub is hosted. The location of the hub is also the location of the project. Azure AI services availability differs per region. For example, certain models might not be available in certain regions.

  9. Select an existing Azure AI services resource (including Azure OpenAI) from the dropdown or create a new one.

    Screenshot of the create resource page within the create project dialog.

  10. On the Review and finish page, you see the Azure AI services resource name and other settings to review.

    Screenshot of the review and finish page within the create project dialog.

  11. Review the project details and then select Create a project. You see progress of resource creation and the project is created when the process is complete.

    Screenshot of the resource creation progress within the create project dialog.

Once a project is created, you can access the playground, tools, and other assets in the left navigation panel.

You can create an Azure AI Language flow by either cloning the samples available in the gallery or creating a flow from scratch. If you already have flow files in local or file share, you can also import the files to create a flow. For the purposes of this tutorial we'll be using the prebuilt Analyze Conversations flow.

To create a prompt flow from the gallery in Azure AI Studio:

  1. Sign in to Azure AI Studio and select your project.

  2. From the collapsible left menu, select Prompt flow.

  3. Select + Create.

  4. Find the Analyze Conversations tile in the gallery and select Clone.

  5. In the right sidebar, name the folder and click the Clone button.

  6. After the process is complete, you'll be taken to the prompt flow wizard. Click Start Compute Session in the upper right hand corner to begin. The various parts of the wizard are out lined below:

    Screenshot of the prompt flow wizard page with each part of the tool numbered.

    1. A graph view of your flow.
    2. Files in your flow. Click the arrow to expand this section.
    3. Azure AI Language tools in the "More tools" dropdown menu, which you can add capabilities that you need for your flow. There are more tools that you can add from LLM, Prompt, and Python menu. This menu is only accessible after the compute session has started.
    4. Configure your output.
    5. Configure steps (or tools) in the flow.
    6. Run, evaluate, and deploy your flow.
  7. Once you've configured everything to your liking, press the run button in the upper right hand corner.