Share via


대화 요약을 사용하는 방법

Important

미리 보기 지역인 스웨덴 중부에서는 GPT 모델을 기준으로 계속 진화하고 있는 최신 LLM 미세 조정 기술을 선보입니다. 스웨덴 중부 지역의 언어 리소스로 이 기술을 사용해 볼 수 있습니다.

대화 요약은 다음을 통해서만 사용할 수 있습니다.

  • REST API
  • Python
  • C#

대화 요약 양상

  • 챕터 제목과 설명(일반 대화)은 대화를 챕터 제목으로 요약하고 대화 내용을 요약하도록 설계되었습니다. 이 요약 양상은 여러 당사자와의 대화에서 작동합니다.

  • 문제 및 해결(콜 센터 중심)은 고객과 고객 서비스 에이전트 간의 텍스트 채팅 로그를 요약하도록 설계되었습니다. 이 기능은 두 당사자 간에 발생하는 이러한 로그에 있는 문제와 해결 방법을 모두 제공할 수 있습니다.

  • 내러티브는 대화의 내러티브를 요약하도록 설계되었습니다.

  • 요약은 긴 모임 또는 대화를 간결한 한 단락 요약으로 압축하여 간략한 개요를 제공하도록 설계되었습니다.

  • 후속 작업은 모임 중에 발생하는 작업 항목 및 작업을 요약하도록 설계되었습니다.

대화 요약 문제 및 해결 기능에 데이터를 전송하는 다이어그램.

API에서 사용하는 AI 모델은 서비스를 통해 제공되며, 분석 용도로만 콘텐츠를 전송해야 합니다.

더 쉽게 탐색할 수 있도록 각 서비스에 해당하는 섹션에 대한 링크는 다음과 같습니다.

측면 섹션
문제 및 해결 방법 문제 및 해결 방법
장 제목 장 제목
내러티브 내러티브
요약 및 후속 작업 요약 및 후속 작업

기능

대화 요약 API는 자연어 처리 기술을 사용하여 요청당 더 짧은 요약으로 대화를 요약합니다. 대화 요약은 두 당사자 대화에서 논의된 문제 및 해결을 요약하거나 긴 대화를 챕터로 요약하고 각 챕터에 대한 짧은 설명을 요약할 수 있습니다.

Azure AI 언어에는 문서를 간결한 요약으로 요약하는 데 더 적합한 텍스트 요약이라는 또 다른 기능이 있습니다. 텍스트 요약과 대화 요약 중에서 결정할 때는 다음 사항을 고려합니다.

  • 입력 형식: 대화 요약은 화자와 발화를 포함하는 채팅 텍스트와 음성 기록 모두에서 작동할 수 있습니다. 텍스트 요약은 간단한 텍스트 또는 Word, PDF 또는 PowerPoint 형식을 사용하여 작동합니다.
  • 요약의 목적: 예를 들어, 대화 문제 및 해결 요약은 고객과 고객 서비스 에이전트 간의 채팅에 대한 이유와 해결을 반환합니다.

데이터 제출

참고 항목

Language Studio를 사용하여 제출할 대화 텍스트 서식에 대한 자세한 내용은 Language Studio 문서를 참조하세요.

문서를 텍스트 문자열로 API에 제출합니다. 요청을 받으면 분석이 수행됩니다. API는 비동기이므로 API 요청을 보내고 결과를 받는 사이에 지연이 있을 수 있습니다. 분당 및 초당 보낼 수 있는 요청의 크기와 수에 대한 정보는 아래 데이터 제한을 참조하세요.

이 기능을 사용하는 경우 요청이 수집된 시간부터 24시간 동안 API 결과를 사용할 수 있으며 응답에 표시됩니다. 이 기간이 지나면 결과가 제거되고 더 이상 검색할 수 없습니다.

대화 요약에 데이터를 제출할 때 대기 시간을 단축하기 위해 요청당 하나의 채팅 로그를 보내는 것이 좋습니다.

텍스트 채팅에서 요약 가져오기

대화 문제 및 해결 요약을 사용하여 필요에 따라 요약을 가져올 수 있습니다. 텍스트 채팅을 사용하는 예제를 보려면 빠른 시작 문서를 참조하세요.

음성 전사에서 요약 가져오기

대화 문제 및 해결 요약을 사용하면 Speech Services 음성 텍스트 변환 기능을 사용하여 음성 스크립트에서 요약을 가져올 수도 있습니다. 다음 예제에서는 API 요청에 포함할 수 있는 짧은 대화를 보여 줍니다.

"conversations":[
   {
      "id":"abcdefgh-1234-1234-1234-1234abcdefgh",
      "language":"en",
      "modality":"transcript",
      "conversationItems":[
         {
            "modality":"transcript",
            "participantId":"speaker",
            "id":"12345678-abcd-efgh-1234-abcd123456",
            "content":{
               "text":"Hi.",
               "lexical":"hi",
               "itn":"hi",
               "maskedItn":"hi",
               "audioTimings":[
                  {
                     "word":"hi",
                     "offset":4500000,
                     "duration":2800000
                  }
               ]
            }
         }
      ]
   }
]

챕터 제목 가져오기

대화 챕터 제목 요약을 사용하면 입력 대화에서 챕터 제목을 가져올 수 있습니다. 가이드 예 시나리오는 다음과 같습니다.

  1. 아래 명령을 텍스트 편집기에 복사합니다. BASH 예에서는 \ 줄 연속 문자를 사용합니다. 콘솔 또는 터미널에서 다른 줄 연속 문자를 사용하는 경우 해당 문자를 사용하세요.
curl -i -X POST https://<your-language-resource-endpoint>/language/analyze-conversations/jobs?api-version=2023-11-15-preview \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: <your-language-resource-key>" \
-d \
' 
{
  "displayName": "Conversation Task Example",
  "analysisInput": {
    "conversations": [
      {
        "conversationItems": [
          {
            "text": "Hello, you’re chatting with Rene. How may I help you?",
            "id": "1",
            "role": "Agent",
            "participantId": "Agent_1"
          },
          {
            "text": "Hi, I tried to set up wifi connection for Smart Brew 300 espresso machine, but it didn’t work.",
            "id": "2",
            "role": "Customer",
            "participantId": "Customer_1"
          },
          {
            "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?",
            "id": "3",
            "role": "Agent",
            "participantId": "Agent_1"
          },
          {
            "text": "Yes, I pushed the wifi connection button, and now the power light is slowly blinking.",
            "id": "4",
            "role": "Customer",
            "participantId": "Customer_1"
          },
          {
            "text": "Great. Thank you! Now, please check in your Contoso Coffee app. Does it prompt to ask you to connect with the machine? ",
            "id": "5",
            "role": "Agent",
            "participantId": "Agent_1"
          },
          {
            "text": "No. Nothing happened.",
            "id": "6",
            "role": "Customer",
            "participantId": "Customer_1"
          },
          {
            "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.",
            "id": "7",
            "role": "Agent",
            "participantId": "Agent_1"
          }
        ],
        "modality": "text",
        "id": "conversation1",
        "language": "en"
      }
    ]
  },
  "tasks": [
    {
      "taskName": "Conversation Task 1",
      "kind": "ConversationalSummarizationTask",
      "parameters": {
        "summaryAspects": [
          "chapterTitle"
        ]
      }
    }
  ]
}
'
  1. 필요한 경우 명령에서 다음 내용을 변경합니다.

    • your-value-language-key 값을 키로 바꿉니다.
    • 요청 URL your-language-resource-endpoint의 첫 번째 부분을 고유한 엔드포인트 URL로 바꿉니다.
  2. 명령 프롬프트 창(예: BASH)을 엽니다.

  3. 텍스트 편집기에서 명령 프롬프트 창으로 명령을 붙여넣은 후 명령을 실행합니다.

  4. 응답 헤더에서 operation-location을 가져옵니다. 값은 다음 URL과 유사합니다.

https://<your-language-resource-endpoint>/language/analyze-conversations/jobs/12345678-1234-1234-1234-12345678?api-version=2023-11-15-preview
  1. 요청 결과를 가져오려면 다음 cURL 명령을 사용합니다. <my-job-id>를 이전 operation-location 응답 헤더에서 받은 GUID 값으로 바꿉니다.
curl -X GET https://<your-language-resource-endpoint>/language/analyze-conversations/jobs/<my-job-id>?api-version=2023-11-15-preview \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: <your-language-resource-key>"

챕터 제목 요약 JSON 응답 예:

{
    "jobId": "b01af3b7-1870-460a-9e36-09af28d360a1",
    "lastUpdatedDateTime": "2023-11-15T18:24:26Z",
    "createdDateTime": "2023-11-15T18:24:23Z",
    "expirationDateTime": "2023-11-16T18:24:23Z",
    "status": "succeeded",
    "errors": [],
    "displayName": "Conversation Task Example",
    "tasks": {
        "completed": 1,
        "failed": 0,
        "inProgress": 0,
        "total": 1,
        "items": [
            {
                "kind": "conversationalSummarizationResults",
                "taskName": "Conversation Task 1",
                "lastUpdateDateTime": "2023-11-15T18:24:26.3433677Z",
                "status": "succeeded",
                "results": {
                    "conversations": [
                        {
                            "summaries": [
                                {
                                    "aspect": "chapterTitle",
                                    "text": "\"Discussing the Problem of Smart Blend 300 Espresso Machine's Wi-Fi Connectivity\"",
                                    "contexts": [
                                        {
                                            "conversationItemId": "1",
                                            "offset": 0,
                                            "length": 53
                                        },
                                        {
                                            "conversationItemId": "2",
                                            "offset": 0,
                                            "length": 94
                                        },
                                        {
                                            "conversationItemId": "3",
                                            "offset": 0,
                                            "length": 266
                                        },
                                        {
                                            "conversationItemId": "4",
                                            "offset": 0,
                                            "length": 85
                                        },
                                        {
                                            "conversationItemId": "5",
                                            "offset": 0,
                                            "length": 119
                                        },
                                        {
                                            "conversationItemId": "6",
                                            "offset": 0,
                                            "length": 21
                                        },
                                        {
                                            "conversationItemId": "7",
                                            "offset": 0,
                                            "length": 109
                                        }
                                    ]
                                }
                            ],
                            "id": "conversation1",
                            "warnings": []
                        }
                    ],
                    "errors": [],
                    "modelVersion": "latest"
                }
            }
        ]
    }
}

긴 대화의 경우 모델은 이를 여러 응집력 있는 부분으로 분할하고 각 세그먼트를 요약할 수 있습니다. 또한 요약을 생성한 입력 대화의 범위를 알려 주는 각 요약에 대한 긴 contexts 필드도 있습니다.

설명 요약 가져오기

대화 요약을 사용하면 입력 대화에서 설명 요약을 가져올 수도 있습니다. 가이드 예 시나리오는 다음과 같습니다.

  1. 아래 명령을 텍스트 편집기에 복사합니다. BASH 예에서는 \ 줄 연속 문자를 사용합니다. 콘솔 또는 터미널에서 다른 줄 연속 문자를 사용하는 경우 해당 문자를 사용하세요.
curl -i -X POST https://<your-language-resource-endpoint>/language/analyze-conversations/jobs?api-version=2023-11-15-preview \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: <your-language-resource-key>" \
-d \
' 
{
  "displayName": "Conversation Task Example",
  "analysisInput": {
    "conversations": [
      {
        "conversationItems": [
          {
            "text": "Hello, you’re chatting with Rene. How may I help you?",
            "id": "1",
            "role": "Agent",
            "participantId": "Agent_1"
          },
          {
            "text": "Hi, I tried to set up wifi connection for Smart Brew 300 espresso machine, but it didn’t work.",
            "id": "2",
            "role": "Customer",
            "participantId": "Customer_1"
          },
          {
            "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?",
            "id": "3",
            "role": "Agent",
            "participantId": "Agent_1"
          },
          {
            "text": "Yes, I pushed the wifi connection button, and now the power light is slowly blinking.",
            "id": "4",
            "role": "Customer",
            "participantId": "Customer_1"
          },
          {
            "text": "Great. Thank you! Now, please check in your Contoso Coffee app. Does it prompt to ask you to connect with the machine? ",
            "id": "5",
            "role": "Agent",
            "participantId": "Agent_1"
          },
          {
            "text": "No. Nothing happened.",
            "id": "6",
            "role": "Customer",
            "participantId": "Customer_1"
          },
          {
            "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.",
            "id": "7",
            "role": "Agent",
            "participantId": "Agent_1"
          }
        ],
        "modality": "text",
        "id": "conversation1",
        "language": "en"
      }
    ]
  },
  "tasks": [
    {
      "taskName": "Conversation Task 1",
      "kind": "ConversationalSummarizationTask",
      "parameters": {
        "summaryAspects": [
          "narrative"
        ]
      }
    }
  ]
}
'
  1. 필요한 경우 명령에서 다음 내용을 변경합니다.

    • your-language-resource-key 값을 키로 바꿉니다.
    • 요청 URL your-language-resource-endpoint의 첫 번째 부분을 고유한 엔드포인트 URL로 바꿉니다.
  2. 명령 프롬프트 창(예: BASH)을 엽니다.

  3. 텍스트 편집기에서 명령 프롬프트 창으로 명령을 붙여넣은 후 명령을 실행합니다.

  4. 응답 헤더에서 operation-location을 가져옵니다. 값은 다음 URL과 유사합니다.

https://<your-language-resource-endpoint>/language/analyze-conversations/jobs/12345678-1234-1234-1234-12345678?api-version=2023-11-15-preview
  1. 요청 결과를 가져오려면 다음 cURL 명령을 사용합니다. <my-job-id>를 이전 operation-location 응답 헤더에서 받은 GUID 값으로 바꿉니다.
curl -X GET https://<your-language-resource-endpoint>/language/analyze-conversations/jobs/<my-job-id>?api-version=2023-11-15-preview \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: <your-language-resource-key>"

설명 요약 JSON 응답 예:

{
  "jobId": "d874a98c-bf31-4ac5-8b94-5c236f786754",
  "lastUpdatedDateTime": "2022-09-29T17:36:42Z",
  "createdDateTime": "2022-09-29T17:36:39Z",
  "expirationDateTime": "2022-09-30T17:36:39Z",
  "status": "succeeded",
  "errors": [],
  "displayName": "Conversation Task Example",
  "tasks": {
    "completed": 1,
    "failed": 0,
    "inProgress": 0,
    "total": 1,
    "items": [
      {
        "kind": "conversationalSummarizationResults",
        "taskName": "Conversation Task 1",
        "lastUpdateDateTime": "2022-09-29T17:36:42.895694Z",
        "status": "succeeded",
        "results": {
          "conversations": [
            {
              "summaries": [
                {
                  "aspect": "narrative",
                  "text": "Agent_1 helps customer to set up wifi connection for Smart Brew 300 espresso machine.",
                  "contexts": [
                    { "conversationItemId": "1", "offset": 0, "length": 53 },
                    { "conversationItemId": "2", "offset": 0, "length": 94 },
                    { "conversationItemId": "3", "offset": 0, "length": 266 },
                    { "conversationItemId": "4", "offset": 0, "length": 85 },
                    { "conversationItemId": "5", "offset": 0, "length": 119 },
                    { "conversationItemId": "6", "offset": 0, "length": 21 },
                    { "conversationItemId": "7", "offset": 0, "length": 109 }
                  ]
                }
              ],
              "id": "conversation1",
              "warnings": []
            }
          ],
          "errors": [],
          "modelVersion": "latest"
        }
      }
    ]
  }
}

긴 대화의 경우 모델은 이를 여러 응집력 있는 부분으로 분할하고 각 세그먼트를 요약할 수 있습니다. 또한 요약을 생성한 입력 대화의 범위를 알려 주는 각 요약에 대한 긴 contexts 필드도 있습니다.

요약 및 후속 작업 요약 가져오기

대화 요약을 사용하면 입력 대화에서 요약 및 후속 작업을 가져올 수도 있습니다. 가이드 예 시나리오는 다음과 같습니다.

  1. 아래 명령을 텍스트 편집기에 복사합니다. BASH 예에서는 \ 줄 연속 문자를 사용합니다. 콘솔 또는 터미널에서 다른 줄 연속 문자를 사용하는 경우 해당 문자를 사용하세요.
curl -i -X POST https://<your-language-resource-endpoint>/language/analyze-conversations/jobs?api-version=2023-11-15-preview \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: <your-language-resource-key>" \
-d \
' 
{
  "displayName": "Conversation Task Example",
  "analysisInput": {
    "conversations": [
      {
        "conversationItems": [
          {
            "text": "Hello, you’re chatting with Rene. How may I help you?",
            "id": "1",
            "role": "Agent",
            "participantId": "Agent_1"
          },
          {
            "text": "Hi, I tried to set up wifi connection for Smart Brew 300 espresso machine, but it didn’t work.",
            "id": "2",
            "role": "Customer",
            "participantId": "Customer_1"
          },
          {
            "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?",
            "id": "3",
            "role": "Agent",
            "participantId": "Agent_1"
          },
          {
            "text": "Yes, I pushed the wifi connection button, and now the power light is slowly blinking.",
            "id": "4",
            "role": "Customer",
            "participantId": "Customer_1"
          },
          {
            "text": "Great. Thank you! Now, please check in your Contoso Coffee app. Does it prompt to ask you to connect with the machine? ",
            "id": "5",
            "role": "Agent",
            "participantId": "Agent_1"
          },
          {
            "text": "No. Nothing happened.",
            "id": "6",
            "role": "Customer",
            "participantId": "Customer_1"
          },
          {
            "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.",
            "id": "7",
            "role": "Agent",
            "participantId": "Agent_1"
          }
        ],
        "modality": "text",
        "id": "conversation1",
        "language": "en"
      }
    ]
  },
  "tasks": [
    {
      "taskName": "Conversation Task 1",
      "kind": "ConversationalSummarizationTask",
      "parameters": {
        "summaryAspects": [
          "recap",
          "follow-up tasks"
        ]
      }
    }
  ]
}
'
  1. 필요한 경우 명령에서 다음 내용을 변경합니다.

    • your-language-resource-key 값을 키로 바꿉니다.
    • 요청 URL your-language-resource-endpoint의 첫 번째 부분을 고유한 엔드포인트 URL로 바꿉니다.
  2. 명령 프롬프트 창(예: BASH)을 엽니다.

  3. 텍스트 편집기에서 명령 프롬프트 창으로 명령을 붙여넣은 후 명령을 실행합니다.

  4. 응답 헤더에서 operation-location을 가져옵니다. 값은 다음 URL과 유사합니다.

https://<your-language-resource-endpoint>/language/analyze-conversations/jobs/12345678-1234-1234-1234-12345678?api-version=2023-11-15-preview
  1. 요청 결과를 가져오려면 다음 cURL 명령을 사용합니다. <my-job-id>를 이전 operation-location 응답 헤더에서 받은 GUID 값으로 바꿉니다.
curl -X GET https://<your-language-resource-endpoint>/language/analyze-conversations/jobs/<my-job-id>?api-version=2023-11-15-preview \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: <your-language-resource-key>"

요약 및 후속 요약 JSON 응답 예제:

{
    "jobId": "e585d097-c19a-466e-8f99-a9646e55b1f5",
    "lastUpdatedDateTime": "2023-11-15T18:19:56Z",
    "createdDateTime": "2023-11-15T18:19:53Z",
    "expirationDateTime": "2023-11-16T18:19:53Z",
    "status": "succeeded",
    "errors": [],
    "displayName": "Conversation Task Example",
    "tasks": {
        "completed": 1,
        "failed": 0,
        "inProgress": 0,
        "total": 1,
        "items": [
            {
                "kind": "conversationalSummarizationResults",
                "taskName": "Conversation Task 1",
                "lastUpdateDateTime": "2023-11-15T18:19:56.1801785Z",
                "status": "succeeded",
                "results": {
                    "conversations": [
                        {
                            "summaries": [
                                {
                                    "aspect": "recap",
                                    "text": "The customer contacted the service agent, Rene, regarding an issue with setting up a wifi connection for their Smart Brew 300 espresso machine. The agent guided the customer through several steps, including pushing the wifi connection button and checking if the power light was blinking. However, the customer reported that no prompts were received in the Contoso Coffee app to connect with the machine. The agent then decided to look for another solution.",
                                    "contexts": [
                                        {
                                            "conversationItemId": "1",
                                            "offset": 0,
                                            "length": 53
                                        },
                                        {
                                            "conversationItemId": "2",
                                            "offset": 0,
                                            "length": 94
                                        },
                                        {
                                            "conversationItemId": "3",
                                            "offset": 0,
                                            "length": 266
                                        },
                                        {
                                            "conversationItemId": "4",
                                            "offset": 0,
                                            "length": 85
                                        },
                                        {
                                            "conversationItemId": "5",
                                            "offset": 0,
                                            "length": 119
                                        },
                                        {
                                            "conversationItemId": "6",
                                            "offset": 0,
                                            "length": 21
                                        },
                                        {
                                            "conversationItemId": "7",
                                            "offset": 0,
                                            "length": 109
                                        }
                                    ]
                                },
                                {
                                    "aspect": "Follow-Up Tasks",
                                    "text": "@Agent_1 will ask the customer to push the wifi connection button, hold for 3 seconds, then check if the power light is slowly blinking on and off every second."
                                },
                                {
                                    "aspect": "Follow-Up Tasks",
                                    "text": "@Agent_1 will ask the customer to check in the Contoso Coffee app if it prompts to connect with the machine."
                                },
                                {
                                    "aspect": "Follow-Up Tasks",
                                    "text": "@Agent_1 will investigate another way to fix the issue."
                                }
                            ],
                            "id": "conversation1",
                            "warnings": []
                        }
                    ],
                    "errors": [],
                    "modelVersion": "latest"
                }
            }
        ]
    }
}

긴 대화의 경우 모델은 이를 여러 응집력 있는 부분으로 분할하고 각 세그먼트를 요약할 수 있습니다. 또한 요약을 생성한 입력 대화의 범위를 알려 주는 각 요약에 대한 긴 contexts 필드도 있습니다.

대화 문제 및 해결 요약 결과 가져오기

다음 텍스트는 대화 문제 및 해결 요약을 위해 제출할 수 있는 콘텐츠의 예입니다. 이는 예제일 뿐이며 API는 더 긴 입력 텍스트를 허용할 수 있습니다. 자세한 내용은 데이터 제한을 참조하세요.

에이전트: "안녕하세요, 무엇을 도와드릴까요?"

고객: "Contoso 구독을 업그레이드하려면 어떻게 해야 하나요? 하루 종일 시도했습니다."

에이전트: "업그레이드 단추를 누른 다음, 로그인하고 지침을 따릅니다."

요약은 API 백 엔드에 대한 작업을 만들어 요청이 수신될 때 수행됩니다. 작업이 성공하면 API의 출력이 반환됩니다. 출력은 24시간 동안 검색에 사용할 수 있습니다. 이 시간이 지나면 출력이 제거됩니다. 다국어 지원 및 emoji 지원으로 인해 응답에 텍스트 오프셋이 포함될 수 있습니다. 자세한 내용은 오프셋 처리 방법을 참조하세요.

위의 예제에서 API는 다음과 같은 요약된 문장을 반환할 수 있습니다.

요약된 텍스트 측면
"고객은 구독을 업그레이드하려고 합니다. 고객은 방법을 모릅니다." 이슈
"고객은 업그레이드 단추를 누르고 로그인해야 합니다." 확인

참고 항목