Skip to content

Commit 35201ae

Browse files
committed
2 parents 129f019 + 3b6bd80 commit 35201ae

File tree

7 files changed

+138
-17
lines changed

7 files changed

+138
-17
lines changed

articles/advisor/advisor-resiliency-reviews.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ You can manage access to Advisor personalized recommendations using the followin
6161
| **Name** | **Description** |
6262
|---|:---:|
6363
|Subscription Reader|View reviews for a workload and recommendations linked to them.|
64-
|Subscription Owner<br>Subscription Contributor|View reviews for a workload, triage recommendations linked to those reviews, manage review recommendation lifecycle.|
65-
|Advisor Recommendations Contributor (Assessments and Reviews)|View review recommendations, accept review recommendations, manage review recommendations' lifecycle.|
64+
|Subscription Owner<br>Subscription Contributor|View reviews for a workload, triage recommendations linked to those reviews, manage the recommendation lifecycle.|
65+
|Advisor Recommendations Contributor (Assessments and Reviews)|View accepted recommendations, and manage the recommendation lifecycle.|
6666

6767
You can find detailed instructions on how to assign a role using the Azure portal - [Assign Azure roles using the Azure portal - Azure RBAC](/azure/role-based-access-control/role-assignments-portal?tabs=delegate-condition). Additional information is available in [Steps to assign an Azure role - Azure RBAC](/azure/role-based-access-control/role-assignments-steps).
6868

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: Azure OpenAI Service getting started with customizing a large language model (LLM)
3+
titleSuffix: Azure OpenAI Service
4+
description: Learn more about the concepts behind customizing an LLM with Azure OpenAI.
5+
ms.topic: conceptual
6+
ms.date: 03/26/2024
7+
ms.service: azure-ai-openai
8+
manager: nitinme
9+
author: mrbullwinkle
10+
ms.author: mbullwin
11+
recommendations: false
12+
---
13+
14+
# Getting started with customizing a large language model (LLM)
15+
16+
There are several techniques for adapting a pre-trained language model to suit a specific task or domain. These include prompt engineering, RAG (Retrieval Augmented Generation), and fine-tuning. These three techniques are not mutually exclusive but are complementary methods that in combination can be applicable to a specific use case. In this article, we'll explore these techniques, illustrative use cases, things to consider, and provide links to resources to learn more and get started with each.
17+
18+
## Prompt engineering
19+
20+
### Definition
21+
22+
[Prompt engineering](./prompt-engineering.md) is a technique that is both art and science, which involves designing prompts for generative AI models. This process utilizes in-context learning ([zero shot and few shot](./prompt-engineering.md#examples)) and, with iteration, improves accuracy and relevancy in responses, optimizing the performance of the model.
23+
24+
### Illustrative use cases
25+
26+
A Marketing Manager at an environmentally conscious company can use prompt engineering to help guide the model to generate descriptions that are more aligned with their brand’s tone and style. For instance, they can add a prompt like "Write a product description for a new line of eco-friendly cleaning products that emphasizes quality, effectiveness, and highlights the use of environmentally friendly ingredients" to the input. This will help the model generate descriptions that are aligned with their brand’s values and messaging.
27+
28+
### Things to consider
29+
30+
- **Prompt engineering** is the starting point for generating desired output from generative AI models.
31+
32+
- **Craft clear instructions**: Instructions are commonly used in prompts and guide the model's behavior. Be specific and leave as little room for interpretation as possible. Use analogies and descriptive language to help the model understand your desired outcome.
33+
34+
- **Experiment and iterate**: Prompt engineering is an art that requires experimentation and iteration. Practice and gain experience in crafting prompts for different tasks. Every model might behave differently, so it's important to adapt prompt engineering techniques accordingly.
35+
36+
### Getting started
37+
38+
- [Introduction to prompt engineering](./prompt-engineering.md)
39+
- [Prompt engineering techniques](./advanced-prompt-engineering.md)
40+
- [15 tips to become a better prompt engineer for generative AI](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/15-tips-to-become-a-better-prompt-engineer-for-generative-ai/ba-p/3882935)
41+
- [The basics of prompt engineering (video)](https://www.youtube.com/watch?v=e7w6QV1NX1c)
42+
43+
## RAG (Retrieval Augmented Generation)
44+
45+
### Definition
46+
47+
[RAG (Retrieval Augmented Generation)](../../../ai-studio/concepts/retrieval-augmented-generation.md) is a method that integrates external data into a Large Language Model prompt to generate relevant responses. This approach is particularly beneficial when using a large corpus of unstructured text based on different topics. It allows for answers to be grounded in the organization’s knowledge base (KB), providing a more tailored and accurate response.
48+
49+
RAG is also advantageous when answering questions based on an organization’s private data or when the public data that the model was trained on might have become outdated. This helps ensure that the responses are always up-to-date and relevant, regardless of the changes in the data landscape.
50+
51+
### Illustrative use case
52+
53+
A corporate HR department is looking to provide an intelligent assistant that answers specific employee health insurance related questions such as "are eyeglasses covered?" RAG is used to ingest the extensive and numerous documents associated with insurance plan policies to enable the answering of these specific types of questions.
54+
55+
### Things to consider
56+
57+
- RAG helps ground AI output in real-world data and reduces the likelihood of fabrication.
58+
59+
- RAG is helpful when there is a need to answer questions based on private proprietary data.
60+
61+
- RAG is helpful when you might want questions answered that are recent (for example, before the cutoff date of when the [model version](./models.md) was last trained).
62+
63+
### Getting started
64+
65+
- [Retrieval Augmented Generation in Azure AI Studio - Azure AI Studio | Microsoft Learn](../../../ai-studio/concepts/retrieval-augmented-generation.md)
66+
- [Retrieval Augmented Generation (RAG) in Azure AI Search](../../../search/retrieval-augmented-generation-overview.md)
67+
- [Retrieval Augmented Generation using Azure Machine Learning prompt flow (preview)](../../../machine-learning/concept-retrieval-augmented-generation.md)
68+
69+
## Fine-tuning
70+
71+
### Definition
72+
73+
[Fine-tuning](../how-to/fine-tuning.md), specifically [supervised fine-tuning](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/fine-tuning-now-available-with-azure-openai-service/ba-p/3954693?lightbox-message-images-3954693=516596iC5D02C785903595A) in this context, is an iterative process that adapts an existing large language model to a provided training set in order to improve performance, teach the model new skills, or reduce latency. This approach is used when the model needs to learn and generalize over specific topics, particularly when these topics are generally small in scope.
74+
75+
Fine-tuning requires the use of high-quality training data, in a [special example based format](../how-to/fine-tuning.md#example-file-format), to create the new fine-tuned Large Language Model. By focusing on specific topics, fine-tuning allows the model to provide more accurate and relevant responses within those areas of focus.
76+
77+
### Illustrative use case
78+
79+
An IT department has been using GPT-4 to convert natural language queries to SQL, but they have found that the responses are not always reliably grounded in their schema, and the cost is prohibitively high.
80+
81+
They fine-tune GPT-3.5-Turbo with hundreds of requests and correct responses and produce a model that performs better than the base model with lower costs and latency.
82+
83+
### Things to consider
84+
85+
- Fine-tuning is an advanced capability; it enhances LLM with after-cutoff-date knowledge and/or domain specific knowledge. Start by evaluating the baseline performance of a standard model against their requirements before considering this option.
86+
87+
- Having a baseline for performance without fine-tuning is essential for knowing whether fine-tuning has improved model performance. Fine-tuning with bad data makes the base model worse, but without a baseline, it's hard to detect regressions.
88+
89+
- Good cases for fine-tuning include steering the model to output content in a specific and customized style, tone, or format, or tasks where the information needed to steer the model is too long or complex to fit into the prompt window.
90+
91+
- Fine-tuning costs:
92+
93+
- Fine-tuning can reduce costs across two dimensions: (1) by using fewer tokens depending on the task (2) by using a smaller model (for example GPT 3.5 Turbo can potentially be fine-tuned to achieve the same quality of GPT-4 on a particular task).
94+
95+
- Fine-tuning has upfront costs for training the model. And additional hourly costs for hosting the custom model once it's deployed.
96+
97+
### Getting started
98+
99+
- [When to use Azure OpenAI fine-tuning](./fine-tuning-considerations.md)
100+
- [Customize a model with fine-tuning](../how-to/fine-tuning.md)
101+
- [Azure OpenAI GPT 3.5 Turbo fine-tuning tutorial](../tutorials/fine-tune.md)
102+
- [To fine-tune or not to fine-tune? (Video)](https://www.youtube.com/watch?v=0Jo-z-MFxJs)

articles/ai-services/openai/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ items:
4747
href: ./concepts/abuse-monitoring.md
4848
- name: Content filtering
4949
href: ./concepts/content-filter.md
50+
- name: Customizing Large Language Models (LLMs)
51+
href: ./concepts/customizing-llms.md
5052
- name: Embeddings
5153
href: ./concepts/understand-embeddings.md
5254
- name: Fine-tuning

articles/app-service/provision-resource-bicep.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ To deploy a different language stack, update `linuxFxVersion` with appropriate v
109109
| **PHP** | linuxFxVersion="PHP&#124;7.4" |
110110
| **Node.js** | linuxFxVersion="NODE&#124;10.15" |
111111
| **Java** | linuxFxVersion="JAVA&#124;1.8 &#124;TOMCAT&#124;9.0" |
112-
| **Python** | linuxFxVersion="PYTHON&#124;3.7" |
112+
| **Python** | linuxFxVersion="PYTHON&#124;3.8" |
113113

114114
---
115115

articles/container-apps/spring-cloud-config-server-usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,4 +247,4 @@ You can use client side decryption of properties by following the steps:
247247
## Next steps
248248

249249
> [!div class="nextstepaction"]
250-
> [Set up a Spring Cloud Config Server](spring-cloud-config-server.md)
250+
> [Tutorial: Connect to a managed Spring Cloud Config Server](spring-cloud-config-server.md)

articles/container-apps/spring-cloud-eureka-server-usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,4 @@ Now you have a caller and callee application that communicate with each other us
181181
## Next steps
182182

183183
> [!div class="nextstepaction"]
184-
> [Use Spring Cloud Eureka Server](spring-cloud-eureka-server.md)
184+
> [Tutorial: Connect to a managed Spring Cloud Eureka Server](spring-cloud-eureka-server.md)

articles/cosmos-db/how-to-restore-in-account-continuous-backup.md

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.reviewer: mjbrown
88
ms.service: cosmos-db
99
ms.custom: build-2023, devx-track-azurecli, devx-track-azurepowershell, devx-track-arm-template
1010
ms.topic: how-to
11-
ms.date: 05/08/2023
11+
ms.date: 03/21/2024
1212
zone_pivot_groups: azure-cosmos-db-apis-nosql-mongodb-gremlin-table
1313
---
1414

@@ -138,7 +138,8 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
138138
    --resource-group <resource-group-name> \ 
139139
    --account-name <account-name> \ 
140140
    --name <database-name> \
141-
    --restore-timestamp <timestamp>
141+
    --restore-timestamp <timestamp> \
142+
--disable-ttl True
142143
```
143144
144145
1. Initiate a restore operation for a deleted container by using [az cosmosdb sql container restore](/cli/azure/cosmosdb/sql/container#az-cosmosdb-sql-container-restore):
@@ -148,8 +149,9 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
148149
    --resource-group <resource-group-name> \ 
149150
    --account-name <account-name> \ 
150151
    --database-name <database-name> \
151-
--name <container-name> \
152-
    --restore-timestamp <timestamp>
152+
--name <container-name> \
153+
--restore-timestamp <timestamp> \
154+
--disable-ttl True
153155
```
154156
155157
:::zone-end
@@ -210,6 +212,7 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
210212
    --account-name <account-name> \ 
211213
    --name <database-name> \
212214
    --restore-timestamp <timestamp>
215+
--disable-ttl True
213216
```
214217
215218
1. Initiate a restore operation for a deleted collection by using [az cosmosdb mongodb collection restore](/cli/azure/cosmosdb/mongodb/collection#az-cosmosdb-mongodb-collection-restore):
@@ -220,7 +223,8 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
220223
    --account-name <account-name> \ 
221224
    --database-name <database-name> \
222225
--name <container-name> \
223-
    --restore-timestamp <timestamp>
226+
    --restore-timestamp <timestamp> \
227+
--disable-ttl True
224228
```
225229
226230
:::zone-end
@@ -280,7 +284,8 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
280284
--resource-group <resource-group-name> \ 
281285
--account-name <account-name> \ 
282286
--name <database-name> \
283-
--restore-timestamp <timestamp>
287+
--restore-timestamp <timestamp> \
288+
--disable-ttl True
284289
```
285290
286291
1. Initiate a restore operation for a deleted graph by using [az cosmosdb gremlin graph restore](/cli/azure/cosmosdb/gremlin/graph#az-cosmosdb-gremlin-graph-restore):
@@ -291,7 +296,8 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
291296
--account-name <account-name> \ 
292297
--database-name <database-name> \
293298
--name <graph-name> \
294-
--restore-timestamp <timestamp>
299+
--restore-timestamp <timestamp> \
300+
--disable-ttl True
295301
```
296302
297303
:::zone-end
@@ -342,7 +348,8 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
342348
    --resource-group <resource-group-name> \
343349
    --account-name <account-name> \
344350
    --table-name <table-name> \
345-
    --restore-timestamp <timestamp>
351+
    --restore-timestamp <timestamp> \
352+
--disable-ttl True
346353
```
347354
348355
:::zone-end
@@ -424,6 +431,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
424431
DatabaseName = "<database-name>"
425432
Name = "<container-name>"
426433
RestoreTimestampInUtc = "<timestamp>"
434+
DisableTtl= $true
427435
}
428436
Restore-AzCosmosDBSqlContainer @parameters
429437
```
@@ -481,6 +489,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
481489
AccountName = "<account-name>"
482490
Name = "<database-name>"
483491
RestoreTimestampInUtc = "<timestamp>"
492+
DisableTtl=$true
484493
}
485494
Restore-AzCosmosDBMongoDBDatabase @parameters
486495
```
@@ -494,6 +503,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
494503
DatabaseName = "<database-name>"
495504
Name = "<collection-name>"
496505
RestoreTimestampInUtc = "<timestamp>"
506+
DisableTtl=$true
497507
}
498508
Restore-AzCosmosDBMongoDBCollection @parameters 
499509
```
@@ -551,6 +561,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
551561
AccountName = "<account-name>"
552562
Name = "<database-name>"
553563
RestoreTimestampInUtc = "<timestamp>"
564+
DisableTtl=$true
554565
}
555566
Restore-AzCosmosDBGremlinDatabase @parameters
556567
```
@@ -564,6 +575,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
564575
DatabaseName = "<database-name>"
565576
Name = "<graph-name>"
566577
RestoreTimestampInUtc = "<timestamp>"
578+
DisableTtl=$true
567579
}
568580
Restore-AzCosmosDBGremlinGraph @parameters
569581
```
@@ -610,6 +622,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
610622
AccountName = "<account-name>"
611623
Name = "<table-name>"
612624
RestoreTimestampInUtc = "<timestamp>"
625+
DisableTtl=$true
613626
}
614627
Restore-AzCosmosDBTable @parameters
615628
```
@@ -663,7 +676,8 @@ You can restore deleted containers and databases by using an Azure Resource Mana
663676
"name": "<name-of-database-or-container>",
664677
"restoreParameters": {
665678
"restoreSource": "<source-account-instance-id>",
666-
"restoreTimestampInUtc": "<timestamp>"
679+
"restoreTimestampInUtc": "<timestamp>",
680+
"restoreWithTtlDisabled": "true"
667681
},
668682
"createMode": "Restore"
669683
}
@@ -680,7 +694,8 @@ You can restore deleted containers and databases by using an Azure Resource Mana
680694
"name": "<name-of-database-or-collection>",
681695
"restoreParameters": {
682696
"restoreSource": "<source-account-instance-id>",
683-
"restoreTimestampInUtc": "<timestamp>"
697+
"restoreTimestampInUtc": "<timestamp>",
698+
"restoreWithTtlDisabled": "true"
684699
},
685700
"createMode": "Restore"
686701
}
@@ -697,7 +712,8 @@ You can restore deleted containers and databases by using an Azure Resource Mana
697712
"name": "<name-of-database-or-graph>",
698713
"restoreParameters": {
699714
"restoreSource": "<source-account-instance-id>",
700-
"restoreTimestampInUtc": "<timestamp>"
715+
"restoreTimestampInUtc": "<timestamp>",
716+
"restoreWithTtlDisabled": "true"
701717
},
702718
"createMode": "Restore"
703719
}
@@ -714,7 +730,8 @@ You can restore deleted containers and databases by using an Azure Resource Mana
714730
"name": "<name-of-table>",
715731
"restoreParameters": {
716732
"restoreSource": "<source-account-instance-id>",
717-
"restoreTimestampInUtc": "<timestamp>"
733+
"restoreTimestampInUtc": "<timestamp>",
734+
"restoreWithTtlDisabled": "true"
718735
},
719736
"createMode": "Restore"
720737
}

0 commit comments

Comments
 (0)