Routing & parallelization
activeidledissent
- Routing: classify, then dispatch to a specialised prompt.
- Sectioning: fan out independent subtasks.
- Fan-in: latency = max(tᵢ), not Σtᵢ.
- Voting: N samples, majority aggregation.
Notes & references
Use when
Separable input classes, independent subtasks, or high-variance decisions.
Avoid
Subtasks with sequential dependencies; voting scales cost linearly in N.
# Route
kind = llm.classify(request) # "billing"
return experts[kind](request)
# Split
parts = await gather(check_safety(x), review(x), write_docs(x))
return combine(parts)
# Vote
votes = await gather(*[judge(x) for _ in range(3)])
return majority(votes)
- Building effective agentsAnthropic
- RouteLLMOng et al.
- Self-ConsistencyWang et al.
- Workflows and agentsLangChain