Fine-tuning
Last updated
Last updated
Fine-tune a language model for chat completion in the Azure AI Foundry
When you want a language model to behave a certain way, you can use prompt engineering to define the desired behavior. When you want to improve the consistency of the desired behavior, you can opt to fine-tune a model, comparing it to your prompt engineering approach to evaluate which method best fits your needs.
In this exercise, you'll fine-tune a language model with the Azure AI Foundry that you want to use for a custom chat application scenario. You'll compare the fine-tuned model with a base model to assess whether the fine-tuned model fits your needs better.
Imagine you work for a travel agency and you're developing a chat application to help people plan their vacations. The goal is to create a simple and inspiring chat that suggests destinations and activities. Since the chat isn't connected to any data sources, it should not provide specific recommendations for hotels, flights, or restaurants to ensure trust with your customers.
You start by creating an Azure AI Foundry portal project within an Azure AI hub:
In a web browser, open https://ai.azure.com and sign in using your Azure credentials.
From the home page, select + Create project.
In the Create a new project wizard, create a project with the following settings:
Project name: project47427734
Select Customize
Hub name:Hub47427734
Subscription: Autofills with your signed in account
Resource group: Please use ResourceGroup1
Location: Choose one of the following regions East US2, North Central US, Sweden Central, Switzerland West*
Connect Azure AI Services or Azure OpenAI: (New) Autofills with your selected hub name
Connect Azure AI Search: Skip connecting
* Azure OpenAI resources are constrained at the tenant level by regional quotas. The listed regions in the location helper include default quota for the model type(s) used in this exercise. Randomly choosing a region reduces the risk of a single region reaching its quota limit. In the event of a quota limit being reached later in the exercise, there's a possibility you may need to create another resource in a different region. Learn more about
Review your configuration and create your project.
Wait for your project to be created.