我怎样才能每天从 QnA maker 那里获得前 10 个常见(趋势)问题?

How can I get top 10 frequently(trending) asked question from QnA maker on daily basis?

我想了解如何使用我的 QnA maker 从我的知识库中了解前 10 个趋势或常见问题? QnA 中是否使用任何参数或元数据键来存储问题的频率?天蓝色的搜索可以帮助这里什么吗?请建议...

提前致谢!!

如果您在创建 QnA Maker 服务期间启用了 App Insights,QnA Maker 会存储所有聊天记录和其他遥测数据。在 this page 上,您可以找到示例查询以从 App Insights 获取聊天记录。

示例查询

    requests
    | where url endswith "generateAnswer"
    | project timestamp, id, name, resultCode, duration
    | parse kind = regex name 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'])
    | project KbId, timestamp, resultCode, duration, question, answer

您可以编写自定义查询来检索您的前 10 个常见问题/给出的答案。

根据 Mick 的回答,假设您为机器人的 QnA 认知服务启用了 Application Insights,那么您可以在导航到 Analytics page 后使用下面的查询之一(如 Mick 所详述) :

它们可能不是最高效或优化的查询,因为我只是破解了示例查询,直到我得到我想要的。

// top questions in last 48 hours
requests
| where url endswith "generateAnswer" and timestamp > ago(48h) 
| project timestamp, id, name, resultCode, duration
| parse kind = regex name with *"(?i)knowledgebases/"KbId"/generateAnswer"
| join kind= inner (
traces | extend id = operation_ParentId
) on id
| extend question = tostring(customDimensions['Question'])
| summarize Count=count() by question
| top 100 by Count 
| project question, Count 


// top questions since timestamp
requests
| where url endswith "generateAnswer" and timestamp > datetime('2019-05-12 00:00:00')  
| project timestamp, id, name, resultCode, duration
| parse kind = regex name with *"(?i)knowledgebases/"KbId"/generateAnswer"
| join kind= inner (
traces | extend id = operation_ParentId
) on id
| extend question = tostring(customDimensions['Question'])
| summarize Count=count() by question
| top 100 by Count 
| project question, Count 


// top questions of all time
requests
| where url endswith "generateAnswer"  
| project timestamp, id, name, resultCode, duration
| parse kind = regex name with *"(?i)knowledgebases/"KbId"/generateAnswer"
| join kind= inner (
traces | extend id = operation_ParentId
) on id
| extend question = tostring(customDimensions['Question'])
| summarize Count=count() by question
| top 100 by Count 
| project question, Count 

作为奖励,您可以在查询完成后单击图表按钮以图表形式查看信息 运行。