Multi-Agent Debate for Long Document Review: Architecture, Orchestration, and Result Compression
This article explains how to apply multi-agent debate to the review of long technical documents, where traditional review often fails due to limited reading bandwidth, single-perspective bias, and conclusions that cannot be traced back to the source. It describes a four-layer architecture consisting of a document parsing layer, twelve adversarial role teams, an orchestration layer, and an aggregation and compression layer. It also covers a three-round orchestration process, termination conditions, result governance practices such as deduplication, severity ranking, and evidence back-references, and common pitfalls with practical engineering recommendations.
1. Why Long Document Review Breaks Down
When a development document grows to hundreds of thousands of words, traditional review methods hit three bottlenecks at the same time.
The first is a reading bandwidth bottleneck. A reviewer’s working memory cannot hold causal chains that span multiple chapters, so they tend to see only local details and miss the overall picture.
The second is a single-perspective bottleneck. The same reviewer often covers architecture, security, and operations at once, and these concerns compete for attention.
The third is a traceability bottleneck. Verbal review comments lack evidence references, which makes them hard to verify later.
The value of multi-agent debate review is not to let machines make decisions for people. It is to split review into a process that can run in parallel, challenge assumptions, and leave a trace: different perspectives gather evidence independently, then engage around disagreements, and finally produce a set of conclusions with locations and confidence levels. The original dilemma of “the conclusions are sound, but the document is too long to read” essentially comes from a missing final aggregation and compression mechanism.
2. Overall Architecture: Orchestration Layer Plus Twelve Debate Teams
The system can be divided into four layers:
Document Parsing Layer -> Role Team Layer (12 groups) -> Orchestration Layer -> Aggregation and Compression Layer
- Document parsing layer: splits chapters, aligns terminology, and builds reference relationships. It assigns a stable ID to each fragment so that conclusions can point back to the original location.
- Role team layer: twelve teams are each set up as a pair of “proponent” and “opponent”, covering different review dimensions.
- Orchestration layer: dispatches tasks, controls rounds, determines convergence, and handles timeouts and retries.
- Aggregation and compression layer: deduplicates conclusions, merges issues with the same root cause, sorts them by severity, and produces a readable list.
The twelve dimensions can be divided as follows: requirement consistency, architecture boundaries, data model, API contracts, concurrency and consistency, security and permissions, observability, performance and capacity, fault tolerance and degradation, deployment and rollback, testing strategy, and documentation maintainability. Each dimension is assigned one adversarial team pair. The proponent provides arguments for validity, while the opponent provides counterexamples and boundary conditions.
3. Orchestration Logic: Rounds, Convergence, and Termination Conditions
The orchestration layer needs to define when to stop debating. A three-round approach can be used:
- Round one, independent evidence gathering: each team outputs claims and evidence IDs based only on fragments from the original document. Cross-team reference is prohibited to preserve perspective independence.
- Round two, cross rebuttal: proponent claims are distributed to the corresponding opponents, who must provide verifiable counterexamples or explicitly mark the issue as “questionable only”.
- Round three, convergence and adjudication: the orchestration layer compares the evidence from both sides and classifies disagreements into three types: “factual conflict”, “definition mismatch”, and “undeterminable”.
Three rules are recommended for termination conditions used together: no new evidence, the number of disagreements stops decreasing, and the maximum number of rounds is reached. Illustrative scheduling pseudocode is as follows:
for round_id in range(1, MAX_ROUNDS + 1):claims = dispatch_evidence_round(teams, doc_index)rebuttals = dispatch_rebuttal_round(claims, teams)conflicts = cluster_conflicts(claims, rebuttals)if not conflicts.new_evidence or conflicts.count_trend_flat():breakreport = compress_and_rank(conflicts)
4. Result Governance: Compressing Hundreds of Thousands of Words into a One-Page List
The aggregation and compression layer is the key to whether the whole approach can be put into practice. Four things are recommended.
First, merge issues with the same root cause. Multiple teams often point to the same root cause from different angles, so they need to be clustered by “root cause fingerprint” to avoid duplicate entries drowning out key points. Second, classify severity. The criteria should be “whether it blocks delivery, whether it creates data risk, and whether it affects operability”, rather than the subjective tone of a team. Third, back-reference evidence. Every conclusion must carry a fragment ID and a short quote from the original text to ensure it can be verified. Fourth, layer the reading. The first layer keeps only blocking items and high-risk items, the second layer keeps definition mismatches and items to be confirmed, and the third layer archives all original debate records.
The recommended conclusion structure is as follows:
{"id": "C-017","dimension": "concurrency and consistency","severity": "high","root_cause": "the compensation flow lacks idempotency constraints","evidence": ["#sec4.2-p3", "#sec7.1-p1"],"status": "confirmed"}
5. Common Pitfalls and Engineering Recommendations
First, avoid “debate theater”. If the opponent only outputs negative adjectives without counterexamples, the contribution should be judged invalid and the round should be rolled back and rerun. Second, avoid context drift. Long documents must be fed in segments with a global summary, otherwise conclusions in later sections will conflict with the definitions used in earlier sections. Third, control cost. Low-risk dimensions can use a single-team brief review, while full adversarial review is enabled only for high-risk dimensions. Fourth, keep human final review. Machine conclusions are used for locating and ranking issues, but the final decision should still be confirmed by the owner.
For engineering support, parsing artifacts and debate records can be stored in object storage, the task queue can be decoupled with a message queue, and runtime metrics can be connected to a logging service and monitoring alerts, so that the process is replayable and auditable.
6. Conclusion
The twelve adversarial teams address “seeing the whole picture”, the orchestration layer addresses “knowing when to stop”, and the aggregation and compression layer addresses “being able to finish reading”. Missing any one of them turns long document review into noise production. Making review a pipeline rather than a one-time sprint is the sustainable way to handle extremely long documents.
