← All posts

Question-last control at 704K: on the same ten documents, the 4B found the right passcode in 3 of 10, against 9 of 10 with the question first

E21o got 9 of 10 multikey needle trials right at about 710K tokens with the question stated before and after the document. Here I reran the exact same ten documents with the question only at the end. It passed 3 of 10. Question-first won all 6 pairs where the two prompts disagreed (McNemar exact p = 0.031), meeting the bar set before the run. Every question-last miss answered with a decoy code. This is a known prompting technique, measured here on my own setup.

ExperimentE21P
Date2026-10-29
BenchmarkRULER-style multikey needle: one target passcode sentence plus three decoy passcodes for other vault colors, in shuffled paragraphs from the MATH training set, about 706K to 713K tokens. Greedy decoding, 64-token answer limit. A run passes only if the first code in the answer is the target code.
ModelQwen3.5-4B, Q4_K_M GGUF, YaRN context extension x2.75 to 720,896 tokens, flash attention on, K and V cache at q4_0, ubatch 64
HardwareOne of my dedicated test rigs: RTX 3080 10 GB
VerdictPASS

What I tested

The same 10 saved documents, targets and depths as E21o (seeds 2300 to 2309, depths 10% to 90%), with the question stated only after the document. Compared pair by pair with the E21o question-first results. llama.cpp built with upstream PR 29827.

Pass bar, set before the run

Set before the run: question-first wins on the pairs where the two prompts disagree, McNemar exact test p below 0.1.

Result

TrialDepthPrompt tokensQuestion-first (E21o)Question-last (E21p)Peak VRAMTime
110%711,332passblue decoy (fail)9,868 MiB18.3 min
290%707,385passorange code (pass)9,856 MiB18.1 min
330%712,936passsilver decoy (fail)9,854 MiB18.3 min
470%712,989passyellow code (pass)9,839 MiB18.3 min
550%705,887passgreen decoy (fail)9,839 MiB17.9 min
615%706,711passblack decoy (fail)9,839 MiB17.9 min
785%708,226passorange code (pass)9,868 MiB18.1 min
840%711,424fail (black decoy)red decoy (fail)9,836 MiB18.1 min
960%706,848passpurple decoy (fail)9,836 MiB17.9 min
1020%708,082passsilver decoy (fail)9,846 MiB18.1 min
Total9 of 103 of 109,836 to 9,868 MiB

Pairs: 6 won by question-first only, 0 by question-last only, 3 both pass, 1 both fail (trial 8, 40% depth). McNemar exact two-sided p = 0.031.

Question-last only passed when the target sat late in the document (70%, 85%, 90% depth). Every miss returned one of the decoy codes.

The same pattern showed up at 512K in E21n (7 to 0, p = 0.016), so it holds across both context sizes I tested.

Shared (system) memory read 170 MiB in every run, the same as E21o. A separate measurement (E21q) is checking whether that is spill or driver overhead.

Ten pairs is a small sample, and both prompts are greedy single runs.

What happened

E21o showed question-first working at about 710K tokens, but without a same-document comparison it could not say how much of that came from the prompt. This round fed the model the identical ten documents with the question only at the end. Accuracy dropped from 9 of 10 to 3 of 10, and the model only got it right when the target passcode was near the end of the document. So at this context size, where the question sits matters far more than anything else I have measured so far, including the 4-bit cache (E21m). The memory saving that makes this context fit on a 10 GB card is upstream llama.cpp PR 29827, so credit goes to its authors.

How to rerun

powershell -ExecutionPolicy Bypass -File e21p_chain.ps1

Code

All code for E21P: e21p_chain.ps1, results.jsonl.

Prior work

No novelty claim. Stating the question before a long context is a known prompting technique; this is a paired control measurement of it on a standard RULER-style multikey needle test.

Written by Andrew Rose with help from AI tools. Every number comes from the run logs.

Questions or ideas? me@andrewroseit.com or @AndrewRoseIT.