Token Efficiency Encyclopedia

Signal-per-Token Optimization

Measure and maximize the ratio of useful context to total tokens sent to the model. The goal is not a larger context window but a higher density of relevant information per token.

How It Works

Instead of treating context size as the metric to optimize, teams measure how much of the prompt actually helps the assistant produce correct, reviewable, policy-aligned output. Every unnecessary token consumes compute, adds latency, and can dilute the model's attention. Every missing piece of context increases the odds of near-miss code that requires rework.

Techniques

Curated Context

Load only the files, sections, and metadata relevant to the current task. Avoid sending full directories or unrelated modules.

Structured Over Raw

Provide architecture diagrams, dependency maps, API contracts, and ownership metadata in structured form rather than expecting the model to infer them from raw code.

Governance Filters

Remove outdated documentation, deprecated APIs, and internal-only references that do not apply to the current change.

Task-Specific Subsetting

Tailor the context to the task type: a refactoring task needs different context than a bug investigation or test generation.

Measurement

Anti-patterns

See Also

Tools