Part 2 · Making Rules Stick

Prompt Engineering · ~6 min

Top and Tail

Attention isn't uniform across a prompt. The middle is a trough. Put the one rule you can't afford to lose at both ends.

Why this, for you: you already pick a rule's altitude and polarity. Position is the third lever — and it's nearly free. The single most important constraint in a long prompt belongs in two places, not one. This is the cheapest reliability gain you can buy.

Transformer attention has a shape: strong at the start, strong at the end, weak in the middle. A critical instruction placed once, mid-prompt, sits in the lowest-attention trough on the curve. The fix is structural, not editorial.

1 Two biases at opposite ends

Two structural biases sit at the edges of every context window:

Liu et al. measured a 30%+ accuracy drop when relevant information moved to the middle of a long context (Lost in the Middle, 2023). Place a critical rule at both ends and it lands in both high-attention zones.

2 How to apply it

State the critical rule immediately — before background, before role-setting prose — and restate it at the end:

CRITICAL: Do not read, write, or delete any file outside /workspace. You are a code-generation assistant. Implement features by editing files. # …ordinary rules, background, tool notes — each stated once… --- CRITICAL (restated): Do not touch any path outside /workspace — not /etc, /home, /tmp, or anything else.

The opening line takes the primacy slot; the closing restatement takes recency. The other rules — important but not catastrophic if missed — appear only once. In a long conversation, restate the constraint at the end of your latest message, once context has grown.

3 Reserve it for the few that matter

Repetition is a priority signal. If you repeat everything, you signal nothing — and you burn context: a 20-token rule stated twice costs 40. Repeat a rule only when all three hold:

AskRepeat if…
Consequenceforgetting it causes a security, safety, or correctness failure
Typeit's a hard constraint, not a preference
Contextthe window is long/dense enough for middle-decay to bite

Reasoning models blunt the effect

Models with long thinking phases internally restate instructions, which reduces positional bias — but doesn't erase it. Liao et al. found long chain-of-thought models still show a position effect: the first reasoning step disproportionately shapes the answer (Lost at the Beginning of Reasoning, 2025). Repetition does no harm; it just yields less on reasoning models than on standard ones.

Don't let the two copies drift

If the opening and closing versions differ enough to imply different behaviour, the model may read them as conflicting constraints rather than one reinforced rule. And in a 200-token prompt there's no middle to avoid — repetition there just adds noise. Keep them identical in intent; reserve the technique for prompts long enough to have a trough.

↪ Your win: front and back, for the few rules that matter

Retrieval practice — recall, don't peek

Question 1The lowest-attention region of a long prompt is…

Question 2To exploit both primacy and recency, place a critical rule…

Question 3Repeating every rule, not just the critical one, mainly…

Question 4On reasoning models with long thinking phases, repetition…

Question 5 · spaced recall from Lesson 2The safer default polarity for most instructions is…

Ask me anything. Want the front-and-back skeleton dropped into your system prompt, or guidance on which one rule in your set actually earns repetition? Next in Part 2: The Ceiling — why more rules buy you less compliance.
✎ Feedback