Let a CEO→Manager→Worker hierarchy auto-write better prompts and improve zero-shot LLM outputs

May 30, 20247 min

Overview

Decision SnapshotNeeds Validation

The method is simple and zero-shot, so it is easy to test, but it increases latency and depends on LLM quality and an LLM-based evaluator, so production readiness needs engineering for cost and judging bias.

Citations1

Evidence Strength0.70

Confidence0.80

Risk Signals9

Trust Signals

Findings with numeric evidence: 6/6

Findings with evidence refs: 6/6

Results with explicit delta: 7/7

Reproducibility

Status: Partial assets available

Open source: Partial

At A Glance

Cost impact: 50%

Production readiness: 60%

Novelty: 60%

Authors

Yuchi Liu, Jaskirat Singh, Gaowen Liu, Ali Payani, Liang Zheng

Links

Abstract / PDF / Code

Why It Matters For Business

HMAW automates prompt tuning without training and boosts response quality across varied tasks, letting teams improve outputs quickly while avoiding dataset-specific finetuning.

Who Should Care

Summary TLDR

The authors propose HMAW, a zero-shot prompt optimizer that runs three LLM roles (CEO, Manager, Worker) to rewrite a user query into a refined prompt. HMAW is task-agnostic and needs no training. Across five datasets (education, dialog, math, code, general QA) it raises evaluator preference rates from ~38.5% to 69.2% on average (a +30.7 point absolute gain) and slightly improves GSM8K accuracy (+1.7%). The method costs extra latency (roughly +4–10 seconds per sample) and works with different LLM backbones (Mixtral, GPT-3.5, GPT-4).

Problem Statement

Good prompts matter, but manual prompts and learned prompts either require hand design or training and generalize poorly. The paper asks: can an LLM-based multi-agent hierarchy automatically produce query-specific, zero-shot prompts that generalize across tasks without training?

Main Contribution

HMAW: a 3-layer CEO→Manager→Worker workflow that rewrites queries into refined prompts without training.

Empirical evaluation on five datasets showing large average gains in evaluator preference scores.

Key Findings

Average preference score across five tasks increases by 30.7 percentage points

NumbersAvg pref: 69.2% (HMAW) vs 38.5% (no prompt); +30.7 pts

Practical UseUse HMAW to boost zero-shot response quality across diverse tasks without extra training.

Evidence RefTable 2

GSM8K accuracy improves slightly (+1.7%) under HMAW

NumbersGSM8K acc: 70.3% (HMAW) vs 68.6% (no prompt); +1.7 pts

Practical UseHMAW helps general tasks but specialized math prompts (e.g., Zero-CoT) may still be better for pure math.

Evidence RefTable 2

Results

MetricValueBaselineDeltaSplit / DatasetEvidenceEvidence Ref
Preference score (GPT-3.5 evaluator)ATLAS: 64.1%No prompting: 35.9%+28.2 ptsATLASTable 2: ATLAS preference with HMAW vs no promptingTable 2
Preference score (GPT-3.5 evaluator)FED: 86.2%No prompting: 13.8%+72.4 ptsFEDTable 2: FED preference with HMAW vs no promptingTable 2

What To Try In 7 Days

Prototype HMAW with your current LLM: implement CEO→Manager→Worker prompt templates and compare outputs on 100 live queries.

Measure trade-offs: log evaluator preference, latency, and token cost to decide where quality gains justify extra runtime.

Enable skip connections: always include original user query at intermediate layers to preserve details.

Agent Features

Memory
skip connections to preserve query details
Planning
hierarchical instruction generation
Frameworks
HMAW
Is Agentic

Yes

Architectures
CEO-Manager-Worker hierarchy
Collaboration
multi-agent coordinationlayered instruction passing

Reproducibility

Code AvailableYes
Data AvailableNo
Open Source StatusPartial
LicenseUnknown

Risks & Boundaries

Limitations

Adds substantial extra latency and token cost per request

Relies on an LLM evaluator for subjective comparisons, which can carry bias

When Not To Use

When strict low-latency constraints exist (real-time systems)

When you already have a tuned, high-performing task-specific prompt (e.g., math CoT)

Failure Modes

Layer-generated instructions drift from the original intent if skip connections are removed

Deeper hierarchies (>3) can overcomplicate prompting and reduce quality

Core Entities

Models

Mixtral-8x7Bv0.1GPT-3.5GPT-4

Metrics

preference score (%) from GPT-3.5 evaluatorAccuracy

Datasets

ATLASFEDGSM8KCodeNet (Python subset)Education (100 Qs, authors' new set)