core practice · coding problem

Pack chunks into context budget

Budget 800 tokens. Chunks A=300,B=400,C=250 relevance [0.9,0.85,0.7]. Greedy pack by relevance until full. Which included?

The mechanism

Context is a budget. Models attend unevenly (lost-in-the-middle), so order matters: put the strongest evidence at the edges, dedupe, and cut before you overflow.

Study Context Packing

Expected evidence

A+B=700; C does not fit entirely — include partial or skip per policy.

Try this drill in the practice workspace →

Hints when you need them
  • Sort by relevance.
  • Leave room for instructions.

Watch for these mistakes

  • Filling the whole window because it is available
  • Ignoring position effects on attention

Check the sources

Browse all practice briefs