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:
Go to the Home page of Azure AI Studio.
Select + New project.
Enter a name for the project.
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.
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.
If you're creating a new hub, enter a name.
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.
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.
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.
Select an existing Azure AI services resource (including Azure OpenAI) from the dropdown or create a new one.
On the Review and finish page, you see the Azure AI services resource name and other settings to review.
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.
Once a project is created, you can access the playground, tools, and other assets in the left navigation panel.
Using Azure AI Language via the prompt flow gallery
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:
Sign in to Azure AI Studio and select your project.
From the collapsible left menu, select Prompt flow.
Select + Create.
Find the Analyze Conversations tile in the gallery and select Clone.
In the right sidebar, name the folder and click the Clone button.
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:
- A graph view of your flow.
- Files in your flow. Click the arrow to expand this section.
- 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.
- Configure your output.
- Configure steps (or tools) in the flow.
- Run, evaluate, and deploy your flow.
Once you've configured everything to your liking, press the run button in the upper right hand corner.