LUIS讲话和响应处理

问题描述 投票:1回答:2

跟踪对LUISQnA Maker的请求是什么的最佳方法是什么?

我不想在任何数据库中记录语音和响应,我需要类似AppInsights的东西。

botframework luis
2个回答
1
投票

当然可以做到这一点,并且有很多内置的功能。您没有提到您使用的是哪种语言/环境(.net或节点),但是这里有一些出发点:

  1. Add telemetry to your bot(此链接将带您直接进入LUIS&QnA Maker的那一部分)
  2. Add telemetry to your QnAMaker bot

我想,如果这是您选择的语言,那么等效于node。如果是这样,this example可能会有用。


0
投票

对于Qna Maker,只要在创建QnA Maker服务时启用了Application Insights,您所需要做的就是在日志中创建并运行查询。 This page提供了许多可以运行的分析示例。

对于LUIS,Hilton提供的链接适用于C#,但对于节点,您需要使用其他方法。 This example将向您展示如何在节点中创建LUIS App Insights助手并将跟踪发送到Application Insights。它没有为您提供示例查询,但是这里有一些我使用并发现有用的查询。如果您要寻找某些特定指标,请告诉我。


过去30天的意图饼图

requests
| where url endswith "messages"
| where timestamp > ago(30d)
| project timestamp, duration, performanceBucket, resultCode, url, id
| parse kind = regex url with *"(?i)http://"botName".azurewebsites.net/api/messages"
| join kind= inner (
traces | extend id = operation_ParentId
) on id
| where message == "LUIS"
| extend topIntent = tostring(customDimensions.LUIS_luisResponse_luisResult_topScoringIntent_intent)
| where topIntent != "None"
| where topIntent != ""
| summarize count() by topIntent
| order by count_ desc
| render piechart

结果低于置信度0.5的查询列表

requests
| where url endswith "messages"
| where timestamp > ago(30d)
| project timestamp, duration, performanceBucket, resultCode, url, id
| parse kind = regex url with *"(?i)http://"botName".azurewebsites.net/api/messages"
| join kind= inner (
traces | extend id = operation_ParentId
) on id
| where message == "LUIS"
| extend topIntent = tostring(customDimensions.LUIS_luisResponse_luisResult_topScoringIntent_intent)
| extend score = todouble(customDimensions.LUIS_luisResponse_luisResult_topScoringIntent_score)
| extend utterance = tostring(customDimensions.LUIS_luisResponse_text)
| order by timestamp desc nulls last
| project timestamp, botName, topIntent, score, utterance, performanceBucket, duration, resultCode
| where score < 0.5

每个会话的平均消息数

requests
| where url endswith "messages"
| where timestamp > ago(30d)
| project timestamp, url, id
| parse kind = regex url with *"(?i)http://"botName".azurewebsites.net/api/messages"
| join kind= inner (
traces | extend id = operation_ParentId
) on id
| where message == "LUIS"
| extend convID = tostring(customDimensions.LUIS_botContext_conversation_id)
| order by timestamp desc nulls last
| project timestamp, botName, convID
| summarize messages=count() by conversation=convID
| summarize conversations=count(), messageAverage=avg(messages)
© www.soinside.com 2019 - 2024. All rights reserved.