Skip to content

Test the Task, Not the Demo: Evaluating Domain Models Where It Hurts

#evaluation #tabular-transformers #time-series-reasoning #prompt-augmentation #cost-sensitive-learning

Test the task, not the demo ​

The demo passes and the meaning still breaks ​

Three sentences: "We can hold Room 204 until Friday. The budget is $250. Do not book it unless Maya approves."

Push that through a rewriter asked for a more formal tone. A fluent, plausible output: "Room 204 is booked for Friday within the $250 budget, pending Maya's approval." Every literal survives. 204, 250, Friday, Maya. A substring check passes. The message now reports a booking the source explicitly said should not happen.

I keep running into this shape of failure. A fraud model emits a well-calibrated probability and the decline threshold gets set once, globally, across purchases that differ in size by three orders of magnitude. A time series model answers a question about why a stock moved and never looks at the timestamp. A synthetic-user pipeline generates training dialogues in 85 languages that all sound like the same person.

Four papers landed in the same week and each one is about the same thing. The model is usually fine. The evaluation is pointed at something adjacent to what the business cares about, and fixing the evaluation is cheaper than retraining.

Decision-focused fine-tuning puts the cost matrix inside the loss ​

Start with the tabular case because the money is visible there. Tokenize an event stream, train an autoregressive transformer over it, read fraud probability off a softmax restricted to the label tokens. That softmax is already a distribution over actions: approve or decline It does not need a second head bolted on.

The standard bridge from probability to action is post-hoc Bayes-optimal thresholding. Calibrate the scores, supply a cost matrix, pick the cutoff that maximizes expected utility. It's clean, it's auditable, and it hides a real problem.

A missed fraud on a $4,000 transfer and a wrongly declined $4 coffee are not the same error. A single global threshold tuned on the average case treats them as if they were. Institutions know this, which is why the cost matrix in practice gets sliced by amount bucket, which is a hand-built approximation of a function the model could learn.

The paper fine-tunes the pretrained model so the restricted softmax itself maximizes expected utility under an institution-specified, amount-scaled cost matrix. The reward is a known function of action, outcome, and amount, and the outcome is in the data. So the objective and its gradient are closed form. This is example-dependent cost-sensitive learning where the per-example loss is linear in the predicted probability. No sampling. No critic. No advantage estimation.

Two anchors keep it from eating itself. A KL term back to the pretrained model and an auxiliary language-modeling loss preserve calibration and the generative event model. Strip those out and you get a model that makes sharp decisions on the event types it saw during fine-tuning and cannot score a new one. The KL anchor is doing more work than the loss function.

DimensionPost-hoc thresholdingDecision-focused fine-tuning
Where the cost matrix entersAt inference, as a cutoffIn the loss, per example
Cost resolutionOne threshold per bucketAmount-scaled, per example
Calibration after tuningPreserved by constructionNeeds the KL anchor and LM term
GradientNone, no training involvedClosed form, no sampling or critic
Failure modeThreshold drifts as base rates moveLoses calibration if anchors are weak

The practical difference: the threshold approach gives you a probability you can defend to a model risk committee and a decision you have to re-tune quarterly. The fine-tuning approach gives you a decision baked into the weights plus a calibration you have to actively protect. Pick based on whether your reviewers need the probability or the decision.

Quick Take: in all four of these papers, the interesting result comes from scoring the part of the task the demo skips, not from the model getting better.

Timestamps are indices, and nobody checks them ​

The time series paper starts from an uncomfortable observation about how the benchmarks are built. Models usually receive events in chronological order and already matched to the time series. So when the model gets the answer right, you can't tell whether it used the timestamps to connect events to observations or just took a shortcut.

The reframing is precise: treat timestamps as explicit indices that connect numerical observations and external events to shared world states. From that angle, three structures become testable. Temporal causal structure. Time semantics, meaning what a date tells you about the world. Event-series alignment, meaning which observation a given event is supposed to explain.

The diagnostic protocol runs 310 questions across two tasks with controlled interventions. Replace the timestamps with relative offsets. Remove them. Break the alignment between events and series.

Results:

  • Accuracy stays high when timestamps are replaced by relative offsets or removed entirely.
  • Breaking event-series alignment produces systematic failures.
  • With pre-aligned context, models barely use timestamps at all.
  • Without ordering, models use dates to recall world knowledge.
  • Without dates, models fall back on correlational shortcuts and rarely notice incorrect timestamps.

310 questions is small enough that a two-person team can run the whole protocol in an afternoon. That's the point. It's a diagnostic, not a leaderboard.

If your retrieval pipeline pre-aligns news articles to price windows before the model ever sees them, your benchmark measures reading comprehension. It says nothing about time series reasoning, and it will keep saying nothing right up until the model meets a live feed.

Where literal checks stop and a rubric has to begin ​

The writing API comparison makes the same argument at a smaller scale, and the fixtures are better for it. "Make this message better" is not one task. It's a spelling fix, a tone change, a compression, or a clarification, and each needs its own definition of what may change and what must survive.

TaskAllowed changesRequired preservation
Grammar correctionSpelling, grammar, punctuationFacts, conditions, intended meaning
Formal toneWording and sentence structureSame facts and level of commitment
ShorteningSelected compressionExplicitly specified essential information

The third row is a separate experiment. Fold shortening into the tone task and you can no longer explain why a condition vanished. Model behavior, prompt framing, or the request to compress all produce the same symptom.

The mechanical layer is cheap and you should have it:

javascript
function missingLiterals(output, required) {
  return required.filter(value => !output.includes(value));
}

Run that against 204, $250, and Friday and it catches a dropped amount. It will not catch the booking that became confirmed. A sentence can preserve every literal and still invert the commitment.

My rule now: mechanical checks are early warnings, not verdicts. A missing not, unless, or until is a cheap flag worth raising, and it still cannot tell you whether the negation kept its scope. Scope belongs to a human rubric with separately scored dimensions for commitment strength, uncertainty, conditions, grammatical quality, and tone. Score them independently. A polished sentence that changes intent should not earn a high overall score by averaging its fluency against its accuracy.

The other discipline point from that piece is easier to skip and harder to recover from. Collect repeated outputs per fixture. Predeclare your review size before you see comparative scores. Hold out cases. Record the browser version, the API options, the language, and whatever model information the interface actually exposes, and don't invent a version when the interface doesn't give you one.

What the community is saying ​

I took the harness apart and rebuilt the parts I'd have gotten wrong.

The first thing I changed was one generation per fixture. A single dropped "unless" is indistinguishable from sampling variance, and I had been reading it as an API weakness. Feeding the same fixture through the same endpoint repeatedly separated the two, and the variance was larger than the effect I was trying to measure. Violations per attempt beats a pass rate.

Then a compatibility bug surfaced. My adapter made a non-English call, the session rejected, and the rejection resolved into an undefined that my truthiness guard quietly accepted. The guard passed for the wrong reason. A rejected promise and a resolved undefined are different outcomes and deserve different assertions, so I now record {ok, value, errorName} before any boolean check touches the result.

The third thing was scoping. My rubric scores drifted because I was scoring "is this sentence better" instead of scoring "did the commitment change." Those are different questions and only the second one is cheap to answer consistently across reviewers.

On LLM judges, the thread landed where I'd land. A judge can triage high volume after literal and structural checks, and only if it's calibrated on held-out, human-scored examples sliced by failure type: negation, approval conditions, commitment strength. Track missed meaning changes in those slices, not overall agreement. Otherwise the judge rewards fluent drift exactly like the editor does, and you've automated the failure you were trying to catch.

Personas are a control knob, not a garnish ​

The persona pipeline exists because out-of-the-box models write flat synthetic users. Ask a model to generate a user prompt and you get the same polite, monolingual, evenly-worded request every time. Real users compress, typo, hedge, switch languages mid-thread, and state requirements in the wrong order.

The interesting design decision is representation. Free-text persona descriptions produce style variation you can't steer. A structured, attribute-based representation gives you per-axis control. You can dial formality without dialing verbosity, which sounds small until you need to isolate why a fine-tune changed behavior.

Key Numbers740,000 structured synthetic personas with background and communication attributes. 1.24 million persona-styled conversations generated from them. 85 languages represented in the corpus. Comparable performance to original training data on capability benchmarks, preferred on real user prompts at equal reply length.

That last line is the one I'd put in a review deck. Beating the original data on capability benchmarks would be suspicious. Matching them while being preferred on real prompts at equal reply length is the result you want, because it means the augmentation added style without spending accuracy. A human expert evaluation on intent preservation, naturalness, and multilingual authenticity backfills what the automated metrics can't see.

85 languages is the number that changes deployment math. Persona augmentation stops being an English-only trick. Combined with per-axis control, it becomes a tool for testing assistant persona control through training data, which is a different job than generating more of it.

Proverbs as a prior you didn't choose ​

Nearly 50,000 English proverbs, mapped with LLMs validated against human judgments, scored for topical coverage and prescriptive force. It reads like a curiosity. It's a template.

Most proverbs are prescriptive, and the prescriptions cluster in domains under individual control: preparation, prudent action, watching your mouth. Proverbs about fate and mortality mostly describe rather than prescribe. That's a coherent result, and it falls out of the data rather than the prompt.

Where prescriptive proverbs take a consistent stance, they favor caution over risk, long-term over short-term, honesty over deception, kindness over malice, with a moderate tilt toward suspicion over trust. Where the trade-off is genuine, especially autonomy versus compliance, they contradict each other.

Two takeaways for anyone building a domain model. First, this is what a corpus-level evaluation of judgment looks like: not one output scored, but a distribution of stances extracted and checked against human raters. Second, if your training corpus is advice-shaped, you've already installed a caution prior and a suspicion prior. Neither shows up in a perplexity number.

Scale isn't the variable that predicts whether a study found something. The 310-question timestamp diagnostic produced a sharper conclusion than the 1.24-million-conversation corpus. What separates them is whether the evaluation had a control that could fail.

Common pitfalls ​

A literal-substring check passes fluent reversals. Build the required-literal check, then build the rubric, and don't let the first one sign off on the second one's job.

Post-hoc thresholding gets tuned on the rows you report on. If the cutoff is chosen on the same data that produces your reported decline rate, the number is optimistic. Hold out rows, and re-check the threshold when base rates move.

Pre-aligned inputs make timestamp reasoning look solved. If your pipeline hands the model events already matched to observations in order, accuracy tells you almost nothing. Break the alignment on purpose and see what happens before you trust the model on a live feed.

One generation per fixture cannot separate an API from sampling noise. Repeat every fixture and report violations per attempt. Otherwise a single dropped negation looks like a property of the endpoint.

Augmented training data gets validated on style only. Intent preservation and capability benchmarks are separate measurements. A corpus that reads more naturally and quietly drifts on task accuracy is worse than no augmentation, because you'll ship it.

One thing to remember ​

Every one of these four studies earned its result by adding a control that could fail: an amount-scaled cost matrix that makes a $4 error and a $4,000 error numerically different, an alignment break that makes a timestamp shortcut visible, a preservation rubric that scores commitment separately from fluency, a capability benchmark that a style-only fine-tune would have quietly degraded. If your evaluation has no way to tell you that the model is wrong for an interesting reason, it's a demo with a number attached.

The bottom line ​

If you're shipping a fraud or credit model with asymmetric, amount-dependent costs, fine-tune against the cost matrix and keep the KL anchor. Post-hoc thresholding flattens a distribution of costs into one cutoff, and the re-tuning burden lands on whoever owns the model in production.

If you're evaluating a writing, proofreading, or rewriting API, build the fixture harness and a blinded human rubric before you build the demo. Twenty-five fixtures with repeated runs and a predeclared scoring plan will tell you more than any single-pass comparison, and the literal check alone will pass a message that says the opposite of its input.

One thing to watch: LLM judges are moving into these harnesses as triage. Expect the credible reports over the next two quarters to publish per-slice judge disagreement on negation and approval conditions instead of a single win percentage. A win percentage from an uncalibrated judge is the same fluent drift with better formatting.