{
  "$format": "thethinkloop.template/v1",
  "slug": "billing-escalation",
  "title": "Billing escalation",
  "decides": "Whether a billing issue should leave the support queue and go to finance.",
  "question": {
    "name": "decision",
    "type": "predicate",
    "instructions": "Should this billing issue be escalated to the finance team?"
  },
  "evidenceChecks": [
    {
      "name": "factor_1",
      "label": "Duplicate charge",
      "type": "predicate",
      "instructions": "The customer reports being charged more than once."
    },
    {
      "name": "factor_2",
      "label": "Legal or chargeback risk",
      "type": "predicate",
      "instructions": "The customer mentions a chargeback, bank dispute, or legal action."
    },
    {
      "name": "factor_3",
      "label": "Repeat contact",
      "type": "predicate",
      "instructions": "The customer has contacted us about this before."
    }
  ],
  "inputs": [
    {
      "name": "message",
      "type": "string",
      "required": true,
      "description": "The customer's message, verbatim. Include the subject line if there is one."
    },
    {
      "name": "disputed_amount",
      "type": "number",
      "required": false,
      "description": "The amount in question, if known from billing data."
    }
  ],
  "expectedOutput": "A probability from 0 to 1 that the issue should be escalated, plus one probability per evidence check.",
  "examples": [
    {
      "title": "Repeated contact with a threatened bank dispute",
      "input": "This is the third time I've written about invoice #2291. You charged us $4,800 twice and I still have no response. If this isn't fixed this week I'll dispute it with my bank.",
      "expected": "Yes"
    },
    {
      "title": "Routine invoice copy",
      "input": "Could you send me a copy of last month's invoice? Thanks!",
      "expected": "No"
    }
  ],
  "startingPolicy": {
    "automateAt": 0.8,
    "abstainBelow": 0.55,
    "note": "A starting point for exploration, not a recommendation. Calibrate against your own labeled examples."
  }
}
