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/communication-services/quickstarts/router/job-router-azure-openai-integration.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Quickstart - Integrating Azure OpenAI with Job Router
2
+
title: Quickstart - Integrate Azure OpenAI with Job Router
3
3
titleSuffix: An Azure Communication Services quickstart
4
4
description: In this quickstart, you learn how to integrate Azure OpenAI with ACS Job Router using an Azure Function App to match workers to jobs based on worker's performance.
# Quick Start: Integrating Azure OpenAI with ACS Job Router
15
15
16
-
Integrate ACS Job Router with Azure Open AI. Use Azure Open AI to pair your jobs to agents.
16
+
Integrate ACS Job Router with Azure OpenAI. Use Azure OpenAI to pair your jobs to agents.
17
17
18
18
### Prerequisites
19
19
- Create an Azure OpenAI resource. [Setup Guide](../../../ai-services/openai/how-to/create-resource.md)
@@ -24,7 +24,7 @@ Integrate ACS Job Router with Azure Open AI. Use Azure Open AI to pair your jobs
24
24
25
25
### Overview
26
26
27
-
This quick start demonstrates how to integrate Azure Open AI with ACS Job Router to intelligently choose the best-suited worker based on performance indicators for an incoming job.
27
+
This quick start demonstrates how to integrate Azure OpenAI with ACS Job Router to intelligently choose the best-suited worker based on performance indicators for an incoming job.
28
28
29
29
### Console application
30
30
- Manages ACS resources including policies and queues.
@@ -44,15 +44,16 @@ This quick start demonstrates how to integrate Azure Open AI with ACS Job Router
44
44
- Five workers that are registered to a queue with three chosen performance indicator values populated as labels.
45
45
- Creates a Job in ACS Job Router and lets the user know which worker Azure OpenAI scored the highest based on the performance indicator labels.
46
46
47
-
:::image type="content" source="./media/overview-sequence-diagram.png" alt-text="Screenshot of Job Router with Azure Open AI integration SequenceDiagram.":::
47
+
:::image type="content" source="./media/overview-sequence-diagram.png" alt-text="Screenshot of Job Router with Azure OpenAI integration SequenceDiagram."
#### The Azure Function project is set up to interact with a deployed Azure OpenAI model.
50
+
#### The Azure Function project is set up to interact with a deployed Azure OpenAI model:
50
51
- The Azure function receives a request from ACS Job Router with a payload containing the worker's labels (performance indicators).
51
52
- The Azure function extracts those values from the request.
52
-
- The Azure function was preconfigured with a prompt to explain to the Azure Open AI model how to interpret each one of these performance indicators and to ask Azure OpenAI to score each worker based on these values to find the most suitable agent for a new job.
53
+
- The Azure function was preconfigured with a prompt to explain to the Azure OpenAI model how to interpret each one of these performance indicators and to ask Azure OpenAI to score each worker based on these values to find the most suitable agent for a new job.
53
54
> [!NOTE]
54
55
> The prompt can be updated for any desired outcome. For example, you could modify the prompt to weigh the Average Handling Time as the most important data point or ask the model to optimize for customer satisfaction.
55
-
- The Azure Function sends a request with the configured prompts and worker performance indicators, and Azure OpenAI responds back with a JSON Object containing the scores generated by Azure Open AI.
56
+
- The Azure Function sends a request with the configured prompts and worker performance indicators, and Azure OpenAI responds back with a JSON Object containing the scores generated by Azure OpenAI.
56
57
- The Azure Function then sends these scores back to ACS Job Router.
57
58
- ACS Job Router then sends an offer to the worker that was scored the highest by Azure OpenAI.
58
59
@@ -72,17 +73,17 @@ Workers are evaluated based on:
72
73
- Learn about Azure Function Deployments. [Azure Function Deployments](../../../azure-functions/functions-deployment-technologies.md)
73
74
74
75
## Understanding Azure OpenAI prompts
75
-
- Learn about Azure Open AI prompt Engineering Techniques. [Prompt Engineering Techniques](../../../ai-services/openai/concepts/advanced-prompt-engineering.md)
1. Open the OpenAiScoringFunction project in Visual Studio Code with the Azure Function Extension installed. Select 'Create Function App in Azure...'
80
81
81
-
:::image type="content" source="./media/create-azure-function-from-code.png" alt-text="Screenshot of CreateFunctionApp in VS Code.":::
82
+
:::image type="content" source="./media/create-azure-function-from-code.png" alt-text="Screenshot of CreateFunctionApp in VS Code.":::
82
83
83
84
2. After selecting your Subscription, enter a unique name for your function app.
84
85
85
-
:::image type="content" source="./media/function-select-subscription.png" alt-text="Screenshot of selecting subscription in VS Code.":::
86
+
:::image type="content" source="./media/function-select-subscription.png" alt-text="Screenshot of selecting subscription in VS Code.":::
86
87
87
88
3. Once your Function App is created, right-click on your App and select 'Deploy Function App...'
88
89
4. Open the Azure portal and go to your Azure OpenAI resource, then go to Azure AI Studio. From here, navigate to the Deployments tab and select "+ Create new deployment"
@@ -91,15 +92,15 @@ Workers are evaluated based on:
91
92
[Azure OpenAI Service models](../../../ai-services/openai/concepts/models.md)
92
93
- b. Give your model a Deployment name and select “Create”
93
94
94
-
:::image type="content" source="./media/azure-open-ai-model-creation.png" alt-text="Screenshot of creating azure open ai model.":::
95
+
:::image type="content" source="./media/azure-openai-model-creation.png" alt-text="Screenshot of creating azure OpenAI model.":::
95
96
96
97
5. Once your Azure OpenAI Model is created, copy down the 'Endpoint', 'Keys', and 'Region'
97
98
98
-
:::image type="content" source="./media/azure-open-ai-keys-and-endpoints.png" alt-text="Screenshot of of key and endpoint page for Azure Open AU.":::
99
+
:::image type="content" source="./media/azure-openai-keys-and-endpoints.png" alt-text="Screenshot of key and endpoint page for Azure OpenAI.":::
99
100
100
101
6. In the Azure portal, navigate to your newly created Function App Environmental Variables blade and create the following variables:
101
102
102
-
:::image type="content" source="./media/azure-function-enviornment-settings.png" alt-text="Screenshot of of Azure function enviornment settings example.":::
103
+
:::image type="content" source="./media/azure-function-environment-settings.png" alt-text="Screenshot of Azure function environment settings example.":::
0 commit comments