Search code examples
twiliotwilio-apitwilio-functions

Retrieving confidence score inside of Twilio function?


I'm creating a chatbot using the Twilio Autopilot for SMS and Voice. I want to know if there's a way to obtain the confidence score for the task the Twilio NLP matches. I want to obtain it when inside a Twilio function the task has invoked. The below diagram might explain better what I want

UserInput -> Twilio NLP -> Task -> Twilio Function (obtain confidence score)

I needed it in order to determine if the confidence score is high enough to execute the action I want, or if I would prefer the user to repeat the question.

If there's a way to set this inside of Twilio for all tasks, in such a way that works for all tasks even better.

Thanks in advance


Solution

  • Twilio developer evangelist here.

    The confidence score for a task is not exposed as part of the API for Autopilot. The confidence threshold is set internally but re-evaluated constantly as we make improvements to and evolve the models.