---
title: "Context Alignment · concept · Agentic Atlas"
description: "Context fits a task when it contributes, applies to its version and mode, and either agrees with other applicable claims or keeps the conflict explicit."
canonical: "https://agentic-atlas.dev/nodes/context-alignment"
last-updated: "2026-10-20"
---

1. [Agentic Atlas](https://agentic-atlas.dev/)
2. [Patterns in the Agentic Atlas](https://agentic-atlas.dev/atlas)
3. [Context Efficiency](https://agentic-atlas.dev/nodes/context-efficiency)
4. Context Alignment
1. concept
   # Context Alignment
   **What makes context fit the task an agent is working on?**
   Context fits a task when it contributes, applies to its version and mode, and either agrees with other applicable claims or keeps the conflict explicit.
   Hook
   how well the available context fits the task at hand
   Laws & fences
   - Shared topics do not establish shared use.
   - An apparent contradiction can be a scope difference; only rules governing the same scope need adjudication.
   - No validated alignment score is established here, so fit is judged by inspection.
   When to reach
   - Reach for this when a well-stocked window still yields wrong answers, or after the task changes.
   - Reach for this when related sources prescribe different rules for what looks like the same decision.
   Provenance
   [context-alignment/model-and-claims](https://agentic-atlas.dev/nodes/context-alignment#model-and-claims) · v1.1.0
   Addresses
   atlas_cards context-alignment
2. [Context Efficiency](https://agentic-atlas.dev/nodes/context-efficiency)
3. [Momentum](https://agentic-atlas.dev/nodes/momentum)
4. [Reference Data](https://agentic-atlas.dev/nodes/reference-data)
5. [Context Flow](https://agentic-atlas.dev/nodes/context-flow)
6. [The Session Bill](https://agentic-atlas.dev/nodes/session-bill)
7. field notes
   - “the travelling declared-shape contract specialization”

The card, in place · its connections drawn edges from atlas_links context-alignment

On this plate

[definition](https://agentic-atlas.dev/nodes/context-alignment#definition) [why-it-matters](https://agentic-atlas.dev/nodes/context-alignment#why-it-matters) [model-and-claims](https://agentic-atlas.dev/nodes/context-alignment#model-and-claims) [scope-and-boundaries](https://agentic-atlas.dev/nodes/context-alignment#scope-and-boundaries) [implications](https://agentic-atlas.dev/nodes/context-alignment#implications) [evidence](https://agentic-atlas.dev/nodes/context-alignment#evidence) [relationships](https://agentic-atlas.dev/nodes/context-alignment#relationships) [lineage](https://agentic-atlas.dev/nodes/context-alignment#lineage) [open-questions-todo](https://agentic-atlas.dev/nodes/context-alignment#open-questions-todo) [relationships-ledger](https://agentic-atlas.dev/nodes/context-alignment#relationships-ledger)

Every section is addressable on its own. Read only the ground you need.

## Definition

[Permalink to Definition section](https://agentic-atlas.dev/nodes/context-alignment#definition)

**Context alignment is how well the available context supports the task at hand.** Facts, instructions, constraints, and working state are aligned when they apply to what the model needs to do. The reference point is the task, including its target version, intended outcome, and constraints.

A grammar and precedence table support a parser fix. The same material contributes little to an invoice-rounding change in the same repository. Even within the parser, a table for the next language version need not govern a compatibility fix for the current one. **Sharing a subject does not establish sharing a use.**

## Why it matters

[Permalink to Why it matters section](https://agentic-atlas.dev/nodes/context-alignment#why-it-matters)

A well-stocked window looks reassuring: the model has the repository guide, the design history, the implementation, and several examples. But the guide can describe a different release, the history can preserve a rejected design, and the examples can exercise a different mode. Each source has a reason to exist. That does not give each source a role in this decision.

The design mistake is to treat gathering as sufficient preparation. A source that contains the right names can supply the wrong rule; two sources that both bear on the task can disagree. Adding another document then increases what the model must sort out. The studies in *Evidence* show that distractors and unresolved contradictions can change answers, not merely increase the input bill.

Alignment makes the missing judgment explicit: *what does this material let the model decide, and why does it apply here?*

## Model and claims

[Permalink to Model and claims section](https://agentic-atlas.dev/nodes/context-alignment#model-and-claims)

- **Observation:** Fit depends on the current task.
- **Observation:** Topical similarity does not establish applicability.
- **Observation:** Relevant sources can contradict each other.
- **Empirical result:** Distractors and conflicts can change answers.
- **Analytic limit:** No validated alignment score is established here.

Three questions make the judgment concrete:

| Question | What to establish | Example of poor fit |
| --- | --- | --- |
| Does it contribute? | A fact, constraint, or decision it supports | Billing rules in a parser-fix window |
| Does it apply here? | Matching version, mode, scope, and task | Next-version grammar for a current-release fix |
| Do applicable claims agree? | Compatible rules, or an explicit unresolved conflict | Opposite precedence rules for the same mode |

These are inspection questions, not independent numeric dimensions. A source can fail more than one: an obsolete design note can be unnecessary history and contradict the current requirement. Nor does passing these questions prove that the context is complete. A window containing only applicable material can still lack the failing input needed to diagnose the bug.

### Interference: resemblance without a useful contribution

**Interference** is irrelevant context distracting from the task. Unrelated material is the obvious case; the less obvious case is a near-miss that shares the task's vocabulary without supporting its answer. A parser example from another language mode looks more promising than billing documentation, but its precedence rule still does not answer the current question.

The danger is mistaking resemblance for evidence. In the retrieval study reported below, similar distractors hurt accuracy while random distractors left it almost unchanged. That does not make all related material dangerous: an example from the target mode could be exactly what the task needs. Applicability is the distinction that similarity alone cannot make.

### Friction: competing claims about the same decision

**Friction** is contradictory context misleading the model about which claim applies. Two documents can each concern the exact parser and still prescribe opposite behavior. This problem exists within a single task; no batching or unrelated work is required to produce it.

A conflict must be distinguished from a difference in scope. “Exponentiation is left-associative in compatibility mode” and “right-associative in the new mode” can both hold. Remove the mode labels and the window presents an apparent contradiction. If both sources claim to govern compatibility mode, the contradiction remains and needs adjudication. More matching keywords do not resolve it.

Provenance gives that judgment something to work with: the source, target version, authority, and whether a statement records an observation or a requirement. A recent draft does not automatically supersede a released specification. When authority remains unresolved, the context should preserve the disagreement as unresolved; silently choosing one claim hides the gap.

### Worked reading: one parser fix, several kinds of fit

*Illustrative scenario, not a measured model run.* The task is to fix the current release's compatibility parser. Its accepted specification requires `2 ^ 3 ^ 2` to mean `(2 ^ 3) ^ 2`, yielding `64`. A reported bug instead groups it as `2 ^ (3 ^ 2)`, yielding `512`.

| Material available | Reading against this task |
| --- | --- |
| Current compatibility specification and failing input | Establish the required result and reproduction |
| Current parser source producing `512` | Establish the behavior to change |
| A tutorial requiring `512`, with no mode label | Looks applicable; its scope is unknown |
| The same tutorial, identified as new-mode documentation | Explains another mode; does not govern this fix |
| An older compatibility guide requiring `512` | Conflicts with the accepted requirement |
| Invoice-rounding rules | Contribute nothing to the parser decision |

The source code and specification disagree about *what happens*, but their roles make that difference the bug to fix. They are not competing authorities for *what should happen*. Removing the source to make the window “agree” would remove evidence the task needs.

Identifying the tutorial's mode changes how its rule should be read without changing the rule itself. Establishing that the older guide was superseded resolves its authority; deleting it solely because it disagrees would not. The rounding rules add neither a requirement nor diagnostic evidence.

Now change only the task: implement the new mode. The tutorial becomes useful, and the compatibility specification becomes a constraint on preserving the other mode. **The same window has a different fit because the task changed.**

## Scope and boundaries

[Permalink to Scope and boundaries section](https://agentic-atlas.dev/nodes/context-alignment#scope-and-boundaries)

Alignment describes a property. Grouping work, selecting sources, pruning context, and starting fresh windows are ways to change it. None defines the property, and none guarantees improvement: a fresh window that re-admits the same unresolved conflict still contains that conflict.

- **Relevancy:** The useful fraction of resident context.
- **Affinity:** An estimate of task–context fit before use.
- **Efficiency:** Value delivered per unit spent.
- **Momentum:** How context steers generation over time.

[Context Efficiency](https://agentic-atlas.dev/nodes/context-efficiency) owns relevancy and the spending objective. A high useful fraction does not establish agreement or completeness; a short, entirely relevant pair of contradictory specifications demonstrates that limit. A longer window can be better aligned if the added material supplies the missing scope or requirement. Alignment alone does not price that addition, and it does not guarantee that the model uses it correctly.

## Implications

[Permalink to Implications section](https://agentic-atlas.dev/nodes/context-alignment#implications)

- Name the task before assessing its context.
- Establish applicability beyond shared keywords.
- Distinguish requirements from observed behavior.
- Preserve unresolved conflicts explicitly.
- Reassess fit when the task changes.

In practice, an assessment needs reasons: which decision a source supports, which version it governs, and what settles its authority. “This is related” is not enough to justify retaining it; “this disagrees” is not enough to justify removing it. The parser example needs the disagreement between required and actual behavior to remain visible.

The two overcorrections are **hoarding by topic** and **pruning by brevity**. The first admits every related document without establishing its use. The second removes qualification, provenance, or diagnostic evidence because it looks like extra text. Both avoid the task-relative judgment alignment names.

## Evidence

[Permalink to Evidence section](https://agentic-atlas.dev/nodes/context-alignment#evidence)

In a retrieval study, six similar distractors reduced Llama2-7B accuracy from 0.564 to 0.290; six random distractors left it at 0.568 ([Cuconasu et al. 2024](https://arxiv.org/abs/2401.14887)). Similarity itself is not the failure: same-genre padding without shared entities produced the opposite ordering in another study ([Levy et al. 2024](https://aclanthology.org/2024.acl-long.818/), §4.2). The result supports inspecting what a source contributes; it does not supply a universal ranking of distractors by similarity.

Even when told to expect conflicting passages, GPT-4 surfaced both claims only 10.4% of the time in one study ([Hou et al. 2024](https://arxiv.org/abs/2406.13805)). Supplying both sides therefore does not establish that the answer will expose their disagreement. Source provenance supports adjudication but does not establish truth.

These results ground the failure modes; they do not supply an alignment metric or measure the parser scenario above. The research synthesis collects the conditions and limitations. A reproducible task-relative rubric validated against outcomes would move the assessment beyond an analytic lens.

## Relationships

[Permalink to Relationships section](https://agentic-atlas.dev/nodes/context-alignment#relationships)

- [Context Efficiency](https://agentic-atlas.dev/nodes/context-efficiency): value and relevancy.
- [Context Flow](https://agentic-atlas.dev/nodes/context-flow): changes to window contents.
- *the travelling declared-shape contract specialization*: provenance across handoffs.
- [Momentum](https://agentic-atlas.dev/nodes/momentum): generation trajectory.

Flow supplies admission and eviction; envelopes carry the scope and provenance needed when material travels. These mechanisms change what can be assessed and used. Alignment describes the resulting fit to the task.

## Lineage

[Permalink to Lineage section](https://agentic-atlas.dev/nodes/context-alignment#lineage)

Cohesion (Stevens, Myers & Constantine, *Structured Design*, 1974) offers an analogy: material belongs together through a shared purpose. Here the reference point is the current task. The agentic delta is that semantic applicability must be judged, and a change of task changes the fit of an unchanged window.

## Open questions / TODO

[Permalink to Open questions / TODO section](https://agentic-atlas.dev/nodes/context-alignment#open-questions-todo)

- Can reviewers assess task–context fit consistently?
- Do their assessments predict task outcomes?

The relationships ledger

Evidence-bearing references

## Relationships

Every connection keeps the section where it was found. The map above orients; this ledger carries the evidence.

### Outbound references 5

1. in-slice · occurrence 1
   [Context Efficiency](https://agentic-atlas.dev/nodes/context-efficiency)
   how much task value you get for each unit of context spent
   Evidence: [Scope and boundaries](https://agentic-atlas.dev/nodes/context-alignment#scope-and-boundaries) · occurrence 1
2. in-slice · occurrence 1
   [Context Efficiency](https://agentic-atlas.dev/nodes/context-efficiency)
   how much task value you get for each unit of context spent
   Evidence: [Relationships](https://agentic-atlas.dev/nodes/context-alignment#relationships) · occurrence 1
3. in-slice · occurrence 2
   [Context Flow](https://agentic-atlas.dev/nodes/context-flow)
   how context enters, stays in, and leaves a model's window, and how well it's recalled
   Evidence: [Relationships](https://agentic-atlas.dev/nodes/context-alignment#relationships) · occurrence 2
4. undisclosed · occurrence 3
   Undisclosed relationship
   the travelling declared-shape contract specialization
   Evidence: [Relationships](https://agentic-atlas.dev/nodes/context-alignment#relationships) · occurrence 3
5. in-slice · occurrence 4
   [Momentum](https://agentic-atlas.dev/nodes/momentum)
   how context already in the window steers the model along its current path
   Evidence: [Relationships](https://agentic-atlas.dev/nodes/context-alignment#relationships) · occurrence 4

### Inbound references 9

1. in-slice · occurrence 1
   [Context Efficiency](https://agentic-atlas.dev/nodes/context-efficiency#model-and-claims)
   how well the available context fits the task at hand
   Evidence: [Model and claims](https://agentic-atlas.dev/nodes/context-efficiency#model-and-claims) · occurrence 1
2. in-slice · occurrence 1
   [Context Efficiency](https://agentic-atlas.dev/nodes/context-efficiency#scope-and-boundaries)
   how well the available context fits the task at hand
   Evidence: [Scope and boundaries](https://agentic-atlas.dev/nodes/context-efficiency#scope-and-boundaries) · occurrence 1
3. in-slice · occurrence 4
   [Context Efficiency](https://agentic-atlas.dev/nodes/context-efficiency#implications-the-consequence-map)
   how well the available context fits the task at hand
   Evidence: [Implications](https://agentic-atlas.dev/nodes/context-efficiency#implications-the-consequence-map) · occurrence 4
4. in-slice · occurrence 3
   [Context Efficiency](https://agentic-atlas.dev/nodes/context-efficiency#relationships)
   how well the available context fits the task at hand
   Evidence: [Relationships](https://agentic-atlas.dev/nodes/context-efficiency#relationships) · occurrence 3
5. in-slice · occurrence 1
   [Momentum](https://agentic-atlas.dev/nodes/momentum#scope-and-boundaries-three-fences-and-a-test)
   how well the available context fits the task at hand
   Evidence: [Scope and boundaries](https://agentic-atlas.dev/nodes/momentum#scope-and-boundaries-three-fences-and-a-test) · occurrence 1
6. in-slice · occurrence 4
   [Momentum](https://agentic-atlas.dev/nodes/momentum#relationships)
   how well the available context fits the task at hand
   Evidence: [Relationships](https://agentic-atlas.dev/nodes/momentum#relationships) · occurrence 4
7. in-slice · occurrence 1
   [Reference Data](https://agentic-atlas.dev/nodes/reference-data#consequences-and-tradeoffs-and-the-crossover)
   how well the available context fits the task at hand
   Evidence: [Consequences and tradeoffs](https://agentic-atlas.dev/nodes/reference-data#consequences-and-tradeoffs-and-the-crossover) · occurrence 1
8. in-slice · occurrence 6
   [Reference Data](https://agentic-atlas.dev/nodes/reference-data#relationships)
   how well the available context fits the task at hand
   Evidence: [Relationships](https://agentic-atlas.dev/nodes/reference-data#relationships) · occurrence 6
9. in-slice · occurrence 6
   [The Session Bill](https://agentic-atlas.dev/nodes/session-bill#implementation-the-six-shifts)
   how well the available context fits the task at hand
   Evidence: [Implementation](https://agentic-atlas.dev/nodes/session-bill#implementation-the-six-shifts) · occurrence 6

[↑ back to the top](https://agentic-atlas.dev/nodes/context-alignment#content) [← the survey](https://agentic-atlas.dev/atlas)

Node context-alignment · corpus 78c0e17 · Catalog revision ca6ae3709a0fd6e298b5abb3766c123f5bf204e6202e067484cabf3973e39c9f