Skip to main content

Most common intents

Access the top predicted intents by executing:

query TopIntentsV2(
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$brainVersions: _int4
$limit: Int!
$channels: _text
$startDate: timestamp
$endDate: timestamp
$isTest: Boolean
) {
rows: intent_counts_v2(
args: {
desk_ids: $deskIds
brain_parent_ids: $brainIds
integration_ids: $integrationIds
brain_versions: $brainVersions
channels: $channels
start_time: $startDate
end_time: $endDate
is_test: $isTest
}
order_by: { counts: desc }
limit: $limit
) {
label
counts
avg_confidence
}
}

Below are some examples of how TopIntentsV2 can be called.

{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"limit": 5
}

Example Result:

{
"data": {
"rows": [
{
"label": "handover",
"counts": 20,
"avg_confidence": 0.7545257
},
{
"label": "hours",
"counts": 17,
"avg_confidence": 1
},
{
"label": "contact_details",
"counts": 13,
"avg_confidence": 1
},
{
"label": "greetings",
"counts": 10,
"avg_confidence": 0.91284484
},
{
"label": "affirmative",
"counts": 6,
"avg_confidence": 0.8963264
}
]
}
}