Skip to main content
A base model does well when the question is clear. To do better on your own traffic, give it examples whose answers you know. This page takes the quickstart’s team question through each step with the Python client. The TypeScript client has the same calls in camelCase (SDKs), and each step’s guide shows the HTTP request.

1. Build a dataset

Each row is a decide request, its context and decisions, plus targets: the answer you expect, as a probability for every outcome. Write one row per line of a JSONL file:
tickets.jsonl
Word each decision exactly as your application asks it. Some contexts are held out to measure models, and never train them (the split).
No labels yet? Teacher models can label real queries for you to review (review teacher labels). Build a dataset covers the format, rewards and the split.

2. Measure the base model

metrics has accuracy, log loss and calibration error on the held-out rows. An evaluation is charged as decisions (compare models).

3. Try clearer wording

Prompt tuning rewrites the question and the outcome descriptions, then tests the rewrite once on rows it never saw. It needs enough labelled rows for each outcome (limits).
Use the new wording only when the verdict is improved (tune the wording).

4. Train a model of your own

A fine-tune trains a model on your rows and starts a family, a named line of models such as support-router. The new model joins only if it passes its gate, a check for regressions against the model it started from on the held-out rows. A family needs enough training rows, and enough held-out decisions for the gate to judge (what the start checks).
The estimate is the exact fee, and a fine-tune is charged only if it succeeds (pricing). Calls to support-router get the family’s latest model that passed. Fine-tune a family shows how to read the gate.

5. Keep improving

Add newly labelled rows to the dataset as its next version, then continue the family. The next model trains from the latest one and joins only if it passes its gate too.
To go back, roll the family back to an earlier model, which discards the newer ones: client.families.rollback("support-router", "support-router@1", ["support-router@2"]). Families, models and datasets covers switching, keeping a model warm and deleting.