The workflow

Ticket stateMessage and context
Choicebilling / technical / sales
ScoreUrgency level
Code gateRoute or escalate

Question shape

{
  "department": {
    "type": "choice",
    "criteria": {
      "billing": "Payments, invoices, refunds or subscriptions",
      "technical": "Bugs, APIs or integrations",
      "sales": "Plans, pricing or sales questions"
    }
  },
  "urgency": {
    "type": "score",
    "criteria": ["normal", "elevated", "urgent", "critical"]
  },
  "needs_human": {
    "type": "noul"
  }
}

Gate policy

≥ 0.90

Auto-route low-risk tickets.

0.65–0.90

Ask an agent to confirm.

< 0.65

Escalate to a human.

Pre-launch checks

  • Refunds, duplicate charges and account-access edge cases;
  • Colloquial language, typos and mixed-language text;
  • Prompt injection, irrelevant history and contradictions;
  • Stability when candidate order changes.
Keep exact work in code: amounts, dates, order state and permissions should be deterministic. Use the decision model for semantics and routing.