如何确定DialogFlow的置信度 [英] How to determine confidence level in DialogFlow

查看:63
本文介绍了如何确定DialogFlow的置信度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户在DialogFlow中回答问题时,是否有办法获得特定短语的置信度?示例:
问:德国的首都是什么?
答:柏林

When a user is responding to a question in DialogFlow, is there a way to obtain the confidence levels that was achieved for a specific phrase? Example: Q: What is the capital of Germany? A: Berlin

我想回想一下AI对用户的理解程度,例如:

I would like to read back how well the AI understood the user, e.g.:

他说:柏林 --->他说柏林的置信度为87.3%

He said: "Boerlin" ---> 87.3% confidence level that he said "Berlin"

有没有办法读回这种信息?

Is there a way to read back this kind of information?

推荐答案

托马斯。看看Google Apis DetectIntent文档。

Thomas. Have a look at the Google Apis DetectIntent Documentation.

https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.environments.users .sessions / detectIntent

使用方法如下:

POST https://dialogflow.googleapis.com/v2/projects/{DialogFlowProjectName}/agent/sessions/{SessionId}:detectIntent

正文:

{
  "queryInput": {
    "text": {
      "text": "{Question You would like to ask}",
      "languageCode": "en-EN"
    }
  }
}

它使用OAuth2.0,可以使用Google OAuth沙盒生成临时令牌来使用
https://developers.google.com/oauthplayground/

It Uses OAuth2.0 you can use google OAuth Sandbox to generate a temporary token to use https://developers.google.com/oauthplayground/

在响应中将出现一个字段:

In the response there will be a field:

"intentDetectionConfidence": 0.6776556,
 "intent": {
            "name": "{IntentId}",
            "displayName": "{IntentName}"
        }

这篇关于如何确定DialogFlow的置信度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆