What This Example Shows
- A
HierarchicalSwarmapplied to a real-world business analysis problem - A director coordinating three domain specialists (logistics, inventory, procurement)
- How to write director and worker system prompts that compose cleanly
This is the same hierarchical pattern as the Hierarchical Workflow Example, applied to supply chain analysis instead of software development. Swap the worker roles and prompts to apply it to any domain — legal review, M&A due diligence, clinical case conferences, marketing campaign planning.
Step 1: Setup
Step 2: Define the Team
The director sets strategy and synthesizes. Each specialist owns one functional area.Step 3: Run the Swarm
The director sees every specialist’s output and writes the final synthesis. Workers do not see each other’s drafts. Design your director prompt around “review, decide, recommend” — not “write a long report.”
Adapting the Pattern
Replace the three specialists to retarget the swarm:| Domain | Director | Workers |
|---|---|---|
| M&A due diligence | Deal Lead | Financial Analyst, Legal Counsel, Technical Auditor |
| Clinical case conference | Attending Physician | Radiologist, Pathologist, Cardiologist |
| Marketing campaign | Brand Director | Copywriter, Designer, Performance Marketer |
| Software architecture review | Principal Engineer | Backend Engineer, Database Engineer, Security Engineer |