Skip to content

Commit cbe71b1

Browse files
authored
Merge pull request #52286 from dotnet/main
Merge main into live
2 parents 16c6c99 + a8b1aba commit cbe71b1

52 files changed

Lines changed: 950 additions & 224 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/ai/azure-ai-services-authentication.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ description: Learn about the different options to authenticate to Azure OpenAI a
44
author: alexwolfmsft
55
ms.topic: concept-article
66
ms.date: 03/06/2026
7+
ai-usage: ai-assisted
78
---
89

910
# Foundry tools authentication and authorization using .NET
@@ -34,10 +35,10 @@ builder.Services.AddAzureOpenAIChatCompletion(
3435
var kernel = builder.Build();
3536
```
3637

37-
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:
3839

3940
- 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.
4142
- Can easily be shared with or sent to parties who shouldn't have access.
4243
- Often require manual administration and rotation.
4344

@@ -49,7 +50,7 @@ Microsoft Entra ID is a cloud-based identity and access management service that
4950

5051
- Keyless authentication using [identities](/entra/fundamentals/identity-fundamental-concepts).
5152
- 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.
5354
- Automatically handles administrative maintenance tasks such as rotating underlying keys.
5455

5556
The workflow to implement Microsoft Entra authentication in your app generally includes the following steps:
@@ -80,7 +81,7 @@ az login
8081

8182
### Configure the app code
8283

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.
8485

8586
For example, configure Azure OpenAI to authenticate using `DefaultAzureCredential` using the following code:
8687

@@ -125,7 +126,7 @@ There are two types of managed identities you can assign to your app:
125126
- 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.
126127
- A **user-assigned identity** is a standalone Azure resource that can be assigned to your app. An app can have multiple user-assigned identities.
127128

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:
129130

130131
- [Managed identities overview](/entra/identity/managed-identities-azure-resources/overview)
131132
- [Authenticate App Service to Azure OpenAI using Microsoft Entra ID](/dotnet/ai/how-to/app-service-aoai-auth?pivots=azure-portal)

docs/ai/conceptual/chain-of-thought-prompting.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
title: "Chain of Thought Prompting - .NET"
2+
title: "Chain of thought prompting - .NET"
33
description: "Learn how chain of thought prompting can simplify prompt engineering."
44
ms.topic: concept-article #Don't change.
5-
ms.date: 05/29/2025
5+
ms.date: 03/04/2026
6+
ai-usage: ai-assisted
67

78
#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.
89

910
---
1011

1112
# Chain of thought prompting
1213

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.
1415

1516
*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.
1617

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.
1819

1920
## Use chain of thought prompting in instructions
2021

@@ -27,7 +28,7 @@ Break the task into steps, and output the result of each step as you perform it.
2728

2829
## Use chain of thought prompting in examples
2930

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.
3132

3233
```csharp
3334
prompt= """

docs/ai/conceptual/embeddings.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22
title: "How Embeddings Extend Your AI Model's Reach"
33
description: "Learn how embeddings extend the limits and capabilities of AI models in .NET."
44
ms.topic: concept-article #Don't change.
5-
ms.date: 05/29/2025
5+
ms.date: 03/04/2026
6+
ai-usage: ai-assisted
67

78
#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.
89

910
---
1011
# Embeddings in .NET
1112

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 as needed.
1314

1415
## Use cases for embeddings
1516

16-
This section lists the main use cases for embeddings.
17-
1817
### Use your own data to improve completion relevance
1918

2019
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
2322

2423
Use embeddings to increase the amount of context you can fit in a prompt without increasing the number of tokens required.
2524

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.
2726

2827
### Perform text classification, summarization, or translation
2928

@@ -45,11 +44,11 @@ Use embeddings to help a model create code from text or vice versa, by convertin
4544

4645
## Choose an embedding model
4746

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).
4948

5049
### Store and process embeddings in a vector database
5150

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).
5352

5453
### Using embeddings in your LLM solution
5554

0 commit comments

Comments
 (0)