Triage decision workflow with Jev
Support triage is the workflow TypeSafe reaches for first: one ticket state, several atomic questions, code that routes. This page is the decision workflow slice of a full pack (contracts → thresholds → handoff → audit). Independent unofficial notes. Official sketches: quick start and intent routing. We do not sell keys.
Input contract (before the call)
Put only what the questions name:
{
"ticket": { "id": "T-1042", "body": "…", "channel": "email" },
"customer": { "plan": "pro", "open_incidents": 1 },
"policy": { "p1": "P1 = safety or complete outage" }
}
Point instructions at `ticket.body`. Drop CRM novels — jev-1.13 loses accuracy on distractors and you still pay input tokens (vendor price: $0.042 / MTok, confirm on models page).
One request, three primitives
Official quick-start mix:
| Id | Type | Job |
|---|---|---|
department |
Choice | billing / technical / sales / other |
frustration |
Score | calm → civil → strong language |
is_urgent |
Noul | time-sensitivity as P(yes) |
Optional fourth: Choice intent (order_status, product_question, return_exchange, complaint, other) if you also route handlers.
All of these share state and run in parallel. Do not ask Jev to write the reply.
Code owns the graph
def triage(resp):
dept = resp.answers["department"]
urgent = resp.answers["is_urgent"].noul
if dept.confidence < FLOOR: # tune — see thresholds page
return handoff("unclear_queue")
if dept.choice == "other":
return handoff("unmapped_queue")
if urgent >= URGENT_TAU and dept.choice == "technical":
return "page_oncall"
return f"queue:{dept.choice}"
Conjunctions (urgent and technical) stay in code.
Cascade when the taxonomy is deep
A 200-leaf product taxonomy should not be one Choice. TypeSafe’s hierarchical cookbook: Choice per node, greedy or beam, length-normalized path score.
Confidence abort: if confidence < ABORT at any node, stop and return the parent (or a human). That beats a confident wrong leaf.
Taxonomy tips:
- Every node includes
other. - Contrast siblings in
criteria. - Do not reuse a Noul τ on Choice confidence.
- Log node id + edge probabilities for audit (decision trace).
Pack map
| Slice | Page |
|---|---|
| This workflow | you are here |
| Floors and τ | confidence thresholds |
| Humans | handoff |
| Worked ticket | support triage |
What this page does not claim
No invented triage accuracy. Schema-safe ≠ correct. Not official TypeSafe.
Hub: Use cases. Official: docs.typesafe.ai.
Sources
Public TypeSafe or adjacent documentation only. No private claims.