简体   繁体   中英

IBM Watson Assistant: How can I filter messages for “anything else”?

In Analytics > User conversations, I would like to filter out the messages which my Watson Assistant was unable to answer in its conversations, ie, when it returns the anything_else reply.

But since anything_else is not an intent nor an entity, I can't filter messages by it in the UI. Is it possible to therefore filter messages by the assistant's reply, like you can with user statements? That way I can filter out each time the assistant answered "I don't understand".

IBM Watson Assistant offers the log in the Analytics section of it UI and, IMHO more powerful, via REST API with filter expressions . With that API you can either download all logs and filter "offline" or apply some expressions. I recommend reading the documentation about how to query the "other" fields which includes the user responses.

I have written Python tools for Watson Assistant using the V1 and V2 APIs. The V1 tool is able to download or query the logs. An option is to download all available logs, then use jq to filter them.

python wctool.py -logs -config config.json.event -id 28ac4bcb-2aae-41aa-87ac-2e6074e1356a > logs201904.out

This gives you the information about which nodes were visited:

cat logs201904.out | jq -r '.logs | .[]
       | .response.output.nodes_visited   '

Filter for log records that visited "Anything else":

cat logs201904.out | jq -r '.logs | .[] | .response | select( 
    .output.nodes_visited[] | contains("Anything else")) '

anything_else means either an intent was not found, or the confidence was < 0.2.

Filter looking for intents = [], or confidence of first intent is below 20%

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM