Model and Inference EngineeringPost-training and alignmentPrincipal
How would you verify that a reward score covers an entire answer when evaluator inputs are truncated?
By Amit Kumar2 min readWorked answer includedReviewed 28 Sept 2026
The question
Interview question
A policy generates long answers that earn high safety scores, but reviewers find unsafe content near their ends. The reward model accepts only 1,024 input tokens. Trace exactly what it scored, design cutoff-sensitive tests, and compare generation limits, longer evaluation and segmentation without assuming the policy deliberately exploited the cutoff.
Draft your approach first
Take a few minutes before you read the answer. Name the constraint that matters most, the failure you are designing for and how you would know it worked.
Reveal the worked answerWorked answer
First inspect how the prompt and answer are assembled and which end the tokenizer truncates. A classifier scores only the tokens it receives. If the tail never reaches it, a high score cannot certify that tail. Truncating from the other side may drop the user request instead. Either way, the score has a narrower meaning than the dashboard claims. Transformers' truncation documentation describes the max_length behavior, but the actual training code decides how prompt and response are concatenated and which side is kept.
Suppose, hypothetically, the serialized reward input uses 200 prompt tokens and 24 formatting tokens before a 1,024-token combined cap. At most 800 response tokens remain if the pipeline preserves that prefix. A decisive instruction at response token 900 is outside the score’s visible input. Truncating the prompt instead changes what question the grader thinks it is judging. These counts illustrate one assembly rule, not a property of every tokenizer or reward model.
I would log lengths and the effective visible span for reward scoring, without exposing sensitive answer text in routine telemetry. For a small audited sample, put a decisive safety violation or factual correction just before and just after the cutoff. Compare the actual serialized input tokens. If editing the tail leaves those tokens unchanged, the evaluator could not see that edit. An unchanged score when the input did change instead calls for a separate investigation of the judge’s behavior. Compare complete-answer human labels and a longer-context or segmented evaluator. Also check whether the reward model's own training pairs had the same length policy. A different truncation rule at reward-training and RL-scoring time creates another mismatch.
Then choose a policy that matches the task. You might cap generation at a length the reward model can fully inspect, use a reward model that covers the whole response, or combine a full-answer safety check with the quality reward. For longer outputs, segment-level checks need to preserve context and cannot simply average reassuring chunks. Measure whether the fix changes both reward and real task outcomes. Do not declare success because the average score fell after the grader finally saw previously hidden mistakes.
Could the policy learn to place bad material after the cutoff? It could, especially under repeated optimization, but that requires evidence here. The immediate proven failure is simpler: the score did not cover the complete answer. The reward model prefers longer answers. Did humans prefer length or correctness? studies reward models preferring length. This is a visibility boundary in the reward input, even if the reward model's judgments on visible text are otherwise sound.
Related questions
Keep practising model and inference engineering
Follow another question in this area, or search the complete library.
Get my essays on AI engineering and distributed systems by email. Subscribe to ArchCrux