Skip to content

Commit 4c5adb1

Browse files
authored
Merge pull request #199257 from hazemelh/patch-19
Update tutorials
2 parents eb4cc37 + 1ab7359 commit 4c5adb1

File tree

2 files changed

+37
-36
lines changed

2 files changed

+37
-36
lines changed

articles/cognitive-services/language-service/conversational-language-understanding/tutorials/bot-framework.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.reviewer: cahann, hazemelh
99
ms.service: cognitive-services
1010
ms.subservice: language-service
1111
ms.topic: tutorial
12-
ms.date: 05/17/2022
12+
ms.date: 05/25/2022
1313
---
1414

1515
# Integrate conversational language understanding with Bot Framework
@@ -23,23 +23,22 @@ This tutorial will explain how to integrate your own conversational language und
2323

2424
- Create a [Language resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics) in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
2525
- You will need the key and endpoint from the resource you create to connect your bot to the API. You'll paste your key and endpoint into the code below later in the tutorial.
26-
- Download the **Core Bot** for CLU [sample in C#](https://aka.ms/clu-botframework-overview).
27-
- Clone the entire Bot Framework Samples repository to get access to this sample project.
28-
26+
- Download the **CoreBotWithCLU** [sample](https://aka.ms/clu-botframework-overview).
27+
- Clone the entire samples repository to get access to this solution.
2928

3029
## Import a project in conversational language understanding
3130

32-
1. Copy the [FlightBooking.json](https://aka.ms/clu-botframework-json) file in the **Core Bot** for CLU sample.
31+
1. Download the [FlightBooking.json](https://aka.ms/clu-botframework-json) file in the **Core Bot with CLU** sample, in the _Cognitive Models_ folder.
3332
2. Sign into the [Language Studio](https://language.cognitive.azure.com/) and select your Language resource.
3433
3. Navigate to [Conversational Language Understanding](https://language.cognitive.azure.com/clu/projects) and click on the service. This will route you the projects page. Click the Import button next to the Create New Project button. Import the FlightBooking.json file with the project name as **FlightBooking**. This will automatically import the CLU project with all the intents, entities, and utterances.
3534

3635
:::image type="content" source="../media/import.png" alt-text="A screenshot showing where to import a J son file." lightbox="../media/import.png":::
3736

38-
4. Once the project is loaded, click on **Training** on the left. Press on Start a training job, provide the model name **v1** and press Train. All other settings such as **Standard Training** and the evaluation settings can be left as is.
37+
4. Once the project is loaded, click on **Training jobs** on the left. Press on Start a training job, provide the model name **v1** and press Train. All other settings such as **Standard Training** and the evaluation settings can be left as is.
3938

4039
:::image type="content" source="../media/train-model.png" alt-text="A screenshot of the training page in C L U." lightbox="../media/train-model.png":::
4140

42-
5. Once training is complete, click to **Deployments** on the left. Click on Add Deployment and create a new deployment with the name **Testing**, and assign model **v1** to the deployment.
41+
5. Once training is complete, click to **Deploying a model** on the left. Click on Add Deployment and create a new deployment with the name **Testing**, and assign model **v1** to the deployment.
4342

4443
:::image type="content" source="../media/deploy-model-tutorial.png" alt-text="A screenshot of the deployment page within the deploy model screen in C L U." lightbox="../media/deploy-model-tutorial.png":::
4544

@@ -52,7 +51,7 @@ In the **Core Bot** sample, update your [appsettings.json](https://aka.ms/clu-bo
5251
- The _CluProjectName_ is **FlightBooking**.
5352
- The _CluDeploymentName_ is **Testing**
5453
- The _CluAPIKey_ can be either of the keys in the **Keys and Endpoint** section for your Language resource in the [Azure portal](https://portal.azure.com). You can also copy your key from the Project Settings tab in CLU.
55-
- The _CluAPIHostName_ is the endpoint found in the **Keys and Endpoint** section for your Language resource in the Azure portal. Note the format should be ```<Language_Resource_Name>.cognitiveservices.azure.com``` without `https://`
54+
- The _CluAPIHostName_ is the endpoint found in the **Keys and Endpoint** section for your Language resource in the Azure portal. Note the format should be ```<Language_Resource_Name>.cognitiveservices.azure.com``` without `https://`.
5655

5756
```json
5857
{
@@ -67,7 +66,7 @@ In the **Core Bot** sample, update your [appsettings.json](https://aka.ms/clu-bo
6766

6867
## Identify integration points
6968

70-
In the Core Bot sample, under the CLU folder, you can check out the **FlightBookingRecognizer.cs** file. Here is where the CLU API call to the deployed endpoint is made to retrieve the CLU prediction for intents and entities.
69+
In the Core Bot sample, you can check out the **FlightBookingRecognizer.cs** file. Here is where the CLU API call to the deployed endpoint is made to retrieve the CLU prediction for intents and entities.
7170

7271
```csharp
7372
public FlightBookingRecognizer(IConfiguration configuration)
@@ -91,7 +90,7 @@ In the Core Bot sample, under the CLU folder, you can check out the **FlightBook
9190
```
9291

9392

94-
Under the folder Dialogs folder, find the **MainDialog** which uses the following to make a CLU prediction.
93+
Under the Dialogs folder, find the **MainDialog** which uses the following to make a CLU prediction.
9594

9695
```csharp
9796
var cluResult = await _cluRecognizer.RecognizeAsync<FlightBooking>(stepContext.Context, cancellationToken);
@@ -136,7 +135,7 @@ Run the sample locally on your machine **OR** run the bot from a terminal or fro
136135

137136
### Run the bot from a terminal
138137

139-
From a terminal, navigate to `samples/csharp_dotnetcore/90.core-bot-with-clu/90.core-bot-with-clu`
138+
From a terminal, navigate to the `cognitive-service-language-samples/CoreBotWithCLU` folder.
140139

141140
Then run the following command
142141

@@ -149,8 +148,8 @@ dotnet run
149148

150149
1. Launch Visual Studio
151150
1. From the top navigation menu, select **File**, **Open**, then **Project/Solution**
152-
1. Navigate to the `samples/csharp_dotnetcore/90.core-bot-with-clu/90.core-bot-with-clu` folder
153-
1. Select the `CoreBotWithCLU.csproj` file
151+
1. Navigate to the `cognitive-service-language-samples/CoreBotWithCLU` folder
152+
1. Select the `CoreBotCLU.csproj` file
154153
1. Press `F5` to run the project
155154

156155

articles/cognitive-services/language-service/orchestration-workflow/tutorials/connect-services.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Intergate custom question answering and conversational language understanding into orchestration workflows
2+
title: Integrate custom question answering and conversational language understanding with orchestration workflow
33
description: Learn how to connect different projects with orchestration workflow.
44
keywords: conversational language understanding, bot framework, bot, language understanding, nlu
55
author: aahill
@@ -9,16 +9,16 @@ ms.reviewer: cahann, hazemelh
99
ms.service: cognitive-services
1010
ms.subservice: language-service
1111
ms.topic: tutorial
12-
ms.date: 05/17/2022
12+
ms.date: 05/25/2022
1313
---
1414

15-
# Connect different services with orchestration workflow
15+
# Connect different services with Orchestration workflow
1616

1717
Orchestration workflow is a feature that allows you to connect different projects from LUIS, conversational language understanding, and custom question answering in one project. You can then use this project for predictions under one endpoint. The orchestration project makes a prediction on which project should be called and automatically routes the request to that project, and returns with its response.
1818

1919
In this tutorial, you will learn how to connect a custom question answering knowledge base with a conversational language understanding project. You will then call the project using the .NET SDK sample for orchestration.
2020

21-
This tutorial will include creating a **chit chat** knowledge base and **email commands** project. Chit chat will deal with common niceties and greetings with static responses.
21+
This tutorial will include creating a **chit chat** knowledge base and **email commands** project. Chit chat will deal with common niceties and greetings with static responses. Email commands will predict among a few simple actions for an email assistant. The tutorial will then teach you to call the Orchestrator using the SDK in a .NET environment using a sample solution.
2222

2323

2424
## Prerequisites
@@ -27,51 +27,51 @@ This tutorial will include creating a **chit chat** knowledge base and **email c
2727
- You will need the key and endpoint from the resource you create to connect your bot to the API. You'll paste your key and endpoint into the code below later in the tutorial. Copy them from the **Keys and Endpoint** tab in your resource.
2828
- When you enable custom question answering, you must select an Azure search resource to connect to.
2929
- Make sure the region of your resource is supported by [conversational language understanding](../../conversational-language-understanding/service-limits.md#regional-availability).
30-
- Download the **OrchestrationWorkflowSample** sample in [**.NET**](https://aka.ms/orchestration-sample).
30+
- Download the **OrchestrationWorkflowSample** [sample](https://aka.ms/orchestration-sample).
3131

3232
## Create a custom question answering knowledge base
3333

3434
1. Sign into the [Language Studio](https://language.cognitive.azure.com/) and select your Language resource.
35-
2. Find and select the [custom question answering](https://language.cognitive.azure.com/questionAnswering/projects/) card in the homepage.
35+
2. Find and select the [Custom question answering](https://language.cognitive.azure.com/questionAnswering/projects/) card in the homepage.
3636
3. Click on **Create new project** and add the name **chitchat** with the language _English_ before clicking on **Create project**.
3737
4. When the project loads, click on **Add source** and select _Chit chat_. Select the professional personality for chit chat before
3838

3939
:::image type="content" source="../media/chit-chat.png" alt-text="A screenshot of the chit chat popup." lightbox="../media/chit-chat.png":::
4040

4141
5. Go to **Deploy knowledge base** from the left navigation menu and click on **Deploy** and confirm the popup that shows up.
4242

43-
You are now done with deploying your knowledge base for chit chat. You can explore the type of questions and answers to expect in the **Edit knowledge base** tab.
43+
You are now done with deploying your knowledge base for chit chat. You can explore the type of questions and answers to expect in the **Edit knowledge base** page.
4444

4545
## Create a conversational language understanding project
4646

47-
1. In Language Studio, go to the [conversational language understanding](https://language.cognitive.azure.com/clu/projects) service.
47+
1. In Language Studio, go to the [Conversational language understanding](https://language.cognitive.azure.com/clu/projects) service.
4848
2. Download the **EmailProject.json** sample file [here](https://aka.ms/clu-sample-json).
49-
3. Click on the arrow next to **Create new project** and select **Import**. Browse to the downloaded EmailProject.json file you downloaded and press Done.
49+
3. Click on the **Import** button. Browse to the EmailProject.json file you downloaded and press Done.
5050

5151
:::image type="content" source="../media/import-export.png" alt-text="A screenshot showing where to import a J son file." lightbox="../media/import-export.png":::
5252

53-
4. Once the project is loaded, click on **Training** on the left. Press on Start a training job, provide the model name **v1** and press Train. All other settings such as **Standard Training** and the evaluation settings can be left as is.
53+
4. Once the project is loaded, click on **Training jobs** on the left. Press on Start a training job, provide the model name **v1** and press Train.
5454

5555
:::image type="content" source="../media/train-model.png" alt-text="A screenshot of the training page." lightbox="../media/train-model.png":::
5656

57-
5. Once training is complete, click to **Deployments** on the left. Click on Add Deployment and create a new deployment with the name **Testing**, and assign model **v1** to the deployment.
57+
5. Once training is complete, click to **Deploying a model** on the left. Click on Add Deployment and create a new deployment with the name **Testing**, and assign model **v1** to the deployment.
5858

5959
:::image type="content" source="../media/deploy-model-tutorial.png" alt-text="A screenshot showing the model deployment page." lightbox="../media/deploy-model-tutorial.png":::
6060

61-
You are now done with deploying a conversational language understanding project for email commands. You can explore the different commands in the **Utterances** page.
61+
You are now done with deploying a conversational language understanding project for email commands. You can explore the different commands in the **Data labeling** page.
6262

63-
## Create an orchestration workflow project
63+
## Create an Orchestration workflow project
6464

65-
1. In Language Studio, go to the [orchestration workflow](https://language.cognitive.azure.com/orchestration/projects) service.
65+
1. In Language Studio, go to the [Orchestration workflow](https://language.cognitive.azure.com/orchestration/projects) service.
6666
2. Click on **Create new project**. Use the name **Orchestrator** and the language _English_ before clicking next then done.
67-
3. Once the project is created, click on **Add** in the **Build schema** page.
67+
3. Once the project is created, click on **Add** in the **Schema definition** page.
6868
4. Select _Yes, I want to connect it to an existing project_. Add the intent name **EmailIntent** and select **Conversational Language Understanding** as the connected service. Select the recently created **EmailProject** project for the project name before clicking on **Add Intent**.
6969

7070
:::image type="content" source="../media/connect-intent-tutorial.png" alt-text="A screenshot of the connect intent popup in orchestration workflow." lightbox="../media/connect-intent-tutorial.png":::
7171

7272
5. Add another intent but now select **Question Answering** as the service and select **chitchat** as the project name.
73-
6. Similar to conversational language understanding, go to **Training** and start a new training job with the name **v1** and press Train.
74-
7. Once training is complete, click to **Deployments** on the left. Click on Add deployment and create a new deployment with the name **Testing**, and assign model **v1** to the deployment and press Next.
73+
6. Similar to conversational language understanding, go to **Training jobs** and start a new training job with the name **v1** and press Train.
74+
7. Once training is complete, click to **Deploying a model** on the left. Click on Add deployment and create a new deployment with the name **Testing**, and assign model **v1** to the deployment and press Next.
7575
8. On the next page, select the deployment name **Testing** for the **EmailIntent**. This tells the orchestrator to call the **Testing** deployment in **EmailProject** when it routes to it. Custom question answering projects only have one deployment by default.
7676

7777
:::image type="content" source="../media/deployment-orchestrator-tutorial.png" alt-text="A screenshot of the deployment popup for orchestration workflow." lightbox="../media/deployment-orchestrator-tutorial.png":::
@@ -80,27 +80,29 @@ Now your orchestration project is ready to be used. Any incoming request will be
8080

8181
## Call the orchestration project with the Conversations SDK
8282

83-
1. In the downloaded **OrchestrationWorkflowSample** solution, make sure to install all the required packages. In Visual Studio, go to _Tools_, _NuGet Package Manager_ and select _Package Manager Console_ and run the following command.
83+
1. In the downloaded sample, open OrchestrationWorkflowSample.sln in Visual Studio.
84+
85+
2. In the OrchestrationWorkflowSample solution, make sure to install all the required packages. In Visual Studio, go to _Tools_, _NuGet Package Manager_ and select _Package Manager Console_ and run the following command.
8486

8587
```powershell
8688
dotnet add package Azure.AI.Language.Conversations
8789
```
8890

89-
2. In `Program.cs`, replace `{api-key}` and the placeholder endpoint. Use the key and endpoint for the Language resource you created earlier. You can find them in the **Keys and Endpoint** tab in your Language resource in Azure.
91+
3. In `Program.cs`, replace `{api-key}` and the `{endpoint}` variables. Use the key and endpoint for the Language resource you created earlier. You can find them in the **Keys and Endpoint** tab in your Language resource in Azure.
9092

9193
```csharp
92-
Uri endpoint = new Uri("https://myaccount.api.cognitive.microsoft.com");
94+
Uri endpoint = new Uri("{endpoint}");
9395
AzureKeyCredential credential = new AzureKeyCredential("{api-key}");
9496
```
9597

96-
3. Replace the orchestrationProject parameters to **Orchestrator** and **Testing** as below if they are not set already.
98+
4. Replace the orchestrationProject parameters to **Orchestrator** and **Testing** as below if they are not set already.
9799

98100
```csharp
99101
ConversationsProject orchestrationProject = new ConversationsProject("Orchestrator", "Testing");
100102
```
101103

102-
4. Run the project or press F5 in Visual Studio.
103-
5. Input a query such as "read the email from matt" or "hello how are you". You'll now observe different responses for each, a conversational language understanding **EmailProject** response from the first, and the answer from the **chitchat** for the second query.
104+
5. Run the project or press F5 in Visual Studio.
105+
6. Input a query such as "read the email from matt" or "hello how are you". You'll now observe different responses for each, a conversational language understanding **EmailProject** response from the first query, and the answer from the **chitchat** knowledge base for the second query.
104106

105107
**Conversational Language Understanding**:
106108
:::image type="content" source="../media/clu-response-orchestration.png" alt-text="A screenshot showing the sample response from conversational language understanding." lightbox="../media/clu-response-orchestration.png":::

0 commit comments

Comments
 (0)