Parallelization: run LLM calls side by side, then combine
Fan a task out into independent LLM calls that run at once — either sectioning a job into parts, or voting for reliability — then aggregate the results.
Some work doesn't need to happen in sequence — it needs to happen at the same time. Parallelization fans a task out into independent LLM calls that run concurrently, then aggregates their outputs. It comes in two flavours, and both are useful for different reasons.
Two flavours
- Sectioning — split a task into independent subtasks (summarise each chapter, review each file) and run them at once, then stitch the results together.
- Voting — run the same prompt several times and aggregate by majority or threshold, trading tokens for reliability on high-stakes calls.
Sectioning wins on latency: three subtasks that would take 6s in sequence finish in ~2s in parallel. Voting wins on confidence: asking the model the same thing five times and taking the consensus catches the occasional bad roll.
const parts = await Promise.all([
llm(prompt, sectionA),
llm(prompt, sectionB),
llm(prompt, sectionC),
]);
return aggregate(parts); // merge, or take the majority voteWhen to use it
Use sectioning when subtasks are genuinely independent and latency matters. Use voting when a single call is too unreliable for the stakes — content moderation, code review, anything where a false negative is expensive. The cost is more tokens; the payoff is speed or confidence.
If the subtasks don't depend on each other, waiting for them one at a time is just latency you chose to keep.