Hi all,
I'm trying to create a "Fallback escalation rate" for a chatbot. This rate would be calculated by users that hit the fallback intent, and then ask for an agent anytime after that, within a given session.
For context, when a user says something, we use an intent classifier to try and match it to an intent. If we can't match the user input to an intent, it hits our fallback intent. And if a user asks for an agent, it hits the followup_live_agent intent.
Each session contains multiple events, and each event represents one intent.
Today, we calculate "Escalation rate" by counting the sessions with at least one "followup_live_agent" intent. Here's the search query I created for that:
index=conversation sourcetype=cui-orchestration-log botId=123456
| eval AgentRequests=if(match(intent, "followup_live_agent"), 1, 0)
| stats sum(AgentRequests) as Totaled by sessionId
| eval Cohort=case(Totaled=0, "Cooperated", Totaled>=1, "Escalated")
| stats count by Cohort
| eventstats sum(count) as Total
| eval Agent_Request_Rate = round(count*100/Total,2)."%"
| fields - Total
| where Cohort="Escalated"
I need to know how to calculate this same thing, but only after the fallback intent is hit. I figure I need to retain the timestamp and do some calculation using that. I'm not even sure how to get started on this, so if anyone could point me in the right direction, that would be really helpful.
... View more