Support · basic

Détection de demande de remboursement

Identifier une demande de remboursement sans transformer la classification en autorisation.

choicenoul

Quand l’utiliser

  • Support triage
  • Billing queues
  • Refund review intake

Exemple de state

{
  "latest_message": "I was charged twice for order A-1042. Please reverse one charge.",
  "order_id": "A-1042",
  "settled_charges_count": 2,
  "previous_refund": false
}

Questions de décision

choiceprimary_request

What is the customer's primary request?

  • refund — Money back or reversing a charge
  • access — Account or login help
  • troubleshooting — Help with broken product behavior
  • cancel — Ending a subscription
  • other — None of the above
noulrefund_request_supported

Does the supplied message and order state support that the customer is asking for a refund or charge reversal?

Sortie attendue

A typed primary_request label plus a probability for whether the evidence supports a refund request.

TypeScript

import { choice, noul, TypeSafeClient } from "@typesafe-ai/sdk";

const client = new TypeSafeClient();

const result = await client.systemOne({
  state: {
    latest_message:
      "I was charged twice for order A-1042. Please reverse one charge.",
    order_id: "A-1042",
    settled_charges_count: 2,
    previous_refund: false,
  },
  questions: {
    primary_request: choice("What is the customer's primary request?", {
      refund: "Money back or reversing a charge",
      access: "Account or login help",
      troubleshooting: "Help with broken product behavior",
      cancel: "Ending a subscription",
      other: "None of the above",
    }),
    refund_request_supported: noul(
      "Does the supplied evidence support that the customer is asking for a refund or charge reversal?"
    ),
  },
});

console.log(result.answers);

Pourquoi ce modèle fonctionne

  • The classification space is closed and operationally useful.
  • The state separates what the customer said from order facts.
  • The extra Noul question preserves uncertainty instead of forcing every case into an action.

Limites

  • Detecting a refund request does not authorize a refund.
  • Actual refund eligibility should be checked by deterministic policy and payment records.

Source officielle

2026-09-21

Étape suivante: Jev PlaygroundModèles