Support ticket triage
Support triage asks three things of the same text: the right queue, the severity, and the flags that need a human now.
Three capabilities answer them: classify routes, rate prioritises, and yes-no raises flags. The calls are independent, so run them at the same time.
No API key is required during the launch period.
The ticket
Every single-ticket response on this page comes from this text.
Route it with classify
Describe each queue. The API sends each label to the model as name: description. A bare name like shipping scores worse than a sentence about the case.
label names the queue. confidence near 1 means one label won clearly. Route on confidence, not on probability alone.
Prioritise it with rate
A scale is a list of level descriptions, ordered low to high. Use 2 to 10 levels. Write what each level looks like, never a number.
Read this result honestly. level is 2 by a margin of 0.006, and score 2.497 sits almost exactly between levels 2 and 3. confidence 0.5 reports that split. Sort your queue on score. It keeps the disagreement. Use level only as a label in the UI.
score is a weighted position. It is Σ p_i · i over the levels, so it ranges from 0 to scale.length - 1. A ticket at 2.497 outranks one at 2.05 even though both report level 2.
Flag it with a yes-no batch
Send the flags as statements. All of them go into one inference call, so three flags take about the time of one.
The cancel flag scores 0.353. That is a false answer with real doubt behind it. Hand this case to a person.
All three calls together
Fire the three requests concurrently. Each one takes about 1 second, so the whole triage finishes in about the time of the slowest call.
Turn the numbers into an action
Pick a threshold per action, not one threshold for the whole system. Auto-routing a ticket is cheap to undo; paging an on-call engineer is not.
Tune these numbers against your own tickets. Golden sets and Tuning thresholds show the method.
Triage a backlog
Every capability accepts texts for up to 32 items. The response is {"results": [...]} in input order. The second ticket below reads: “I was charged twice for my subscription this month and support has not replied.”
Each text in a texts batch is a separate inference call, so 32 tickets cost 32 calls of work. A batch of statements on one text stays one call, as batching explains.
Pitfalls
Hint text that names the verdict
On yes-no, when_true and when_false must describe the case. The wording when_true: "yes" flipped a measured answer from true at probability 1 to false at probability 0.004. Write the case, not the verdict.
Numbers in a rate scale
A scale of ["1", "2", "3", "4"] gives the model nothing to read. Write the level, for example “A blocked customer with a deadline”.
Long ticket threads
Text over 2,000 characters is chunked, and a label’s score is its maximum over the chunks. A complaint in the last message still scores high. Trim quoted signatures first, and read long text and chunking before you send threads.
Retries
A 529 overloaded response means every inference slot stayed busy. Retry with backoff, and match the other codes in the error reference.