Querying confidence of a class trigger

Hello :slightly_smiling_face:,

As a part of ML experiment I would like to be able to query the confidence of a class trigger. I do understand that during annotation process Teneo sets a whole bunch of annotations, for the different intents, I am interested of a .TOP_INTENT confidence level.

The information is there because it is accessible through session viewer and goes under name f:confidence. Unfortunately all the different annotations have a “f:confidence” variable :smiley:


The query I run, “f:confidence” is returning “null” so this is apparently not the “way to go”. Sidequestion, for some reason running this query returns multiples of the same input :open_mouth: .

image
A screen of session viewer where I can find interesting confidence level.

Would be really nice to get a conf. level as a column during querying instead have to “deep in” to each session! Any ideas?

Thanks in advance,
Stanislav

Hi Stasysha,
the reason why you get null is because f:confidence is attached to the annotation variable in Inquire, while querying on just “f:confidence” will just query for the top level (where it doesn’t exist, so null).

I think this query should help you to get the confidence for top intents.

la t.e.annotation.name, t.e.annotation.variables.f:confidence : t.e.annotation.name ~= ".*TOP_INTENT"

It basically lists the intent names and confidence where the annotations name (which in this case is the intent name) matches the regex .*TOP_INTENT .
I hope this helps, otherwise, don’t hesitate to ask again!

Eric

Hello Eric,

Many thanks! This is exactly what I was looking for and it all makes sense after you explanation.

For the record (might help others in the future), I tried to run what you gave me and it worked just smooth but at first trying to integrate it in part of my code it failed.

la s.id, t.e1.userInput as Input, t.e2.answerText as Output, t.id, t.time, t.e.annotation.name, t.e.annotation.variables.f:confidence as conf: 

exists t.e1.userInput, 
s.beginTime == in {"now-1M/M"},
t.e.annotation.name ~= ".*TOP_INTENT",
t.e.fid == 'xxxxxx-81ec-4e8f-bb55-ab97a4a0ee60' 

order by t.time asc

However I approached it a bit different and got the exact information I wanted (input, output and the confidence) by following:

la t.e1.userInput as Input, t.e2.answerText as Output, t.time, t.e.annotation.name, t.e.annotation.variables.f:confidence as conf: 

t.e.annotation.name ~= "CT_OF_INTEREST.TOP_INTENT"

order by t.time asc

Thanks again :smiley:

Stanislav

1 Like