How to track what users ask on chatbot ( Microsoft

2019-08-21 11:50发布

问题:

I am using Microsoft Bot Service and chatbot will be implemented on company website. For the beginning, I want to store every message users ask. How to do that?

回答1:

I found out how to do that. You need to log in to your Azure Bot account. After that navigate to the Dashboard and look at botname-ai file. Click that and find Analyze option. Then run this command and thats it:

  requests
| where url endswith "generateAnswer"
| project timestamp, id, name, resultCode, duration
| parse name with *"/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