TECHNOLOGY

Left and right truncation remove different evidence from a causal prompt

In this article
THE QUICK TAKE

Truncation is a content-selection policy: keeping a prefix or suffix changes the evidence available, and structured message boundaries must be preserved deliberately.

When an input exceeds a model’s context budget, cutting tokens makes it fit mechanically but changes the problem. Left truncation keeps later material, while right truncation keeps earlier material under the tokenizer’s policy. Neither operation knows which evidence the application actually needs unless a separate content-selection rule supplies that judgment.

Prefix and suffix retention discard different facts

Imagine a long report that states a question at the beginning and a revised result at the end. Keeping only the prefix can discard the revision; keeping only the suffix can discard the question or original definitions. A causal model cannot condition on text that was removed before inference. This is not necessarily a failure of its long-context reasoning. Diagnose the actual supplied input before attributing an incorrect answer to the model. A content ledger should show which passages survived and which were omitted.

Token budgets are not character budgets

The tokenizer defines model input length, while characters and bytes use different units. Template markers and inserted special tokens also consume positions under the actual encoding. Count the final intended representation rather than assuming a rough character estimate establishes compliance. Reserving room for output is a separate application decision, subject to the model and serving interface’s limits. A count computed before adding a chat template can underestimate the final sequence. Preserve both the rendered form and identifiers when inspecting a boundary case.

Structured messages need a structural policy

Blindly slicing a serialized conversation can remove role boundaries, an opening instruction or part of a tool-result structure. A tokenizer’s truncation side does not automatically preserve application authority or coherent message pairs. The application may choose to remove whole turns, select evidence or summarize under an explicit rule before serialization. Each approach has different information loss. A summary is a generated representation that can omit or alter details; it should not be treated as exact preservation of every removed token or its original provenance.

Test the final input rather than the original document

Build a small example with distinctive facts near both ends and inspect the actual post-truncation identifiers and decoded content. Check that necessary task instructions and format boundaries remain under the chosen policy. Evaluate the application on these transformed inputs, not only on their longer originals. Record truncation side, length limit and content-selection rule with results. This makes an input-budget decision reviewable and prevents an apparently valid context length from being mistaken for a guarantee that the model received all evidence required to answer correctly.

Primary research and implementation references

Reproducible inference stacks: preserving a GPU pilot’s result; A GPU inference benchmark you can trust.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles