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.
- Single Desk
- Multiple Desks
- Multiple Brains
- Brain Versions
- Specific Channels
- Remove Test Sessions
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"limit": 5
}
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c, 51ff88a7-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"limit": 5
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c, 99xx33p9-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"limit": 5
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c}",
"brainVersions": "{37,38,39}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"limit": 5
}
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c}",
"channels": "{web, facebook, viber}",
"brainVersions": "{37,38,39}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"limit": 5
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c}",
"isTest": false,
"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
}
]
}
}