Share via


기술 자료에 대한 분석 가져오기

QnA Maker Service를 만드는 동안 Application Insights를 사용하도록 설정한 경우 QnA Maker는 모든 채팅 로그 및 기타 원격 분석을 저장합니다. 샘플 쿼리를 실행하여 Application Insight에서 채팅 로그를 가져옵니다.

참고 항목

QnA Maker 서비스가 2025년 3월 31일부로 종료됩니다. 이제 최신 버전의 질문 및 답변 기능이 Azure AI 언어의 일부로 사용할 수 있습니다. 언어 서비스 내의 질문 답변 기능은 질문 답변을 참조하세요. 2022년 10월 1일부터 새로운 QnA Maker 리소스를 만들 수 없습니다. 기존 QnA Maker 기술 자료를 질문 답변으로 마이그레이션하는 방법에 대한 정보는 마이그레이션 가이드를 참조하세요.

  1. Application Insights 리소스로 이동합니다.

    Select your application insights resource

  2. Log(Analytics)를 선택합니다. QnA Maker 원격 분석을 쿼리할 수 있는 새 창이 열립니다.

  3. 다음 쿼리에 붙여넣고 실행합니다.

    requests
    | where url endswith "generateAnswer"
    | project timestamp, id, url, resultCode, duration, performanceBucket
    | parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
    | join kind= inner (
    traces | extend id = operation_ParentId
    ) on id
    | where message == "QnAMaker GenerateAnswer"
    | extend question = tostring(customDimensions['Question'])
    | extend answer = tostring(customDimensions['Answer'])
    | extend score = tostring(customDimensions['Score'])
    | project timestamp, resultCode, duration, id, question, answer, score, performanceBucket,KbId
    

    실행을 선택하여 쿼리를 실행합니다.

    Run query to determine questions, answers, and score from users

QnA Maker 기술 자료에 대한 다른 분석에 대해 쿼리 실행

총 90일 트래픽

//Total Traffic
requests
| where url endswith "generateAnswer" and name startswith "POST"
| parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
| summarize ChatCount=count() by bin(timestamp, 1d), KbId

지정된 기간 동안 총 질문 트래픽

//Total Question Traffic in a given time period
let startDate = todatetime('2019-01-01');
let endDate = todatetime('2020-12-31');
requests
| where timestamp <= endDate and timestamp >=startDate
| where url endswith "generateAnswer" and name startswith "POST"
| parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
| summarize ChatCount=count() by KbId

사용자 트래픽

//User Traffic
requests
| where url endswith "generateAnswer"
| project timestamp, id, url, resultCode, duration
| parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
| join kind= inner (
traces | extend id = operation_ParentId
) on id
| extend UserId = tostring(customDimensions['UserId'])
| summarize ChatCount=count() by bin(timestamp, 1d), UserId, KbId

질문 배포 대기 시간

//Latency distribution of questions
requests
| where url endswith "generateAnswer" and name startswith "POST"
| parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
| project timestamp, id, name, resultCode, performanceBucket, KbId
| summarize count() by performanceBucket, KbId

대답이 없는 질문

// Unanswered questions
requests
| where url endswith "generateAnswer"
| project timestamp, id, url
| parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
| join kind= inner (
traces | extend id = operation_ParentId
) on id
| extend question = tostring(customDimensions['Question'])
| extend answer = tostring(customDimensions['Answer'])
| extend score = tostring(customDimensions['Score'])
| where  score  == "0" and message == "QnAMaker GenerateAnswer"
| project timestamp, KbId, question, answer, score
| order  by timestamp  desc

참고
Application Insight를 사용하여 로그를 제대로 가져올 수 없는 경우 App Service 리소스에서 Application Insights 설정을 확인하세요. App Service 리소스를 열고 Application Insights로 이동합니다. 그런 다음, 사용 또는 사용 안 함인지 확인하세요. 사용하지 않도록 설정된 경우 사용하도록 설정한 다음, 해당 위치에서 적용하세요.

다음 단계