Zenaique

Match the model class to the context engineering knob it most rewards

Match pairs·Medium·4.0 · 0·~2 min·Asked atAutodeskMidjourneyWeaviate
Attempt it

Drag each answer to line up with its matching prompt

Small fast model with 8k window

Account image tokens separately and place images near the relevant text

Frontier model with 200k window and prompt caching

Reserve a large output budget and avoid stuffing the input

Reasoning model that emits long internal traces

Head and tail layout for retrieved content; aggressive lost-in-the-middle mitigations

Open weight model with weak long context performance

Stable system prefix to maximise cache hit rate; generous dynamic slots

Vision capable model with images in context

Aggressive trimming and tight top-k; rerank is mandatory

TL;DR

Different model classes reward different context knobs: small windows want aggressive trimming, cached prefixes want stability, reasoning models want output reservation, weak long-context models want head and tail

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine packing for five different trips. A weekend carry-on (small window) means ruthless trimming, only essentials. A road trip with a passenger who has a magic suitcase that remembers your packing list (cached prefix) means stable layout to keep the magic working. A hike where you will write a long journal at the top (reasoning model) means leaving lots of paper blank for later. A drive where you tend to only remember the first and last hour (weak long-context) means putting the important stops at the start and end. A photo trip (vision model) means keeping camera notes right next to the photos. The packing rules are not universal. They depend on the trip.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Context engineering has rules but the rules are not universal. They depend on the model class you are targeting. A layout that exploits prompt caching on Claude Opus 4.7 is wasted on a small local 8k model; a layout that maximizes top-k on a small model would crowd out reasoning on an extended-thinking frontier model.

The practical discipline is to pick a model class first, then apply the dominant context knob for that class. Five classes cover most production fleets in 2026, and each has one knob that pays off more than the others.

This card walks through the five classes, the dominant knob each rewards, and the mixed-fleet pattern that holds them together.

Small fast model, tight window

Small models like Llama 3.1 8B, Qwen 3.5 Mini, and Gemma 4 typically ship with windows in the 8k-32k range. The dominant context constraint is raw space.

The layout discipline that pays off here is aggressive trimming and tight top-k.

  • Top-k 3-5 after rerank. The marginal chunk has no slack to be wrong.
  • Rerank is mandatory. A cross-encoder reranker (BGE Reranker v2, Cohere Rerank 3.5) pays for itself because the survivors get more weight per token.
  • System prompt minimalism. Strip every word that does not earn its keep. A 1.5k system prompt on a model with an 8k window is taxing 19% of capacity before you fetch anything.
  • No chain-of-thought stuffing. The model cannot afford long reasoning traces; keep tasks scoped.

Small windows reward discipline. Large windows reward stability.

Frontier with caching
Reasoning models and vision models
Weak long-context open-weight models and the mixed-fleet pattern
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • Anthropic's published Claude Opus 4.7 prompt-caching guide shows up to 90% input-cost reduction and 85% TTFT reduction for stable cached prefixes; the load-bearing optimization for that model class.
  • OpenAI's GPT-5.5 reasoning configuration recommends reserving output token budgets of 4k+ for non-trivial tasks; documented in the responses API guide.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow do you design a router that picks the model class first, then the context layout?
A

Use a small classifier or a rules table over task type and input size to pick the model class; load a per-class layout function that knows top-k, cache strategy, and output reservation.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Applying the same context layout across every model in your fleet. A layout tuned for Claude Opus 4.7 with caching is a poor layout for a small 8k local model and vice versa.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • What is the dominant context knob for each of five model classes?

  • Why does prompt caching reward prefix stability?

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Pick the most effective intervention when an agent's context grows by 8KB every iteration
MCQ·Medium