Seven Mental · 心智七篇
← Knowledge Atlas · Concept

Parallelization(并行化)

并行化:sectioning(分段并行)+ voting(投票取共识)
CONCEPT · PARALLELIZATION · AGENTIC WORKFLOW · CONCURRENT EXECUTION

Parallelization

Parallelization — multiple LLMs work on the task concurrently; outputs are merged programmatically

Two flavors of parallelization: Sectioning splits a task into independent subtasks running concurrently; Voting runs the same task multiple times to get diverse outputs and take consensus. Shared property: subtasks are known at design time, not decided at runtime (distinguishing it from Orchestrator-Workers).

Sectioningfits: task splits cleanly + throughput is the bottleneck
user-query handling + content guardrail review (concurrent)multi-file codebase analysis in parallel
Votingfits: higher confidence needed + multi-angle review
multiple prompts review code for security holes from different anglesmulti-sample consensus (Self-Consistency)
Place in agentic systems
vs Orchestrator-Workers
parallelization subtasks are predefined; Orchestrator-Workers decides them at runtime
Cost–benefit
low overhead (no extra orchestration call); suits clean-structure batch work with independent subtasks
→ Orchestrator-Workers · Agentic Systems · GuardrailsAnthropic (2024)

Parallelization(并行化)

定义

多个 LLM 同时处理任务,结果由程序汇聚。有两种变体:

  • Sectioning(分段):把任务拆成独立子任务并行执行
  • Voting(投票):同一任务跑多次获得多样化输出,取共识

适用场景

子任务可独立执行时用 sectioning 加速;需要更高置信度或多角度审视时用 voting。

典型用例

  • Sectioning:一个模型处理用户查询,另一个同时做内容审核(guardrail)
  • Voting:多个 prompt 从不同角度审查代码安全漏洞

在 agentic 系统中的位置

属于 agentic systems 中的 workflow 模式。与 orchestrator-workers 的区别:parallelization 的子任务是预定义的,orchestrator-workers 的子任务是动态决定的。

References

  • sources/anthropic_official/building-effective-agents.md