{
  "$format": "thethinkloop.template/v1",
  "slug": "refund-eligibility",
  "title": "Refund eligibility",
  "decides": "Whether a refund request should be approved under your written refund policy.",
  "question": {
    "name": "decision",
    "type": "predicate",
    "instructions": "Should this refund request be approved under our 30-day refund policy?"
  },
  "evidenceChecks": [
    {
      "name": "factor_1",
      "label": "Duplicate charge",
      "type": "predicate",
      "instructions": "The customer reports being charged more than once."
    },
    {
      "name": "factor_2",
      "label": "Within refund window",
      "type": "predicate",
      "instructions": "The purchase was made within the 30-day refund window."
    },
    {
      "name": "factor_3",
      "label": "Prior refunds",
      "type": "predicate",
      "instructions": "The customer has received a previous refund."
    }
  ],
  "inputs": [
    {
      "name": "message",
      "type": "string",
      "required": true,
      "description": "The customer's message, verbatim. Include the subject line if there is one."
    },
    {
      "name": "purchase_date",
      "type": "string",
      "required": false,
      "description": "ISO date of the purchase. Prepend it to the input so the model doesn't have to infer it."
    },
    {
      "name": "prior_refund_count",
      "type": "number",
      "required": false,
      "description": "Refunds this customer has already received."
    }
  ],
  "expectedOutput": "A probability from 0 to 1 that the request should be approved, plus one probability per evidence check.",
  "examples": [
    {
      "title": "Duplicate charge, five days after purchase",
      "input": "I was charged twice for my annual plan (order #48213). I only signed up once, 5 days ago. Please refund the duplicate charge.",
      "expected": "Yes"
    },
    {
      "title": "Change of mind, seven months later",
      "input": "I bought the Pro plan 7 months ago and used it daily, but I no longer need it. Can I get my money back?",
      "expected": "No"
    }
  ],
  "startingPolicy": {
    "automateAt": 0.9,
    "abstainBelow": 0.6,
    "note": "A starting point for exploration, not a recommendation. Calibrate against your own labeled examples."
  }
}
