Skip to main content
This guide turns incoming support text into a small action vocabulary. The example returns a choice your application can map to a queue or next step; it does not send a reply to the customer.

Define the action vocabulary

Start with a small set of mutually exclusive actions:
Keep the values stable and machine-readable. Your user-facing labels can live in your application.

Send the request

cURL

Map the result

Read output.choice and map it to an internal action:
The API returns probabilities for every choice. Record them when you need to evaluate the classifier, but do not expose raw scores to end users unless that is part of your product design.

Add a fallback

Choose a policy before shipping:
  • Send low-confidence decisions to human review.
  • Add a needs_review choice if it is a real product outcome.
  • Retry only for transport failures or temporary 503 responses, not for a valid low-confidence result.
  • Keep the original input, decision ID, model, and request ID in your audit record when your privacy policy permits it.
Never silently route an unknown or missing choice to a destructive action. Validate the returned value against the choices you sent before executing side effects.

Evaluate before production

Build a test set from representative support requests and label the expected action. Track:
  • Accuracy by choice.
  • Low-confidence rate.
  • Confusion between similar choices.
  • The percentage routed to human review.
  • Changes after a model or catalog revision.