You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/advisor/advisor-resiliency-reviews.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,8 +61,8 @@ You can manage access to Advisor personalized recommendations using the followin
61
61
|**Name**|**Description**|
62
62
|---|:---:|
63
63
|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.|
|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.|
66
66
67
67
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).
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)
-[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)
@@ -138,7 +138,8 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
138
138
--resource-group <resource-group-name> \
139
139
--account-name <account-name> \
140
140
--name <database-name> \
141
-
--restore-timestamp <timestamp>
141
+
--restore-timestamp <timestamp> \
142
+
--disable-ttl True
142
143
```
143
144
144
145
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
148
149
--resource-group <resource-group-name> \
149
150
--account-name <account-name> \
150
151
--database-name <database-name> \
151
-
--name <container-name> \
152
-
--restore-timestamp <timestamp>
152
+
--name <container-name> \
153
+
--restore-timestamp <timestamp> \
154
+
--disable-ttl True
153
155
```
154
156
155
157
:::zone-end
@@ -210,6 +212,7 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
210
212
--account-name <account-name> \
211
213
--name <database-name> \
212
214
--restore-timestamp <timestamp>
215
+
--disable-ttl True
213
216
```
214
217
215
218
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
220
223
--account-name <account-name> \
221
224
--database-name <database-name> \
222
225
--name <container-name> \
223
-
--restore-timestamp <timestamp>
226
+
--restore-timestamp <timestamp> \
227
+
--disable-ttl True
224
228
```
225
229
226
230
:::zone-end
@@ -280,7 +284,8 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
280
284
--resource-group <resource-group-name> \
281
285
--account-name <account-name> \
282
286
--name <database-name> \
283
-
--restore-timestamp <timestamp>
287
+
--restore-timestamp <timestamp> \
288
+
--disable-ttl True
284
289
```
285
290
286
291
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
291
296
--account-name <account-name> \
292
297
--database-name <database-name> \
293
298
--name <graph-name> \
294
-
--restore-timestamp <timestamp>
299
+
--restore-timestamp <timestamp> \
300
+
--disable-ttl True
295
301
```
296
302
297
303
:::zone-end
@@ -342,7 +348,8 @@ Use the Azure CLI to restore a deleted container or database. Child containers a
342
348
--resource-group <resource-group-name> \
343
349
--account-name <account-name> \
344
350
--table-name <table-name> \
345
-
--restore-timestamp <timestamp>
351
+
--restore-timestamp <timestamp> \
352
+
--disable-ttl True
346
353
```
347
354
348
355
:::zone-end
@@ -424,6 +431,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
424
431
DatabaseName = "<database-name>"
425
432
Name = "<container-name>"
426
433
RestoreTimestampInUtc = "<timestamp>"
434
+
DisableTtl= $true
427
435
}
428
436
Restore-AzCosmosDBSqlContainer @parameters
429
437
```
@@ -481,6 +489,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
481
489
AccountName = "<account-name>"
482
490
Name = "<database-name>"
483
491
RestoreTimestampInUtc = "<timestamp>"
492
+
DisableTtl=$true
484
493
}
485
494
Restore-AzCosmosDBMongoDBDatabase @parameters
486
495
```
@@ -494,6 +503,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
494
503
DatabaseName = "<database-name>"
495
504
Name = "<collection-name>"
496
505
RestoreTimestampInUtc = "<timestamp>"
506
+
DisableTtl=$true
497
507
}
498
508
Restore-AzCosmosDBMongoDBCollection @parameters
499
509
```
@@ -551,6 +561,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
551
561
AccountName = "<account-name>"
552
562
Name = "<database-name>"
553
563
RestoreTimestampInUtc = "<timestamp>"
564
+
DisableTtl=$true
554
565
}
555
566
Restore-AzCosmosDBGremlinDatabase @parameters
556
567
```
@@ -564,6 +575,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
564
575
DatabaseName = "<database-name>"
565
576
Name = "<graph-name>"
566
577
RestoreTimestampInUtc = "<timestamp>"
578
+
DisableTtl=$true
567
579
}
568
580
Restore-AzCosmosDBGremlinGraph @parameters
569
581
```
@@ -610,6 +622,7 @@ Use Azure PowerShell to restore a deleted container or database. Child container
610
622
AccountName = "<account-name>"
611
623
Name = "<table-name>"
612
624
RestoreTimestampInUtc = "<timestamp>"
625
+
DisableTtl=$true
613
626
}
614
627
Restore-AzCosmosDBTable @parameters
615
628
```
@@ -663,7 +676,8 @@ You can restore deleted containers and databases by using an Azure Resource Mana
663
676
"name": "<name-of-database-or-container>",
664
677
"restoreParameters": {
665
678
"restoreSource": "<source-account-instance-id>",
666
-
"restoreTimestampInUtc": "<timestamp>"
679
+
"restoreTimestampInUtc": "<timestamp>",
680
+
"restoreWithTtlDisabled": "true"
667
681
},
668
682
"createMode": "Restore"
669
683
}
@@ -680,7 +694,8 @@ You can restore deleted containers and databases by using an Azure Resource Mana
680
694
"name": "<name-of-database-or-collection>",
681
695
"restoreParameters": {
682
696
"restoreSource": "<source-account-instance-id>",
683
-
"restoreTimestampInUtc": "<timestamp>"
697
+
"restoreTimestampInUtc": "<timestamp>",
698
+
"restoreWithTtlDisabled": "true"
684
699
},
685
700
"createMode": "Restore"
686
701
}
@@ -697,7 +712,8 @@ You can restore deleted containers and databases by using an Azure Resource Mana
697
712
"name": "<name-of-database-or-graph>",
698
713
"restoreParameters": {
699
714
"restoreSource": "<source-account-instance-id>",
700
-
"restoreTimestampInUtc": "<timestamp>"
715
+
"restoreTimestampInUtc": "<timestamp>",
716
+
"restoreWithTtlDisabled": "true"
701
717
},
702
718
"createMode": "Restore"
703
719
}
@@ -714,7 +730,8 @@ You can restore deleted containers and databases by using an Azure Resource Mana
0 commit comments