Skip to lesson

AnthropicClaude Certified Architect – Professional2026-101.5 Apply decomposition techniques for complex problem solving

Partition corpora without breaking evidence dependencies

Completed by the knowledge check

Learning objective

Split work along independence boundaries, including map-reduce over large corpora, and identify dependencies that force sequencing.

Core idea

For a large corpus, map-reduce applies the same bounded analysis to independent units and then combines the accepted results. The difficult architectural decision is the unit of independence. A document is not independent merely because it is stored in a separate file: an amendment, shared definition, or corpus-wide comparison can create a dependency.

Anthropic calls splitting independent work sectioning and describes programmatic aggregation of parallel results. Map-reduce applies that pattern repeatedly across a collection. It is an application design, not a special Claude API operation. Keep deterministic grouping and counting in code, and reserve inference for interpretation that needs it.

How it works

Freeze the shared inputs before mapping

Define the corpus membership, document versions, and analysis rubric before starting a run. Those application artifacts establish what the map phase must cover. Each assignment receives its own material and the same relevant definitions, period, and rubric version. Otherwise identical-looking records can encode incompatible judgments.

Choose units from semantic relationships. If a base agreement and its amendment must be read together to determine the effective term, resolve that relationship before mapping or map the bundle as one unit. If finding the amendment requires a separate investigation, the dependent interpretation waits for its result. Do not ask reduction to repair evidence that no worker received.

Anthropic’s context-engineering account recommends focused contexts containing high-signal information. For a long document, partition by coherent sections with the definitions each section needs. Retain source locations and explicit boundary overlap so the reducer can recognize the same passage encountered twice. See 1.5.1 for sizing and acceptance criteria; equal token counts are secondary to preserving the deciding evidence.

Separate the map contract from reduction

A map result should return facts the reduction can combine, rather than only a prose summary. An illustrative application record contains the corpus item ID, version, question, finding, supporting location, and unresolved dependencies. These fields belong to your result contract; they are not native Messages fields.

The reducer first groups accepted records and computes exact totals in code. Claude can then compare supported interpretations or write an executive synthesis from the relevant evidence. A model-written summary for every shard followed by a summary of summaries can discard qualifiers at each handoff. Anthropic’s research-system account recommends persistent artifacts and lightweight references to reduce that information loss.

Each assignment returns its map result to the reducer, which groups accepted records and computes exact totals in code before Claude compares supported interpretations.

The reducer groups and counts accepted records in code before Claude compares interpretationsStarts at freezing the shared inputs, which fan out to parallel assignments. Every assignment's result joins at grouping accepted records, then exact totals are computed, both in code. Only then does Claude compare supported interpretations.ClaudeIn codeCompare supportedinterpretationsGroup acceptedrecordsCompute exacttotalsFreeze the sharedinputsAssignmentAssignmentAssignment

For a corpus too large for one synthesis context, use intermediate reductions with explicit responsibilities: group by supplier, for example, before comparing supplier categories. Preserve original record IDs through each layer. Intermediate aggregation must retain the distinctions the final decision needs, including unresolved outcomes and contradictory evidence. Hierarchy reduces working context; it does not make lossy summaries safe automatically.

Use batch execution only for independent requests

For asynchronous Claude API workloads, the Message Batches API processes each request independently. Submit the map requests in requests; each entry has custom_id and params, where params contains the Messages request. A custom_id must be unique within the batch: 1 to 64 characters, only alphanumerics, hyphens, and underscores (^[a-zA-Z0-9_-]{1,64}$).

Keep a trusted mapping from that identifier to the corpus item, input version, and application attempt. Results are not guaranteed to arrive in submission order, so join by custom_id, never array position. Do not submit extraction and an interpretation that needs that extraction as though they were independent batch entries. Submit the dependent stage after the required accepted output exists.

Batch processing does not establish a short delivery guarantee. Requests that have not completed expire after 24 hours; most batches complete within an hour, but that observation is not an SLA. Choose asynchronous batch execution only when the workload can tolerate that boundary. A caller needing an immediate response requires a different execution plan, even if the corpus partition is sound.

When the batch’s processing_status is ended, inspect each result.type: succeeded, errored, canceled, or expired. Batch completion is not evidence that every mapped item succeeded. Preserve the expected corpus membership and reconcile it with accepted results. A failed request leaves its item outstanding until repaired or explicitly reported incomplete.

Put barriers at actual dependencies

The resulting schedule has three kinds of boundary:

BoundaryRequired orderArchitectural reason
Shared rubric or document relationshipResolve before affected mapsTheir meaning depends on those inputs
Independent map unitsExecute concurrently where capacity permitsNo unit requires another unit’s output
Reduction and final verificationRun after required map results pass acceptanceTheir inputs are the accepted findings

A preliminary reduction can process available records, but label it partial and retain the expected membership. It cannot become the final corpus conclusion while required units remain unresolved. See 1.5.4 for the integration checks that enforce this distinction.

Key distinctions and trade-offs

Map independence versus file independence: Separate files can share meaning. Bundle or sequence them when interpretation requires their relationship.

Sectioning versus voting: Sectioning covers different corpus units. Voting repeats the same question for multiple perspectives. Repeated analysis of one unit cannot replace an unprocessed unit.

Parallelism versus completion: More simultaneous work can reduce elapsed time, but increases competing load and does not repair omitted inputs. Select the partition for correctness before selecting its execution width.

Fine shards offer smaller contexts and localized repair, but increase scheduling, repeated instructions, and integration effort. Coarser shards reduce handoffs while placing more evidence in each call. Evaluate the cut against missed relationships and accepted corpus coverage, not throughput alone.

Architecture / decision scenario

A retailer must review 2,400 supplier documents before a sourcing meeting in two days. The required output is a supplier-level register of price-change rights, including amendments. The architect chooses a repeatable map contract, but rejects one independent request per uploaded file.

Application code establishes supplier bundles and a frozen corpus list first. Each map receives the base agreement, relevant amendments, and the same price-change rubric. The team submits independent bundles through the Claude API Message Batches API, using valid custom_id values mapped to bundle versions. The deadline can accommodate asynchronous processing and its expiry boundary.

One bundle expires and two amendments refer to unavailable documents. The reducer joins returned records by custom_id; it does not mistake reordered results for different suppliers. Accepted bundles feed deterministic supplier grouping and counts. The expired bundle needs another attempt, while the missing references require evidence retrieval before interpretation.

The team can issue a partial register with explicit outstanding bundles, but cannot declare the entire corpus reviewed. The final synthesis waits for accepted results or an authorized incomplete-delivery decision. The architecture gains parallelism without treating cross-document dependencies or failed requests as clean findings.

Common exam traps

  • Mapping files independently when amendments change their effective meaning.
  • Placing dependent extraction and interpretation requests into one unordered batch.
  • Matching results by position rather than custom_id.
  • Treating processing_status: "ended" as complete corpus coverage.
  • Counting duplicate analyses as additional reviewed documents.
  • Asking a final summary to recover evidence omitted by every map.

What to remember

Partition by evidence independence, establish shared inputs first, and reduce accepted records after their dependencies resolve. For Claude API batches, correlate by custom_id and inspect every result outcome. Faster fan-out is useful only when the final answer still accounts for the entire required corpus.

Knowledge check

References