prompting · reorder-context-by-relevance TEC-0018

Put important material first or last

Order retrieved documents so the most relevant sit at the start and end of the prompt.

Because recall is best at the edges of the context, rank retrieved passages by relevance and place the top ones first and last, weakest in the middle. Also truncate aggressively: fewer, better passages beat many.

Addresses: Losing information in long inputs

Contexts: Retrieval-augmented QA, Long document

Does it work?

contested1 supporting · 2 contesting sources · last moved 2026-09-07

Efficacy claims — what this technique actually moves, under which conditions, and whether that has been contested.

Needs: documents or an index to retrieve from

Cost: low

Fails when:

  • Which passage matters is not known before the model reads them, or the skew sits in the representation so that reordering does not remove it. This claim is contested on exactly that point. (helps)

Code

Sources

Either way, bring evidence: a link, or what you saw.

Whether a technique works is a claim. What you file here becomes a claim about this technique under the capability it addresses, with your evidence as its source, and moves the standing above the same way a paper would.