Skip to main content

Brains Performance

Access the performance of one or more Brains

query BrainsPerformance(
$accountId: uuid
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$brainVersions: _int4
$channels: _text
$startDate: timestamp
$endDate: timestamp
$isTest: Boolean
$agentIds: _text
$tags: _text
$minNumUserMessages: Int
) {
rows: brains_performance(
args: {
account_id: $accountId
start_time: $startDate
end_time: $endDate
brain_parent_ids: $brainIds
desk_ids: $deskIds
integration_ids: $integrationIds
brain_versions: $brainVersions
channels: $channels
is_test: $isTest
agent_ids: $agentIds
tags: $tags
min_num_user_messages: $minNumUserMessages
}
) {
brain_parent_id
containment
coverage
avg_confidence
median_confidence
avg_response_time
avg_first_response_time
median_response_time
median_first_response_time
max_response_time
max_first_response_time
min_response_time
min_first_response_time
avg_close_time
median_close_time
max_close_time
min_close_time
ratings
avg_rating
ratings_more_than_3
closed_conversations
participated_sessions
replies
}
}

Below are some examples of how CountsPerBrain can be called.

{
"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c, 99xx33p9-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2023-04-08",
"endDate": "2023-04-17"
}

Example Result:

note

All time-related return fields are in minutes

{
"data": {
"rows": [
{
"brain_parent_id": "a2wv9283-9b53-4d7b-b77d-2650f3a1a99c",
"containment": 0.921,
"coverage": 1,
"avg_confidence": 0.951,
"median_confidence": 1,
"avg_response_time": 0.002290511,
"avg_first_response_time": 0.0033838984,
"median_response_time": 0.0019166666,
"median_first_response_time": 0.0029166667,
"max_response_time": 0.014166667,
"max_first_response_time": 0.014166667,
"min_response_time": 0.00053333334,
"min_first_response_time": 0.0007166667,
"avg_close_time": null,
"median_close_time": null,
"max_close_time": null,
"min_close_time": null,
"ratings": 0,
"avg_rating": null,
"ratings_more_than_3": 0,
"closed_conversations": 0,
"participated_sessions": 63,
"replies": 1600
},
{
"brain_parent_id": "99xx33p9-dfab-44e5-9303-9b2bf13f1c94",
"containment": 1,
"coverage": 0.76,
"avg_confidence": 0.743,
"median_confidence": 0.734,
"avg_response_time": 0.002875,
"avg_first_response_time": 0.002875,
"median_response_time": 0.0013083334,
"median_first_response_time": 0.002875,
"max_response_time": 0.0076666665,
"max_first_response_time": 0.003875,
"min_response_time": 0.0012166667,
"min_first_response_time": 0.0012166667,
"avg_close_time": 0.0012166667,
"median_close_time": 0.0012166667,
"max_close_time": 0.12166667,
"min_close_time": 00012166667,
"ratings": 0,
"avg_rating": 4.4,
"ratings_more_than_3": 0.8,
"closed_conversations": 10,
"participated_sessions": 200,
"replies": 842
}
]
}
}