{
  "version": 1,
  "structures": [
    {
      "name": "refund_triage_response",
      "description": "对收到的退款请求进行分类",
      "example": {
        "intent": "refund_request",
        "reason_category": "damaged_item",
        "sentiment": "frustrated",
        "needs_manual_review": false
      },
      "schema": {
        "type": "object",
        "properties": {
          "intent": {
            "type": "string"
          },
          "reason_category": {
            "type": "string"
          },
          "sentiment": {
            "type": "string"
          },
          "needs_manual_review": {
            "type": "boolean"
          }
        },
        "required": [
          "intent",
          "reason_category",
          "needs_manual_review"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "refund_decision_response",
      "description": "退款资格判定与给客户的回复",
      "example": {
        "decision": "approve",
        "refund_amount_usd": 49.99,
        "explanation": "商品到货时已损坏，按政策第 3.2 条批准退款。",
        "customer_reply": "我们已批准将 49.99 美元全额退回到你的原支付方式。"
      },
      "schema": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "approve",
              "partial",
              "deny",
              "escalate"
            ]
          },
          "refund_amount_usd": {
            "type": "number"
          },
          "explanation": {
            "type": "string"
          },
          "customer_reply": {
            "type": "string"
          }
        },
        "required": [
          "decision",
          "explanation",
          "customer_reply"
        ],
        "additionalProperties": false
      }
    }
  ],
  "workflows": [
    {
      "name": "refund_triage_workflow",
      "description": "对退款请求进行分类，并启动判定流水线",
      "provider": "openai",
      "model": "gpt-5.6-terra",
      "backups": [
        {
          "provider": "anthropic",
          "model": "claude-haiku-4-5-20251001"
        }
      ],
      "request_type": "chat",
      "system_instructions": "对退款请求进行分类：识别意图、原因类别和客户情绪，并标记需要人工审核的案例。",
      "structure": "refund_triage_response",
      "customer_fields": [
        "customer_id",
        "order_id"
      ],
      "test_mode": false,
      "cache_window_seconds": 900,
      "backend_pipeline": {
        "enabled": true,
        "events": [
          {
            "name": "request_started"
          },
          {
            "name": "evaluate_refund",
            "target_workflow": "refund_decision_workflow"
          },
          {
            "name": "request_completed"
          }
        ]
      }
    },
    {
      "name": "refund_decision_workflow",
      "description": "评估退款资格并草拟给客户的回复",
      "provider": "anthropic",
      "model": "claude-haiku-4-5-20251001",
      "backups": [
        {
          "provider": "openai",
          "model": "gpt-5.6-terra"
        }
      ],
      "request_type": "chat",
      "system_instructions": "结合分类结果与订单详情套用退款政策，在批准/部分退款/拒绝/升级中做出决定，并撰写简明扼要的客户回复。",
      "structure": "refund_decision_response",
      "customer_fields": [
        "customer_id",
        "order_id"
      ],
      "test_mode": false
    }
  ]
}
