我想了解如何使用我的QnA制造商了解我的知识库中的前10个趋势或常见问题?在QnA中是否有任何参数或元数据键用于存储问题的频率?天蓝色的搜索可以帮到这里吗?请建议......
提前致谢!!
继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
作为奖励,您可以单击图表按钮,在查询运行后以图表形式查看信息。
如果您在创建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个常见问题/给出的答案。