CCA Foundations twisthandai.co.uk

Scenario 03 · Research & Analysis Agent

~15 min read · interactive · 3‑question self‑check

Research is a partitioning problem. Three subagents. One topic. Two decompositions.

Three independent agents asked the same ambiguous question will converge on the same salient answer. Breadth comes from the decomposition, not the headcount.

Parallelism without partition is duplication.

§ 01 · Setup

The convergence.

A research system is asked to report on AI impact on creative industries. A coordinator sits above three research subagents, each capable of searching, reading, and returning findings. The design goal is breadth: the final report should cover visual art, music, literature, and film.

The naive pattern is symmetric. Hand the same broad topic to all three subagents, let them work in parallel, aggregate the results. More headcount, more sources found, broader coverage. Or so the reasoning goes.

The report comes back covering only visual art. Every subagent ran successfully. Every subagent returned useful findings. Every subagent found different articles. And every subagent interpreted “creative industries” as “digital art, graphic design, and photography” — because that interpretation is the most salient one. Music was not missed because the subagents failed. It was missed because no one was asked to look.

The tempting reactive fix — have the coordinator deduplicate overlapping results at the end — reads correctly and fails the exam. Deduplication happens after the work has already been done. The duplicated tokens, the missed sectors, and the coordinator round‑trip are all already spent. The exam rewards answers that address the root cause: unclear task boundaries, fixed before delegation.

§ 02 · Evidence

Three subagents. Twice.

We simulated one research run twice. Same topic. Same three subagents. Thirty sources discovered between them. The only difference is what the coordinator told each subagent to do before they started.

Press run. Each panel’s grid has four rows — one per sector — and ten slots per row for unique sources. Any source that lands in an already‑filled row registers as a duplicate. The panel headers show what each subagent was told to research.

The thirty‑source run

Same subagents. Same topic. One delegation decision apart.

Mode A

Broad delegation

Three subagents, same broad topic.

S01 broad topic
S02 broad topic
S03 broad topic
/ 4 sectors covered
unique
duplicates

Mode B

Partitioned

Coordinator splits the space first.

S01 Visual
S02 Music
S03 Literature
/ 4 sectors covered
unique
duplicates
S01 S02 S03 Duplicate Run 0

Mode A’s Visual row fills past capacity on every run; the three other sectors are sparse or empty. The duplicates counter climbs because every subagent, given the same broad input, samples from the same high‑probability region of the search space — digital art, graphic design, photography. The sources are different articles. The interpretation is the same.

Mode B’s grid fills three rows cleanly, one per subagent, zero duplicates. The Film row stays empty because the coordinator did not assign it — a decision, not an accident. The synthesis agent will receive a coverage annotation saying so. Missing because it was left out is recoverable; missing because all three agents converged on something else is not.

§ 03 · Why broad delegation fails

Three samples from the same distribution.

An LLM asked to research “AI impact on creative industries” produces a distribution over interpretations. Visual art sits near the mode of that distribution because the training data disproportionately documents it: AI art, Midjourney, Stable Diffusion, generative design pipelines. Music, literature, and film are further from the mode.

Spawning three subagents and handing them the same prompt does not average across that distribution. It samples from it three times, independently, with similar temperature. Three samples from a right‑skewed distribution are still right‑skewed. The three subagents go to the same place because that is where the prompt pointed them.

The three reactive fixes all miss. “Increase temperature on the subagents” widens the sampling but makes it noisier, not better‑partitioned. “Share state between agents so they can see each other’s focus live” couples agents that should be independent and introduces race conditions on what counts as a claim. “Run them sequentially so later agents see earlier results” throws away the parallelism that was the reason to have three subagents in the first place. None of these addresses the distribution; they all argue with its shape.

Shared‑state coordination between subagents is the plausible‑but‑wrong answer on this question. It sounds clever — agents log their focus so others can dodge it — and it fails in practice because coordination logic belongs above the subagents, not between them. The coordinator owns the partition decision precisely because no subagent has the view to make it.

§ 04 · The pattern

What a coordinator actually does.

A coordinator is not a dispatcher. Its job is not to pass a topic along and collect the results. Its job is to make the decomposition decision — to convert an ambiguous user intent into a partitioned research space before any subagent runs. The code is modest. The decisions are the work.

# Coordinator — partitions BEFORE delegating
topic = "AI impact on creative industries"

# 1. Decompose the topic into disjoint research spaces
partitions = [
    { "scope": "visual",     "sources": ["arxiv", "artforum"]   },
    { "scope": "music",      "sources": ["jstor", "billboard"]  },
    { "scope": "literature", "sources": ["jstor", "publisher"]  },
]

# 2. Delegate in parallel — each subagent gets scoped work
results = await asyncio.gather(*[
    research_agent.run(
        scope           = p["scope"],
        allowed_sources = p["sources"],
        return_envelope = FindingsEnvelope,
    )
    for p in partitions
])

# 3. Synthesis receives the union — nothing to dedup
return synthesis_agent.merge(
    results,
    coverage = { "excluded": ["film"] },   # explicit, not implicit
)

Three things to notice. First, the partitions are disjoint by construction — no subagent can collide with another because their scope strings do not overlap. Second, each subagent gets an allowed_sources allow‑list; this is least‑privilege, and it is also a context‑budget control, because a source a subagent cannot query is a source it cannot spend tokens on. Third, the excluded sector — film — is named in the coverage annotation that flows forward. Synthesis sees an explicit gap, not an inferred one.

Identify the ambiguity in the user’s intent. Convert it into disjoint subtasks the coordinator is prepared to name. Delegate each subtask with scoped sources and a known return envelope. Record what was deliberately excluded. The coordinator’s job is done before any subagent returns.

§ 05 · Pattern reach

Partition as architecture.

The partition pattern shows up anywhere parallelism has to produce coverage, not throughput. Three places it appears, briefly.

Example 01

Codebase analysis · partition by path

Directory‑scoped review

Three subagents review a monorepo. Assigned the same repo they all go to the busiest directory. Assigned services/, packages/, apps/ they cover the system — and the reviews don’t overlap.

Example 02

Document pipeline · partition by format

File‑type specialisation

PDFs to a subagent with OCR and layout tools, Markdown to a subagent with structure parsers, CSVs to a subagent with schema inference. Each partition gets the allowed-tools set it actually needs.

Example 03

Knowledge ingestion · partition by source

Source‑category split

Public docs, internal wiki, bug tracker. Three subagents with different auth scopes, each returning envelopes stamped with its source category. The coordinator reconciles at merge; the subagents never see each other’s credentials.

In every case the partition is a property of the problem, not of the agents. Directory structure, file format, source category — all are naturally disjoint. The coordinator’s contribution is noticing that they are.

§ 06 · Adjacent

The return envelope.

Partitioning protects the input to a subagent. The return envelope protects the output. Every subagent in a multi‑agent research system returns the same shape — structured, not narrative — and that shape is what the coordinator and the synthesis agent rely on.

The envelope carries three things, and the exam tests all three.

Field 01

Structured claims, not verbose content

A subagent that returns a web page’s raw HTML has made the synthesis agent’s job worse, not easier. The envelope carries distilled claims — a statement, a confidence, a list of sources — because synthesis reasons over claims. Raw content is verbose, redundant, and pushes synthesis into lost‑in‑the‑middle territory when aggregated.

Field 02

Per‑claim source attribution

Every claim is tagged with the specific source it came from: URL, document ID, page number, whatever identifies it uniquely. Attribution is what lets the coordinator reconcile conflicts, lets synthesis cite, and lets the system defend its own conclusions. A claim without attribution is an opinion.

Field 03

Explicit conflicts and coverage annotations

When two sources disagree on a metric — a government report says 40%, an industry analysis says 12% — the envelope marks the conflict and carries both values forward. When a subagent could not reach a source, the envelope says so. Hiding a conflict to keep output clean is the single most‑tested anti‑pattern in the research scenario.

“Apply credibility heuristics and pick the more likely correct number.” This is the distractor on every version of the contradictory‑sources question. It reads as good judgement and is exactly the decision the subagent is not authorised to make. The conflict travels in the envelope; the coordinator — which has broader context — decides how to reconcile it, or hands it to synthesis to annotate both.

§ 07 · Self‑check

Three questions. Scroll after answering.

Progress
Use keys ABCD

Question 01 · Partition

While researching a broad topic, the web‑search agent and the document‑analysis agent investigate the same subtopics, producing substantial duplication. Token usage nearly doubles without a proportional increase in breadth or depth. What addresses this most effectively?

Why B

Fix the task boundaries before work begins, not after.

Explicit partitioning addresses the root cause — unclear task boundaries — before any tokens get spent. It preserves parallelism while making duplication structurally impossible, because the subagents’ assigned scopes don’t overlap. The duplicates counter in the simulator never leaves zero.

ADedup at the end still spends the duplicated tokens. The coordinator’s job is to prevent the waste, not mop it up.
CShared state couples agents that should be independent and makes “what counts as a claim” a race condition.
DSequential execution throws away the parallelism that was the reason to have three subagents in the first place.

Question 02 · Conflict in the envelope

A document‑analysis subagent finds two credible sources with directly contradictory statistics for a key metric: a government report says 40% growth, an industry analysis says 12%. How should the subagent handle it?

Why D

Subagents carry conflicts. Coordinators reconcile them.

Separation of responsibilities lives in the envelope. The analysis agent completes its core work without blocking, preserves both conflicting values with attribution, and hands reconciliation to the coordinator — which has the broader context needed to make the call. The conflict is marked, not resolved, at the subagent layer.

ACredibility heuristics are exactly the judgement the subagent is not authorised to make, and the distractor the exam tests for.
BUnmarked conflicts are worse than marked ones — synthesis can’t reconcile what it can’t see.
CBlocking on every conflict forces the coordinator into inline arbitration and kills parallelism.

Question 03 · Envelope shape

The combined output of the web‑search agent (85K tokens including page content) and the document‑analysis agent (70K tokens including chains of thought) totals 155K tokens, but the synthesis agent performs best with inputs under 50K. Which solution is most effective?

Why A

Fix the envelope at the source.

Reducing token volume at source addresses the root cause. Upstream agents return structured findings — claims, quotes, attributions, relevance scores — not raw page content and reasoning traces. The synthesis agent sees signal, not noise, and never crosses its reliable‑processing threshold.

BIntermediate summarisation adds a lossy compression step and another coordinator round‑trip; the verbose content is still generated upstream.
CSequential batches turn a one‑shot reasoning task into a stateful one without fixing the input‑size problem.
DA vector DB is retrieval infrastructure for a problem the envelope should have solved at source.

Scenario 03 · Result

0/3

The takeaway

A coordinator does not run subagents.
It partitions the work they run.