Placers

Placers determine the final ordering of selected items in the context window. They are invoked during Stage 6: Place.

Placer Interface

A placer implements a single function:

Place(items: list of ScoredItem) -> list of ContextItem
  • items is the merged list of ScoredItem pairs — pinned items (with score 1.0) followed by sliced items (with their computed scores). See Stage 6: Place for the merge process.
  • The return value is the final ordered list of ContextItem instances.

Contract

  1. Reorder only. The placer MUST return the same items it receives, in a potentially different order. It MUST NOT add, remove, modify, or duplicate items.
  2. Deterministic. Given the same input, the placer MUST produce the same output order.
  3. Score-aware. The placer receives scores (via ScoredItem) and may use them to determine ordering. Pinned items have score 1.0.

Placer Summary

PlacerAlgorithmUse Case
ChronologicalPlacerStable sort ascending by timestampNatural conversation flow; preserves temporal ordering
UShapedPlacerHighest scores at edges, lowest in middleExploits LLM primacy + recency attention bias