LIVE · Thursday 3 December

Fine-Tuning Decision Models on Your Own Data: Fine-Tuning Best Practices, Data Leakage Checks and Evaluations

Fine-tune a decision model only after a held-out test shows that rules, a ready-made model and a prompted LLM all miss your bar. Here is how to build the data, block leakage and run the comparison.

By Thomas10 min read

Fine-tuning a decision model on your own data is worth doing only after a held-out test on your own cases shows a behavior gap that rules, retrieval and a well-prompted model cannot close. Before training, build reviewed examples that contain only the information available at decision time. Keep historical choices, expert labels and later outcomes in separate fields, and split the data by customer and by time. Then compare every option on the same untouched test set, measuring error cost, calibration, deferral, latency and operating cost separately.

A decision model picks one option from a list that your code supplies

A decision model is narrower than a chat model. It receives the state of a case, a question and a list of allowed options, and it returns a probability for each option. open-jev is an MIT-licensed SDK that Parsec publishes. Its documentation says that the model "picks one option from a list your code supplies," reports a calibrated confidence, and defers when it is unsure. It does not write free text.

That narrow contract changes how fine-tuning works. The training target is a choice among known options, not a paragraph. OpenAI's supervised fine-tuning guide lists classification among the tasks that fine-tuning suits. Its accuracy guide draws the line that matters here. Context work such as retrieval "maximizes response accuracy," while fine-tuning "maximizes consistency of behavior."

Fine-tuning fixes consistent behavior, so other options come first

Most decision problems can be solved without training a model. OpenAI's accuracy guide says that "prompt engineering is typically the best place to start." It adds that the best output of that stage is a good prompt plus "an evaluation set of questions and ground truth answers." The supervised fine-tuning guide is blunter: "Only invest in fine-tuning after setting up evals." The same guide says that OpenAI is winding down its fine-tuning platform. The platform is closed to new users, and eligible existing customers can create training jobs only until January 6, 2027. Its advice on data and evaluation still applies to training on open weights.

The table matches six approaches to the situations that they fit. Each row is a starting recommendation to test, not a guaranteed winner.

Approach Fits when Main weakness
Written rules Conditions are stable and can be listed Upkeep grows as exceptions pile up
Ready-made decision model Options are listed and volume is high Accuracy on your cases is unknown until tested
Prompted LLM Volume is low or options change often Per-call token cost and uncalibrated scores
Retrieval of current policy The right answer depends on policies that change Retrieval misses become decision errors
Conventional predictive model Inputs are structured records and the target is numeric Needs feature work and does not read free text
Fine-tuned decision model A measured gap remains after the options above Needs reviewed labels, retraining and monitoring

Retrieval and fine-tuning solve different problems. If a refund limit changes every quarter, putting the limit in model weights means retraining each quarter. Putting the current policy in the state means only the document changes. OpenAI's guide makes the same point in general terms, saying that retrieval gives "the model access to domain-specific context to solve a task."

The label that you train on decides what the model learns

A training row for a decision model needs five things: the state that was available at decision time, the question, the allowed options, the desired option and the policy version in force. A reviewed row for a support-routing decision might look like the following illustrative example.

{
  "decision_id": "t00412:team",
  "customer_id": "c0173",
  "decided_at": "2026-09-14T10:02:00Z",
  "policy_version": "routing-v3",
  "state": {"message": "Charged twice for order 55120 and the parcel is late."},
  "question": "Which team should handle this ticket?",
  "options": ["billing", "shipping", "returns", "account", "technical"],
  "historical_choice": "shipping",
  "expert_label": "billing",
  "outcome_after_7_days": {"reopened": true, "resolution_hours": 51}
}

The three answer fields are different targets. The historical choice records what an agent did. The expert label records what a reviewer says should have been done under routing-v3. The outcome records what happened afterward. Only the expert label belongs in the training target for a model that is meant to apply policy.

Training on historical choices teaches the model to copy past behavior, including its mistakes. Supervised fine-tuning learns from demonstrated outputs, so it reproduces whatever the labels show. A model that matches nearly all past choices has shown that it agrees with history. It has not shown that those choices reduced resolution time or refunds. Proving a business benefit needs outcome data and, where the stakes justify it, a controlled experiment.

The outcome must never appear in the state. A reopened ticket is known only seven days later. scikit-learn's guide to common pitfalls defines data leakage as information "that would not be available at prediction time" being used to build the model. It warns that leakage produces "overly optimistic performance estimates."

Label review is part of the work, not an extra. OpenAI's fine-tuning best practices say that inconsistent labels cap performance: "if people only agreed on 70% of extracted snippets, the model would likely not be able to do better than this." Have two reviewers label a sample, measure how often they agree, and fix the policy wording where they disagree.

Leakage checks must run before any training starts

A decision dataset leaks in predictable ways, and each one inflates test scores. The following checks block the common causes.

  1. Splitting by customer or conversation keeps one customer's near-identical tickets out of both train and test. The scikit-learn cross-validation guide says that GroupKFold "ensures that the same group is not represented in both testing and training sets."
  2. Splitting by time tests the model on later cases than it trained on. scikit-learn warns that shuffling time-ordered data gives "an inflated validation score."
  3. Removing duplicate inputs stops the same text from being scored in both sets.
  4. Excluding future information from the state keeps outcomes, later notes and final resolutions out of the input.
  5. Fitting every preprocessing step on training data only prevents test statistics from shaping the model. scikit-learn's rule is "never call fit on the test data."
  6. Keeping an untouched final test set separate from the validation set stops tuning from leaking into the score. scikit-learn notes that tuning against the test set lets knowledge "leak" into the model.

A calibration split is worth adding for decision models. scikit-learn's calibration guide says that the calibrator should ideally be fitted on data independent of the training data. Otherwise the probabilities come out closer to 0 and 1 than they should.

open-jev 0.5.0 runs the whole recipe, with three architectures to choose from

The open-jev SDK, installed as the openjev-sdk package, implements this data contract directly. Version 0.5.0 was released on November 2, 2026, and its package metadata marks it as alpha. Pin it with pip install openjev-sdk==0.5.0 and read the guides at commit 8f2ced8. Each row is built through a DecisionSpec, and each decision kind carries a version that you bump when its option list changes. The SDK's build_dataset step drops duplicate inputs and splits by group into train, validation, calibration and test sets. Its guides do not mention a time-based split, so filter by date before building the dataset.

The first cookbook builds a routing dataset from a CSV with the columns ticket_id, customer_id, message, team and priority. It uses these lines, where group_id keeps each customer in one split:

SPEC = DecisionSpec('ticket-routing', [
    Kind('team', 'Which team should handle this ticket?', options(TEAMS), version='1'),
])
SPEC.decision(f"{ticket_id}:team", 'team', {'message': message},
              choice=team, group_id=customer_id)

In your own data, the team column should hold the reviewed expert label rather than the logged historical choice.

The SDK offers three ways to train on the same dataset, and the choice depends on hardware and licence.

  • Training TOD with LoRA through --method tod continues training a rank-16 adapter on Gemma 4 12B. The guide asks for an NVIDIA GPU with 40 GB or more, such as an A100, H100, L40S or A6000, or a 64 GB Apple silicon Mac, which runs more slowly. Google's model page lists Gemma 4 12B under Apache 2.0.
  • Training small heads on a frozen model through --method head, the default, leaves Gemma 3 4B unchanged and trains a small head for each decision kind. It needs about 9 GB of GPU memory or any Apple silicon Mac. Gemma 3 4B is gated under Google's Gemma terms, which you must accept before downloading.
  • Fully tuning an encoder through --method encoder trains every weight of a Hugging Face model, by default ModernBERT-large. That model is Apache 2.0 with 395 million parameters, and the trained model serves on CPU.

The SDK separates three label sources in the way that the example row does. In the cookbook, choice= sets the target directly. The guide's taken= option labels a row from the logged action instead, and a logged action that is not among the options becomes NoneCorrect. An Episode carries the outcome for filtering rather than as an input. Free-text tool arguments stay outside the model. The guide describes its Candidate primitive in one line: "The model reads text; your code executes payload." The SDK also will not load a model that was trained on a different spec.

Parsec's TOD is one ready-made baseline with a published regression

TOD is the ready-made decision model behind the --method tod option. Parsec's TOD page describes it as a model that ranks the next action from a list of allowed actions and passes unconfident turns to a parent LLM. The page prices it at $0.30 per 1,000 decisions, separate from parent-model costs. On the public JevBench set of 231 decisions, the page reports 84.4% accuracy for TOD against 86.2% for the untrained base model, and says that the regression will be fixed in the next release. These are Parsec's own figures. Parsec's decision-models page says that it also tunes models on a customer's decisions, but it gives no price for that work.

The evaluation compares every option on the same decisions and keeps the metrics apart

No public comparison of rules, a ready-made decision model, a prompted LLM and a tuned model on the same decision set has been published. The numbers therefore have to come from your own test set. OpenAI's evaluation guide asks for tests that "reflect model capability in real-world distributions," including "typical cases, edge cases, and adversarial cases."

Run each candidate on identical decisions from the untouched test set, and record these measurements separately.

  1. Weighting errors by decision error cost shows what mistakes cost, because a missed fraud flag and a slow refund are not equal. OpenAI's accuracy guide shows the method, where 85% accuracy "could be ok" if the errors were cheap escalations.
  2. Checking calibration with a reliability curve shows whether 0.8 confidence means right about 80% of the time, which is scikit-learn's definition of a well-calibrated classifier.
  3. Measuring deferral coverage at each threshold shows the share of decisions handled and the accuracy on that share. The open-jev guide notes that higher thresholds mean fewer mistakes and more hand-offs.
  4. Tracking whole-task outcomes such as resolution time shows whether correct-looking decisions helped the business.
  5. Timing latency at p50 and p95 on your own hardware shows whether the model fits the request path.
  6. Adding up total operating cost includes model fees, GPUs, the parent model for deferred cases and labeling time. As one reference point, OpenAI's pricing page lists gpt-6-luna at $0.10 per million input tokens. One million decisions a month with 2,000 input tokens each would cost $200 in input tokens at that rate.

A shuffled-context control catches a model that ignores the state. The open-jev README pairs each test example with another example's context. If accuracy does not collapse, it says, the model is "reading option priors rather than the state."

Scoring an option does not resolve its arguments or grant permission to act

A decision model returns a probability for an option. It does not fill in the order number, the refund amount or the email text. Those arguments still have to come from the parent model, a lookup or a person. A high score also says nothing about whether the action is allowed for this user, account or amount.

That split defines the deployment gate. The following checks belong between the model's score and any action.

  1. Deferring below a per-kind threshold sends low-confidence cases to a person or a larger model, with the threshold chosen from the test results.
  2. Checking permissions in your own code decides whether the chosen action may run for this user, amount and account.
  3. Bumping the policy version on every option or policy change marks old models and old labels as out of date.
  4. Refitting calibration after any retraining keeps confidence scores meaningful, because the earlier fit no longer describes the new model.
  5. Monitoring live agreement, deferral rate and outcomes catches drift, using the continuous evaluation that OpenAI's evaluation guide recommends "on every change."
  6. Retraining on newly reviewed cases closes gaps, with a fresh untouched test set each time so that the comparison stays fair.

Sources

More in Models

All Models →