Skip to content

Commit 1bd72f8

Browse files
author
Maryanne Gichohi
committed
Address PR comments
1 parent 581e82c commit 1bd72f8

6 files changed

+32
-44
lines changed

articles/azure-app-configuration/concept-ai-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.date: 04/18/2025
99
ms.collection: ce-skilling-ai-copilot
1010
---
1111

12-
# AI configuration
12+
## AI configuration
1313

1414
AI application development often requires rapid iteration of prompts and frequent tuning of model parameters to meet evolving goals such as quality, responsiveness, customer satisfaction, and cost efficiency. AI configuration in Azure App Configuration helps streamline this process by decoupling model settings from application code, enabling faster, safer, and more flexible iteration. Here are some key benefits:
1515

articles/azure-app-configuration/howto-chat-completion-config.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,21 @@ ms.date: 04/20/2025
1111

1212
# Chat Completion Configuration in Azure App Configuration
1313

14-
Chat completion is an AI capability that enables models to generate conversational responses based on a series of messages. Unlike simple text completion, chat completion maintains context across multiple exchanges, simulating a natural conversation. This capability powers many AI assistants, chatbots, and interactive applications. Azure App Configuration enhances this experience by providing built in validation for chat completion models, ensuring configurations meet required specifications. Additionaly, App Configuration facilitates the discoverability of new models making it easier for developers to find and implement the latest AI models while maintaining a centralized control over model configurations across their applications.
15-
16-
## Chat Completion Parameters
17-
18-
Azure OpenAI chat models support several [parameters](/azure/ai-services/openai/reference#request-body-2) that control how responses are generated. Common parameters include:
19-
20-
| Parameter | Description |
21-
|-----------|-------------|
22-
| max_tokens | Maximum number of tokens that can be generated in the chat completion. |
23-
| temperature | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. |
24-
| top_p | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. |
25-
| frequency_penalty | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. |
26-
| presence_penalty | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. |
27-
| stop | Up to four sequences where the API will stop generating further tokens |
28-
| response_format | Specifies the format that the model must output. |
29-
30-
## Create a chat completion configuration
14+
Chat completion is an AI capability that enables models to generate conversational responses based on a series of messages. Unlike simple text completion, chat completion maintains context across multiple exchanges, simulating a natural conversation. Chat completion configuration allows you to define and manage how AI models generate responses in your application. A simple configuration includes the model selection and basic prompts. Azure OpenAI chat models support several [configuration options](/azure/ai-services/openai/reference#request-body-2) that control how responses are generated.
3115

3216
## Prerequisites
3317
- An Azure account with an active subscription. [Create one for free](https://azure.microsoft.com/free)
3418
- An App Configuration store. [Create a store](./quickstart-azure-app-configuration-create.md#create-an-app-configuration-store).
3519
- [Azure OpenAI access](/azure/ai-services/openai/overview#get-started-with-azure-openai-service)
3620

3721
> [!NOTE]
38-
> This tutorial demonstrates chat completion configuration management using Azure OpenAI models. However the configuration management demonstrated in the tutorial can be applied to any AI model you choose to work with in your application. Users are not limited to using only Azure OpenAI models.
22+
> This tutorial demonstrates chat completion configuration management using Azure OpenAI models. However the configuration management demonstrated in the tutorial can be applied to any AI model you choose to work with in your application.
3923
>
4024
25+
## Create a chat completion configuration
26+
27+
In this section, we will create a chat completion configuration in Azure Portal using the GPT-4o model as our example.
28+
4129
1. In Azure portal, navigate to your App configuration store. From the **Operations** menu, select **Configuration explorer** > **Create**. Then select **AI configuration**.
4230

4331
1. Specify the following values:
0 Bytes
Loading

articles/azure-app-configuration/quickstart-chat-completion-dotnet.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ In this quickstart you will create a .NET console app that retrieves chat comple
6666

6767
1. Connect to your App Configuration store by calling the `AddAzureAppConfiguration` method in the _Program.cs_ file.
6868

69-
You can connect to App Configuration using **Microsoft Entra ID (recommended)**, or a connection string. In this example, you use Microsoft Entra ID, the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role. Be sure to allow sufficient time for the permission to propagate before running your application.
69+
You can connect to App Configuration using **Microsoft Entra ID (recommended)**, or a connection string. In this example, you use Microsoft Entra ID, the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your user account the **App Configuration Data Reader** role. Be sure to allow sufficient time for the permission to propagate before running your application.
7070

7171
```csharp
7272
var credential = new DefaultAzureCredential();
7373

7474
IConfiguration configuration = new ConfigurationBuilder()
7575
.AddAzureAppConfiguration(options =>
7676
{
77-
string endpoint = Environment.GetEnvironmentVariable("AZURE_APPCONFIG_ENDPOINT");
77+
string endpoint = Environment.GetEnvironmentVariable("AZURE_APPCONFIGURATION_ENDPOINT");
7878

7979
options.Connect(new Uri(endpoint), credential);
8080
}).Build();
@@ -85,7 +85,7 @@ In this quickstart you will create a .NET console app that retrieves chat comple
8585
Console.WriteLine($"Hello, I am your AI assistant powered by Azure App Configuration ({model})");
8686
```
8787

88-
1. Create an instance of the `AzureOpenAIClient`. Use the existing instance of `DefaultAzureCredential` we created in the previous step to authenticate to your Azure OpenAI resource. Assign your credential the [Cognitive Services OpenAI User](../role-based-access-control/built-in-roles/ai-machine-learning.md#cognitive-services-openai-user) or [Cognitive Services OpenAI Contributor](../role-based-access-control/built-in-roles/ai-machine-learning.md#cognitive-services-openai-contributor). For detailed steps, see [Role-based access control for Azure OpenAI service](/azure/ai-services/openai/how-to/role-based-access-control). Be sure to allow sufficient time for the permission to propagate before running your application.
88+
1. Create an instance of the `AzureOpenAIClient`. Use the existing instance of `DefaultAzureCredential` we created in the previous step to authenticate to your Azure OpenAI resource. Assign your user account the [Cognitive Services OpenAI User](../role-based-access-control/built-in-roles/ai-machine-learning.md#cognitive-services-openai-user) role or [Cognitive Services OpenAI Contributor](../role-based-access-control/built-in-roles/ai-machine-learning.md#cognitive-services-openai-contributor) role. For detailed steps, see [Role-based access control for Azure OpenAI service](/azure/ai-services/openai/how-to/role-based-access-control). Be sure to allow sufficient time for the permission to propagate before running your application.
8989

9090
```csharp
9191
// Existing code to connect to your App configuration store
@@ -162,7 +162,7 @@ In this quickstart you will create a .NET console app that retrieves chat comple
162162
IConfiguration configuration = new ConfigurationBuilder()
163163
.AddAzureAppConfiguration(options =>
164164
{
165-
string endpoint = Environment.GetEnvironmentVariable("AZURE_APPCONFIG_ENDPOINT");
165+
string endpoint = Environment.GetEnvironmentVariable("AZURE_APPCONFIGURATION_ENDPOINT");
166166

167167
options.Connect(new Uri(endpoint), credential);
168168

@@ -215,22 +215,22 @@ In this quickstart you will create a .NET console app that retrieves chat comple
215215

216216
## Build and run the app locally
217217

218-
1. Set the environment variable named **AZURE_APPCONFIG_ENDPOINT** to the endpoint of your App Configuration store found under the *Overview* of your store in the Azure portal.
218+
1. Set the environment variable named **AZURE_APPCONFIGURATION_ENDPOINT** to the endpoint of your App Configuration store found under the *Overview* of your store in the Azure portal.
219219

220220
If you use the Windows command prompt, run the following command and restart the command prompt to allow the change to take effect:
221221

222222
```cmd
223-
setx AZURE_APPCONFIG_ENDPOINT "<endpoint-of-your-app-configuration-store>"
223+
setx AZURE_APPCONFIGURATION_ENDPOINT "<endpoint-of-your-app-configuration-store>"
224224
```
225225

226226
If you use PowerShell, run the following command:
227227
```pwsh
228-
$Env:AZURE_APPCONFIG_ENDPOINT = "<endpoint-of-your-app-configuration-store>"
228+
$Env:AZURE_APPCONFIGURATION_ENDPOINT = "<endpoint-of-your-app-configuration-store>"
229229
```
230230

231231
If you use macOS or Linux run the following command:
232232
```
233-
export AZURE_APPCONFIG_ENDPOINT='<endpoint-of-your-app-configuration-store>'
233+
export AZURE_APPCONFIGURATION_ENDPOINT ='<endpoint-of-your-app-configuration-store>'
234234
```
235235

236236
1. After the environment variable is properly set, run the following command to run and build your app locally:

articles/azure-app-configuration/quickstart-chat-completion-javascript.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ In this quickstart you will create a Node js console app that retrieves chat com
5252
const { DefaultAzureCredential, getBearerTokenProvider } = require("@azure/identity");
5353
const { AzureOpenAI } = require("openai");
5454

55-
const endpoint = process.env.AZURE_APPCONFIG_ENDPOINT;
55+
const endpoint = process.env.AZURE_APPCONFIGURATION_ENDPOINT;
5656
```
5757

5858
1. Connect to your App Configuration store by calling the `load` method in the `app.js` file.
5959

60-
You can connect to App Configuration using **Microsoft Entra ID (recommended)**, or a connection string. In this example, you use Microsoft Entra ID, the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role. Be sure to allow sufficient time for the permission to propagate before running your application.
60+
You can connect to App Configuration using **Microsoft Entra ID (recommended)**, or a connection string. In this example, you use Microsoft Entra ID, the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your user account the **App Configuration Data Reader** role. Be sure to allow sufficient time for the permission to propagate before running your application.
6161

6262
```javascript
6363
const { load } = require("@azure/app-configuration-provider");
6464
const { DefaultAzureCredential, getBearerTokenProvider } = require("@azure/identity");
6565
const { AzureOpenAI } = require("openai");
6666

67-
const endpoint = process.env.AZURE_APPCONFIG_ENDPOINT;
67+
const endpoint = process.env.AZURE_APPCONFIGURATION_ENDPOINT;
6868
6969
async function run() {
7070
const credential = new DefaultAzureCredential();
@@ -80,7 +80,7 @@ In this quickstart you will create a Node js console app that retrieves chat com
8080
}
8181
```
8282

83-
1. Create an instance of the `AzureOpenAI` client. Use the existing instance of `DefaultAzureCredential` we created in the previous step to authenticate to your Azure OpenAI resource. Assign your credential the [Cognitive Services OpenAI User](../role-based-access-control/built-in-roles/ai-machine-learning.md#cognitive-services-openai-user) or [Cognitive Services OpenAI Contributor](../role-based-access-control/built-in-roles/ai-machine-learning.md#cognitive-services-openai-contributor). For detailed steps, see [Role-based access control for Azure OpenAI service](/azure/ai-services/openai/how-to/role-based-access-control). Be sure to allow sufficient time for the permission to propagate before running your application.
83+
1. Create an instance of the `AzureOpenAI` client. Use the existing instance of `DefaultAzureCredential` we created in the previous step to authenticate to your Azure OpenAI resource. Assign your user account the [Cognitive Services OpenAI User](../role-based-access-control/built-in-roles/ai-machine-learning.md#cognitive-services-openai-user) role or [Cognitive Services OpenAI Contributor](../role-based-access-control/built-in-roles/ai-machine-learning.md#cognitive-services-openai-contributor) role. For detailed steps, see [Role-based access control for Azure OpenAI service](/azure/ai-services/openai/how-to/role-based-access-control). Be sure to allow sufficient time for the permission to propagate before running your application.
8484

8585
```javascript
8686
// Existing code to connect to your App configuration store
@@ -130,7 +130,7 @@ In this quickstart you will create a Node js console app that retrieves chat com
130130
const { DefaultAzureCredential, getBearerTokenProvider } = require("@azure/identity");
131131
const { AzureOpenAI } = require("openai");
132132

133-
const endpoint = process.env.AZURE_APPCONFIG_ENDPOINT;
133+
const endpoint = process.env.AZURE_APPCONFIGURATION_ENDPOINT;
134134

135135
async function run(){
136136
const credential = new DefaultAzureCredential();
@@ -174,22 +174,22 @@ In this quickstart you will create a Node js console app that retrieves chat com
174174

175175
## Build and run the app locally
176176

177-
1. Set the environment variable named **AZURE_APPCONFIG_ENDPOINT** to the endpoint of your App Configuration store found under the *Overview* of your store in the Azure portal.
177+
1. Set the environment variable named **AZURE_APPCONFIGURATION_ENDPOINT** to the endpoint of your App Configuration store found under the *Overview* of your store in the Azure portal.
178178

179179
If you use the Windows command prompt, run the following command and restart the command prompt to allow the change to take effect:
180180

181181
```cmd
182-
setx AZURE_APPCONFIG_ENDPOINT "<endpoint-of-your-app-configuration-store>"
182+
setx AZURE_APPCONFIGURATION_ENDPOINT "<endpoint-of-your-app-configuration-store>"
183183
```
184184

185185
If you use PowerShell, run the following command:
186186
```pwsh
187-
$Env:AZURE_APPCONFIG_ENDPOINT = "<endpoint-of-your-app-configuration-store>"
187+
$Env:AZURE_APPCONFIGURATION_ENDPOINT = "<endpoint-of-your-app-configuration-store>"
188188
```
189189

190190
If you use macOS or Linux run the following command:
191191
```
192-
export AZURE_APPCONFIG_ENDPOINT='<endpoint-of-your-app-configuration-store>'
192+
export AZURE_APPCONFIGURATION_ENDPOINT='<endpoint-of-your-app-configuration-store>'
193193
```
194194
195195
1. After the environment variable is properly set, run the following command to run the app locally:

0 commit comments

Comments
 (0)