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
Using keys is a straightforward option, but this approach should be used with caution. Keys aren't the recommended authentication option because they:
38
+
Keys are straightforward to use, but treat them with caution. Keys aren't the recommended authentication option because they:
38
39
39
40
- Don't follow [the principle of least privilege](/entra/identity-platform/secure-least-privileged-access). They provide elevated permissions regardless of who uses them or for what task.
40
-
- Can accidentally be checked into source control or stored in unsafe locations.
41
+
- Can accidentally end up in source control or unsafe storage locations.
41
42
- Can easily be shared with or sent to parties who shouldn't have access.
42
43
- Often require manual administration and rotation.
43
44
@@ -49,7 +50,7 @@ Microsoft Entra ID is a cloud-based identity and access management service that
49
50
50
51
- Keyless authentication using [identities](/entra/fundamentals/identity-fundamental-concepts).
51
52
- Role-based access control (RBAC) to assign identities the minimum required permissions.
52
-
-Can use the [`Azure.Identity`](/dotnet/api/overview/azure/identity-readme) client library to detect [different credentials across environments](/dotnet/api/azure.identity.defaultazurecredential) without requiring code changes.
53
+
-Lets you use the [`Azure.Identity`](/dotnet/api/overview/azure/identity-readme) client library to detect [different credentials across environments](/dotnet/api/azure.identity.defaultazurecredential) without requiring code changes.
53
54
- Automatically handles administrative maintenance tasks such as rotating underlying keys.
54
55
55
56
The workflow to implement Microsoft Entra authentication in your app generally includes the following steps:
@@ -80,7 +81,7 @@ az login
80
81
81
82
### Configure the app code
82
83
83
-
Use the [`Azure.Identity`](/dotnet/api/overview/azure/identity-readme) client library from the Azure SDK to implement Microsoft Entra authentication in your code. The `Azure.Identity` libraries include the `DefaultAzureCredential` class, which automatically discovers available Azure credentials based on the current environment and tooling available. For the full set of supported environment credentials and the order in which they are searched, see the [Azure SDK for .NET](/dotnet/api/azure.identity.defaultazurecredential) documentation.
84
+
Use the [`Azure.Identity`](/dotnet/api/overview/azure/identity-readme) client library from the Azure SDK to implement Microsoft Entra authentication in your code. The `Azure.Identity` libraries include the `DefaultAzureCredential` class, which automatically discovers available Azure credentials based on the current environment and tooling available. For the full set of supported environment credentials and the order in which `DefaultAzureCredential` searches them, see the [Azure SDK for .NET](/dotnet/api/azure.identity.defaultazurecredential) documentation.
84
85
85
86
For example, configure Azure OpenAI to authenticate using `DefaultAzureCredential` using the following code:
86
87
@@ -125,7 +126,7 @@ There are two types of managed identities you can assign to your app:
125
126
- A **system-assigned identity** is tied to your application and is deleted if your app is deleted. An app can only have one system-assigned identity.
126
127
- A **user-assigned identity** is a standalone Azure resource that can be assigned to your app. An app can have multiple user-assigned identities.
127
128
128
-
Assign roles to a managed identity just like you would an individual user account, such as the **Cognitive Services OpenAI User** role. learn more about working with managed identities using the following resources:
129
+
Assign roles to a managed identity just like you would an individual user account, such as the **Cognitive Services OpenAI User** role. Learn more about working with managed identities using the following resources:
Copy file name to clipboardExpand all lines: docs/ai/conceptual/chain-of-thought-prompting.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,21 @@
1
1
---
2
-
title: "Chain of Thought Prompting - .NET"
2
+
title: "Chain of thought prompting - .NET"
3
3
description: "Learn how chain of thought prompting can simplify prompt engineering."
4
4
ms.topic: concept-article #Don't change.
5
-
ms.date: 05/29/2025
5
+
ms.date: 03/04/2026
6
+
ai-usage: ai-assisted
6
7
7
8
#customer intent: As a .NET developer, I want to understand what chain-of-thought prompting is and how it can help me save time and get better completions out of prompt engineering.
8
9
9
10
---
10
11
11
12
# Chain of thought prompting
12
13
13
-
GPT model performance and response quality benefits from *prompt engineering*, which is the practice of providing instructions and examples to a model to prime or refine its output. As they process instructions, models make more reasoning errors when they try to answer right away rather than taking time to work out an answer. You can help the model reason its way toward correct answers more reliably by asking for the model to include its chain of thought—that is, the steps it took to follow an instruction, along with the results of each step.
14
+
GPT model performance and response quality benefit from *prompt engineering*, which is the practice of providing instructions and examples to a model to prime or refine its output. As they process instructions, models make more reasoning errors when they try to answer right away rather than taking time to work out an answer. Help the model reason its way toward correct answers more reliably by asking the model to include its chain of thought—that is, the steps it took to follow an instruction, along with the results of each step.
14
15
15
16
*Chain of thought prompting* is the practice of prompting a model to perform a task step-by-step and to present each step and its result in order in the output. This simplifies prompt engineering by offloading some execution planning to the model, and makes it easier to connect any problem to a specific step so you know where to focus further efforts.
16
17
17
-
It's generally simpler to just instruct the model to include its chain of thought, but you can use examples to show the model how to break down tasks. The following sections show both ways.
18
+
It's generally simpler to instruct the model to include its chain of thought, but you can also use examples to show the model how to break down tasks. The following sections show both ways.
18
19
19
20
## Use chain of thought prompting in instructions
20
21
@@ -27,7 +28,7 @@ Break the task into steps, and output the result of each step as you perform it.
27
28
28
29
## Use chain of thought prompting in examples
29
30
30
-
You can use examples to indicate the steps for chain of thought prompting, which the model will interpret to mean it should also output step results. Steps can include formatting cues.
31
+
Use examples to indicate the steps for chain of thought prompting, which the model interprets to mean it should also output step results. Steps can include formatting cues.
Copy file name to clipboardExpand all lines: docs/ai/conceptual/embeddings.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,18 @@
2
2
title: "How Embeddings Extend Your AI Model's Reach"
3
3
description: "Learn how embeddings extend the limits and capabilities of AI models in .NET."
4
4
ms.topic: concept-article #Don't change.
5
-
ms.date: 05/29/2025
5
+
ms.date: 03/04/2026
6
+
ai-usage: ai-assisted
6
7
7
8
#customer intent: As a .NET developer, I want to understand how embeddings extend LLM limits and capabilities in .NET so that I have more semantic context and better outcomes for my AI apps.
8
9
9
10
---
10
11
# Embeddings in .NET
11
12
12
-
Embeddings are the way LLMs capture semantic meaning. They are numeric representations of non-numeric data that an LLM can use to determine relationships between concepts. You can use embeddings to help an AI model understand the meaning of inputs so that it can perform comparisons and transformations, such as summarizing text or creating images from text descriptions. LLMs can use embeddings immediately, and you can store embeddings in vector databases to provide semantic memory for LLMs as-needed.
13
+
Embeddings are the way LLMs capture semantic meaning. They're numeric representations of non-numeric data that an LLM can use to determine relationships between concepts. Use embeddings to help an AI model understand the meaning of inputs so that it can perform comparisons and transformations, such as summarizing text or creating images from text descriptions. LLMs can use embeddings immediately, and you can store embeddings in vector databases to provide semantic memory for LLMs asneeded.
13
14
14
15
## Use cases for embeddings
15
16
16
-
This section lists the main use cases for embeddings.
17
-
18
17
### Use your own data to improve completion relevance
19
18
20
19
Use your own databases to generate embeddings for your data and integrate it with an LLM to make it available for completions. This use of embeddings is an important component of [retrieval-augmented generation](rag.md).
@@ -23,7 +22,7 @@ Use your own databases to generate embeddings for your data and integrate it wit
23
22
24
23
Use embeddings to increase the amount of context you can fit in a prompt without increasing the number of tokens required.
25
24
26
-
For example, suppose you want to include 500 pages of text in a prompt. The number of tokens for that much raw text will exceed the input token limit, making it impossible to directly include in a prompt. You can use embeddings to summarize and break down large amounts of that text into pieces that are small enough to fit in one input, and then assess the similarity of each piece to the entire raw text. Then you can choose a piece that best preserves the semantic meaning of the raw text and use it in your prompt without hitting the token limit.
25
+
For example, suppose you want to include 500 pages of text in a prompt. The number of tokens for that much raw text exceeds the input token limit, making it impossible to directly include in a prompt. You can use embeddings to summarize and break down large amounts of that text into pieces that are small enough to fit in one input, and then assess the similarity of each piece to the entire raw text. Then you can choose a piece that best preserves the semantic meaning of the raw text and use it in your prompt without hitting the token limit.
27
26
28
27
### Perform text classification, summarization, or translation
29
28
@@ -45,11 +44,11 @@ Use embeddings to help a model create code from text or vice versa, by convertin
45
44
46
45
## Choose an embedding model
47
46
48
-
You generate embeddings for your raw data by using an AI embedding model, which can encode non-numeric data into a vector (a long array of numbers). The model can also decode an embedding into non-numeric data that has the same or similar meaning as the original, raw data. There are many embedding models available for you to use, with OpenAI's `text-embedding-ada-002` model being one of the common models that's used. For more examples, see the list of [Embedding models available on Azure OpenAI](/azure/ai-services/openai/concepts/models#embeddings).
47
+
You generate embeddings for your raw data by using an AI embedding model, which can encode non-numeric data into a vector (a long array of numbers). The model can also decode an embedding into non-numeric data that has the same or similar meaning as the original, raw data. OpenAI's `text-embedding-3-small` and `text-embedding-3-large` are the currently recommended embedding models, replacing the older `text-embedding-ada-002`. For more examples, see the list of [Embedding models available on Azure OpenAI](/azure/ai-services/openai/concepts/models#embeddings).
49
48
50
49
### Store and process embeddings in a vector database
51
50
52
-
After you generate embeddings, you'll need a way to store them so you can later retrieve them with calls to an LLM. Vector databases are designed to store and process vectors, so they're a natural home for embeddings. Different vector databases offer different processing capabilities, so you should choose one based on your raw data and your goals. For information about your options, see [Vector databases for .NET + AI](vector-databases.md).
51
+
After you generate embeddings, you need a way to store them so you can later retrieve them with calls to an LLM. Vector databases are designed to store and process vectors, so they're a natural home for embeddings. Different vector databases offer different processing capabilities. Choose one based on your raw data and your goals. For information about your options, see [Vector databases for .NET + AI](vector-databases.md).
0 commit comments