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/cognitive-services/language-service/summarization/how-to/conversation-summarization.md
+42-4Lines changed: 42 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,18 +26,56 @@ The AI models used by the API are provided by the service, you just have to send
26
26
27
27
The conversation summarization API uses natural language processing techniques to locate key issues and resolutions in text-based chat logs. Conversation summarization will return issues and resolutions found from the text input.
28
28
29
-
There's another feature in Azure Cognitive Service for Language, [document summarization](../overview.md?tabs=document-summarization), that can summarize sentences from large documents. When you're deciding between document summarization and conversation summarization, consider the following points:
29
+
There's another feature in Azure Cognitive Service for Language named [document summarization](../overview.md?tabs=document-summarization) that can summarize sentences from large documents. When you're deciding between document summarization and conversation summarization, consider the following points:
30
30
* Extractive summarization returns sentences that collectively represent the most important or relevant information within the original content.
31
31
* Conversation summarization returns summaries based on full chat logs including a reason for the chat (a problem), and the resolution. For example, a chat log between a customer and a customer service agent.
32
32
33
33
## Submitting data
34
34
35
35
You submit documents to the API as strings of text. Analysis is performed upon receipt of the request. Because the API is [asynchronous](../../concepts/use-asynchronously.md), there may be a delay between sending an API request and receiving the results. For information on the size and number of requests you can send per minute and second, see the data limits below.
36
36
37
-
When using this feature, the API results are available for 24 hours from the time the request was ingested, and is indicated in the response. After this time period, the results are purged and are no longer available for retrieval.
37
+
When you use this feature, the API results are available for 24 hours from the time the request was ingested, and is indicated in the response. After this time period, the results are purged and are no longer available for retrieval.
38
38
39
39
When you submit data to conversation summarization, we recommend sending one chat log per request, for better latency.
40
-
40
+
41
+
### Get summaries from text chats
42
+
43
+
You can use conversation summarization to get summaries from 2-person chats between customer service agents, and customers. To see an example using text chats, see the [quickstart article](../quickstart.md).
44
+
45
+
### Get summaries from speech transcriptions
46
+
47
+
Conversation summarization also enables you to get summaries from speech transcripts by using the [Speech service's speech-to-text feature](../../../Speech-Service/call-center-transcription.md). The following example shows a short conversation that you might include in your API requests.
48
+
49
+
```json
50
+
"conversations":[
51
+
{
52
+
"id":"abcdefgh-1234-1234-1234-1234abcdefgh",
53
+
"language":"En",
54
+
"modality":"transcript",
55
+
"conversationItems":[
56
+
{
57
+
"modality":"transcript",
58
+
"participantId":"speaker",
59
+
"id":"12345678-abcd-efgh-1234-abcd123456",
60
+
"content":{
61
+
"text":"Hi.",
62
+
"lexical":"hi",
63
+
"itn":"hi",
64
+
"maskedItn":"hi",
65
+
"audioTimings":[
66
+
{
67
+
"word":"hi",
68
+
"offset":4500000,
69
+
"duration":2800000
70
+
}
71
+
]
72
+
}
73
+
}
74
+
]
75
+
}
76
+
]
77
+
```
78
+
41
79
## Getting conversation summarization results
42
80
43
81
When you get results from language detection, you can stream the results to an application or save the output to a file on the local system.
@@ -52,7 +90,7 @@ The following text is an example of content you might submit for summarization.
52
90
53
91
Summarization is performed upon receipt of the request by creating a job for the API backend. If the job succeeded, the output of the API will be returned. The output will be available for retrieval for 24 hours. After this time, the output is purged. Due to multilingual and emoji support, the response may contain text offsets. See [how to process offsets](../../concepts/multilingual-emoji-support.md) for more information.
54
92
55
-
Using the above example, the API might return the following summarized sentences:
93
+
In the above example, the API might return the following summarized sentences:
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=PYTHON&Pillar=Language&Product=Summarization&Page=quickstart&Section=Set-up-the-environment"target="_target">I ran into an issue</a>
40
50
51
+
41
52
## Code example
42
53
43
54
Create a new Python file and copy the below code. Remember to replace the `key` variable with the key for your resource, and replace the `endpoint` variable with the endpoint for your resource.
44
55
45
56
[!INCLUDE [find the key and endpoint for a resource](../../../includes/find-azure-resource-info.md)]
The extractive summarization feature uses natural language processing techniques to locate key sentences in an unstructured text document. This feature is provided as an API for developers. They can use it to build intelligent solutions based on the relevant information extracted to support various use cases.
"text": "Hello, you’re chatting with Rene. How may I help you?",
147
+
"id": "1",
148
+
"role": "Agent",
149
+
"participantId": "Agent_1"
150
+
},
151
+
{
152
+
"text": "Hi, I tried to set up wifi connection for Smart Brew 300 coffee machine, but it didn’t work.",
153
+
"id": "2",
154
+
"role": "Customer",
155
+
"participantId": "Customer_1"
156
+
},
157
+
{
158
+
"text": "I’m sorry to hear that. Let’s see what we can do to fix this issue. Could you please try the following steps for me? First, could you push the wifi connection button, hold for 3 seconds, then let me know if the power light is slowly blinking on and off every second?",
159
+
"id": "3",
160
+
"role": "Agent",
161
+
"participantId": "Agent_1"
162
+
},
163
+
{
164
+
"text": "Yes, I pushed the wifi connection button, and now the power light is slowly blinking.",
165
+
"id": "4",
166
+
"role": "Customer",
167
+
"participantId": "Customer_1"
168
+
},
169
+
{
170
+
"text": "Great. Thank you! Now, please check in your Contoso Coffee app. Does it prompt to ask you to connect with the machine?",
171
+
"id": "5",
172
+
"role": "Agent",
173
+
"participantId": "Agent_1"
174
+
},
175
+
{
176
+
"text": "No. Nothing happened.",
177
+
"id": "6",
178
+
"role": "Customer",
179
+
"participantId": "Customer_1"
180
+
},
181
+
{
182
+
"text": "I’m very sorry to hear that. Let me see if there’s another way to fix the issue. Please hold on for a minute.",
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=PYTHON&Pillar=Language&Product=Summarization&Page=quickstart&Section=Code-example"target="_target">I ran into an issue</a>
232
+
233
+
### Output
234
+
235
+
```console
236
+
issue: Customer tried to set up wifi connection for Smart Brew 300 coffee machine, but it didn't work
237
+
resolution: Asked customer to try the following steps | Asked customer for the power light | Helped customer to connect to the machine
0 commit comments