Dialogflow ES: How to retrieve Confidence Score?

765 views
Skip to first unread message

Gagan Bhardwaj

unread,
Jan 13, 2022, 12:51:14 PM1/13/22
to Dialogflow CX Edition users
Hi,

I've integrated one of my Frontend with DialogFlow and looking to capture the confidence score for the spoken utterance, I don't see it anywhere in Request/Response we're getting on DF side. the all I got is "intentDetectionConfidence" which always shows the value as "1" even though for Nomatches or input.unknown.

any idea where to get the confidence score ?

Thanks,
Gagan

Abdelilah Fakkar

unread,
Jan 14, 2022, 3:06:15 AM1/14/22
to Dialogflow CX Edition users
Hi,

As it is stated in the documentation [1]:

When an end-user writes or says something, referred to as end-user input, Dialogflow compares the input to intent training phrases to find the best match. This process is called intent matching. Intent matching can only occur for intents associated with an intent route (a state handler with an intent requirement) in scope.

When searching for a matching intent, Dialogflow scores potential matches with an intent detection confidence, also known as the confidence score. These values range from 0.0 (completely uncertain) to 1.0 (completely certain). Once intents are scored, there are two possible outcomes:

  • If the highest scoring intent has a confidence score greater than or equal to the classification threshold setting, it is returned as a match.
  • If no intents meet the threshold, then a no-match event will be invoked.
I hope that would help and answer you question. 



Arvand O

unread,
Jan 14, 2022, 8:30:31 AM1/14/22
to Abdelilah Fakkar, Dialogflow CX Edition users
I think what Gagan was trying to mention was that he only gets 1 and 0. He never gets anything in between.

--
© 2021 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Dialogflow CX Edition Discussion Google Group (dialogflow-cx...@googlegroups.com) to participate in discussions with other members of the Dialogflow community and the Dialogflow Team.
---
You received this message because you are subscribed to the Google Groups "Dialogflow CX Edition users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dialogflow-cx-editi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dialogflow-cx-edition-users/63846b61-708a-4e0d-a2e5-0a9d4ab17849n%40googlegroups.com.

Gagan Bhardwaj

unread,
Jan 15, 2022, 1:11:06 PM1/15/22
to Dialogflow CX Edition users
Hi,

first, yes I'm always getting "1" for "intentDetectionConfidence" but with little researchs in the document I found this field is more relevant to our scenario   SpeechRecognitionConfidence but I don't see this is DF logs. any idea where to capture SpeechRecognitionConfidence from the request sent by front-end.

Thanks,
Gagan

Olusayo Akinlaja

unread,
Jan 17, 2022, 5:18:16 PM1/17/22
to Dialogflow CX Edition users
Hello, Gagan

Thanks for providing more clarification. I am hopeful that I understand your question well enough, nonetheless, please be sure to correct me if my understanding is wrong. 

following your last message, I understand you are rather looking to get the Speech Recognition Confidence field as it is more relevant to your Scenario. In that case, I suppose you are using one of the two Versions[v2 and v2beta1] of the Dialogflow API[1] that has this field? As you may already know the  SpeechRecognitionConfidence is a property of the result of conversational query or event processing[2] and I can confirm that the speech_recognition_confidence is a field that is part of the WebhookResponse, on both V2 [3] and V2 Beta1 [4] contain.

Reply all
Reply to author
Forward
0 new messages