Shaping the Document, Not the Model: Optimized Suffixes for Context Following

Gia-Bao Dinh Ho, Sekh Mainul Islam, Masahiro Kaneko, Timothy Baldwin, Isabelle Augenstein
10/19/2026
cs.CL

No confident code implementation found for this paper.

Abstract

When a user supplies a document and wants the answer drawn from it, a language model is expected to follow it even when it contradicts its parametric knowledge. Prior work has focused on making the model rely on context by steering activations, contrasting logits during decoding, or instructing it in plain language.

Show full abstract

We ask whether the document alone, with no instruction written into it and no access to the model at inference time, is enough. We optimize a document suffix by discrete token search, starting from the answer to a single question and extending the objective to a set of passages, to multi-hop questions that follow from the planted fact, and to later turns of a conversation. On counterfactual passages that contradict parametric knowledge of the model, the suffix flips nearly all items the model resists across three instruction-tuned model families, in most settings outperforms the decoding baseline and the strongest instruction we could write, and matches activation steering. Controls show that the suffix largely acts through the passage rather than injecting the answer, and a single suffix per model transfers to unseen passages. Each extended objective carries the effect to its target, so the objective, not only the document, sets how far the effect reaches.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ho2026shaping,
  title  = {Shaping the Document, Not the Model: Optimized Suffixes for Context Following},
  author = {Gia-Bao Dinh Ho and Sekh Mainul Islam and Masahiro Kaneko and Timothy Baldwin and Isabelle Augenstein},
  year   = {2026},
  eprint = {2610.26236},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.26236v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.26236.svg)](https://codeofpaper.com/paper/2610.26236)

Discussion