# Intelligence Per Dollar: Companion Guide

*Build Lab | May 21, 2026*

---

## PAGE 1: The One-Pager

### The Core Formula
```
Intelligence Per Dollar = (Value × Throughput) ÷ Cost
```

Most people obsess over cost alone. The real game is **increasing value and throughput** while keeping cost reasonable.

### The Three Levers
1. **Increase value** - Get more useful work per token
2. **Increase throughput** - Process more work efficiently
3. **Decrease wasted cost** - Stop paying for tokens that don't deliver

---

## 5 Myths, Busted

| Myth | Reality |
|------|----------|
| Frontier vs. open source is the decision | **Use both.** Frontier for planning, open source for execution. |
| Buy a Mac Mini, get frontier smarts | **Local is great for learning.** Frontier is still significantly smarter for serious work. |
| Big context = big cost | **Caching changes the math.** Cached input is 40× cheaper than output. |
| Ask AI which open model to use | **Check live benchmarks.** Open source moves faster than training data. |
| Need expensive models for great results | **Systems beat model size.** Architecture > raw power. |

---

## Agent Architecture Patterns

### HAHA (Human-Agent-Human-Agent)
```
H → A → H → A
```
- **H** (Human kickoff) → **A** (Agent work) → **H** (Human verification) → **A** (Agent revision)
- Humans are the quality layer at both ends
- Best for: Work requiring human judgment + AI iteration

### HAaAH (Human-Big-small-small-Big-Human)
```
H → A → a → a → A → H
```
- **H** (Human) → **A** (Frontier model: planning) → **a** (Open source: execution) → **a** (Open source: verification) → **A** (Frontier model: review) → **H** (Human)
- Big models handle reasoning-heavy parts (start/end)
- Small models do bulk work (middle)
- Best for: Cost-effective high-quality output

---

## The System Loop (Everywhere You Look)
```
Generate → Verify → Revise → Retry
```

**Google Aletheia**: Generator → Verifier → Reviser → Retry
**Poetiq**: Recursive self-improvement via harness evaluation
**Microsoft MDASH**: 100+ specialized agents (88.4% on CyberGym vs Claude Mythos 83.1%)

**The insight**: You don't need bigger models. You need better systems.

---

## The Human Edge
Humans are **sample-efficient**. We generalize from few examples. We spot patterns models miss.

**U + AI will beat AI alone** for the foreseeable future.

---

## Current Model Shortlist (May 2026)
- **GLM** - Coding (top pick)
- **Kimi** - Research & long context
- **DeepSeek** - Efficiency
- **MiniMax** - Worth watching

*Always check [ArtificialAnalysis.ai](https://artificialanalysis.ai) first - this changes fast.*

---

## PAGE 2: Implementation Guide

### Getting Started with the "Both Strategy"

**Step 1: Plan with Frontier**
> "Plan this feature refactoring. Write your plan as if passing to a junior engineer. Include all context they need to execute."

**Step 2: Execute with Open Source**
> "Implement this plan. Write clean code. Add tests for all edge cases."

**Result**: Strong output at a fraction of the cost.

---

### The Double Hack (4-Model Workflow)

```
1. FRONTIER (Claude/GPT)
   "Write a spec/plan as if handing off to a junior engineer"

2. OPEN SOURCE (GLM)
   "Implement this entire plan"

3. OPEN SOURCE (GLM)
   "Verify the implementation. Run tests."

4. FRONTIER (Claude/GPT)
   "Code review. Any issues?"
```

This is the generator-verifier pattern from MDASH/Aletheia, applied to your actual work.

---

### The /goal Pattern

**What it is**: The simplest agentic pattern. Define completion, let AI iterate until done.

**How it works**:
1. You define completion condition
2. Agent works on task
3. Evaluator checks: Are we done?
4. Loop until YES

**In Claude Code**: Use the built-in `/goal` command:
```
/goal Refactor auth into separate module, ensure all tests pass, add 3 new tests
```

**Without /goal**: Ask your AI to simulate the pattern:
> "Work on this task iteratively:
> 1. Produce a first attempt
> 2. Self-check against these criteria: [LIST CRITERIA]
> 3. Revise any issues
> 4. Repeat until all criteria are met
>
> Task: [YOUR TASK]"

**Great for**:
- Refactoring a module
- Adding test coverage
- Debugging complex issues
- Updating documentation
- Researching competitors
- Analyzing customer feedback

---

## Tools & Services

### Open Source Models (Get Access)

**GLM (Zhipu AI)** - Top pick for coding
- Lite: $14/mo (Small repos)
- Pro: $58/mo (Day-to-day) ⭐
- Max: $128/mo (Heavy use)
- [Sign up here](https://z.ai/subscribe?ic=AEJDWIWQK8)

**Kimi (Moonshot AI)** - Research & long context
- Moderato: $15/mo (Basic)
- Allegretto: $31/mo (Pro users)
- Allegro: $79/mo (Premium)
- [Sign up here](https://www.kimi.com/membership/pricing)

### Frontier Models
- **Claude** (Anthropic): [claude.ai](https://claude.ai)
- **GPT** (OpenAI): [openai.com](https://openai.com)

### Benchmarks
- **ArtificialAnalysis.ai**: [artificialanalysis.ai](https://artificialanalysis.ai) - Live model comparisons

### Multi-Agent Frameworks to Explore
- **Poetiq**: [Recursive Self-Improvement Explained](https://poetiq.ai/posts/recursive_self_improvement_coding/) | [ARC Solver Repo](https://github.com/poetiq-ai/poetiq-arc-agi-solver)
- **Microsoft AutoGen**: [github.com/microsoft/autogen](https://github.com/microsoft/autogen)
- **Archon**: [github.com/coleam00/Archon](https://github.com/coleam00/Archon) - Multi-agent orchestration framework
- **Paperclip**: [github.com/paperclipai/paperclip](https://github.com/paperclipai/paperclip) - Prompt version control and testing
- **Agent Zero**: [github.com/agent0ai/agent-zero](https://github.com/agent0ai/agent-zero) - Autonomous AI agent system

### Research & Reading
- **Google Aletheia Paper**: [arxiv.org/html/2602.10177v3](https://arxiv.org/html/2602.10177v3) - Generator → Verifier → Reviser pattern
- **Microsoft MDASH**: [Official Security Blog](https://www.microsoft.com/en-us/security/blog/2026/05/12/defense-at-ai-speed-microsofts-new-multi-model-agentic-security-system-tops-leading-industry-benchmark/) | [Forbes Coverage](https://www.forbes.com/sites/timkeary/2026/05/15/microsoft-mdash-beats-a-key-mythos-benchmark-heres-why-that-matters/)

---

## Prompts to Give Your AI

> **Important**: Multi-agent workflows (HAHA, HAaAH, generator-verifier loops) require special tools or frameworks. A single AI agent can't spawn other agents. Instead, use these prompts to have your AI help you **set up and run** these workflows manually or with tools like Claude Code teams, AutoGen, or Archon.

### To Set Up a HAHA Workflow
> "Set up a workflow where:
> 1. I provide initial requirements and verify the final output
> 2. You generate a first pass
> 3. I review and provide feedback
> 4. You revise based on my feedback
> 5. We iterate until I approve
>
> Work on [TASK] using this pattern."

### To Set Up a HAaAH Double-Hack
> "I want to use a 4-step model workflow for cost efficiency:
> 1. Use a frontier model (Claude/GPT) to plan this task: [TASK]
> 2. Use an open source model (GLM) to implement the plan
> 3. Use the same open source model to verify the implementation
> 4. Use a frontier model to do a final code review
>
> Set up this workflow for me."

### To Create a /goal-style Agent
> "Create an agent that:
> 1. Takes a goal as input: [GOAL]
> 2. Works toward the goal autonomously
> 3. Self-checks if the goal is complete
> 4. Iterates until completion criteria are met
>
> The goal is: [YOUR GOAL]"

### To Build a Generator-Verifier Loop
> "Set up a generator-verifier loop:
> - Generator agent produces output
> - Verifier agent evaluates against criteria
> - Reviser agent improves based on feedback
> - Loop until verifier passes
>
> Apply this to: [YOUR TASK]"

---

## Tonight's Checklist

Before you sleep:
1. **Scan the QR** → Get the Build Lab Kit (all links + templates)
2. **Try /goal** on ONE real task
3. **Check ArtificialAnalysis.ai** for current model rankings
4. **Share one experiment** with someone here

Small experiment. Real task. Tonight.

---

## For Business Owners

### Design Your Own Multi-Agent Workflows

Don't just copy workflows. Learn to design them.

---

#### Start Here

If you run a team, pick one workflow that is:

1. **Repetitive** — It happens every week
2. **Slow or expensive** — It costs real time, money, or attention
3. **Important enough to matter** — Better output would change something
4. **Easy for a human to verify** — A manager, expert, or owner can tell if it worked

Then paste the Workflow Designer Prompt below.

For your first `/goal`, make the task:

1. **Measurable** — The finish line is obvious
2. **Scoped** — Small enough for one focused sprint
3. **Self-served** — AI can complete it without waiting on an outside person or system

---

#### The Design Framework

**1. Identify** — What repetitive work needs automation?
**2. Decompose** — Break it into discrete steps
**3. Assign** — Frontier (thinking) or Open Source (doing)?
**4. Connect** — How does output flow between steps?
**5. Verify** — Where do humans check quality?

**Patterns to choose from:**
- **HAHA** (Human→AI→Human→AI) — Humans at both ends, best for judgment-heavy work
- **HAaAH** (Human→Big→small→small→Big→Human) — Frontier for planning/review, open source for execution

---

#### The Workflow Designer Prompt

Copy this prompt and paste it into Claude or GPT. The AI will guide you through designing your own workflow, one question at a time.

```
I want to design my first multi-agent workflow for my team.

Act as a workflow design consultant. Your job is to help me pick a good first workflow, design it, and turn it into a small pilot we can run this week.

Ask questions ONE AT A TIME. Wait for my answer before asking the next question. If my answer is vague, give me 2-3 examples and ask me to choose.

PHASE 1: Understand the Current State
Start by learning about my situation:
1. What repetitive work does my team do every week?
2. Who currently does this work and how long does it take?
3. Where do mistakes or bottlenecks typically happen?
4. What would success look like for this workflow?
5. How will a human verify the output is good?
6. What assets, documents, templates, or examples already exist?
7. What tools or systems can AI access, and what must stay manual?
8. What channels or platforms are involved?
9. Which parts require a specific human to decide, approve, record, or build trust?

PHASE 2: Decompose the Work
Once you understand my situation, help me:
- Break the work into discrete, sequential steps
- Identify which steps require creative thinking vs. execution
- Flag any steps that require human judgment (domain expertise, compliance, etc.)
- Note any steps that could run in parallel
- Separate AI technical sprints from human real-world handshakes
- If the outcome is bigger than one sprint, break it into a 3-4 week mission with mini-goals

PHASE 3: Assign Models to Steps
For each step, recommend:
- Frontier model (Claude/GPT) for: planning, architecture, complex reasoning, final review
- Open source model (GLM/Kimi) for: execution, implementation, data processing, verification
- Human verification for: quality gates, sensitive decisions, brand voice, compliance
- Manual handoff if we do not have sub-agent tooling yet

PHASE 4: Choose the Pattern
Based on the work, suggest which pattern fits best:
- HAHA (Human→AI→Human→AI): Humans at both ends, best for judgment-heavy work
- HAaAH (Human→Big→small→small→Big→Human): Frontier for planning/review, open source for execution
- Simple loop: Single AI with human verification
- Manual multi-model workflow: Copy outputs between models when tools do not support sub-agents

PHASE 5: Design the Flow
Map out how information flows between steps:
- What output does each step produce?
- What does the next step need as input?
- Where should we cache or store intermediate results?
- What's the verification/feedback loop?

PHASE 6: Implementation Plan
Finally, give me:
- A step-by-step workflow I can implement
- Specific prompts for each step
- How to test this with a small pilot
- Metrics to track to know if it's working
- Risks and failure modes to watch for
- The simplest no-code/manual version of the workflow
- The more automated version if my tools support sub-agents or agent teams

Final output format:
- Workflow name
- Business goal
- Goal type: single sprint or multi-week mission
- Steps
- Model or person assigned to each step
- Human verification points
- Human-only action items
- Copy-paste prompts
- First pilot plan
- Success metrics
- Known risks

Ask me the first question now.
```

**This prompt teaches you WHILE it helps you.** The AI will ask about your specific situation, guide you through the entire design process, and give you a concrete implementation plan by the end.

---

#### Example: How It Works

**AI asks:** "What repetitive work do you want to automate?"
**You say:** "Customer emails about product returns"

**AI asks:** "How is this done currently?"
**You say:** "Support agent reads email, checks return policy, verifies purchase, drafts response"

**AI asks:** "Where do mistakes happen?"
**You say:** "Sometimes agents miss policy updates or give wrong refund amounts"

**AI suggests:** "Here's a HAHA workflow for customer returns:
1. **AI** categorizes email and extracts key info
2. **AI** checks current return policy and verifies purchase
3. **Human** reviews the draft response for accuracy
4. **AI** sends the approved response

Want me to refine this or try a different pattern?"

---

#### Common Workflows to Consider

| Workflow | Suggested Pattern | Why |
|----------|------------------|-----|
| **Customer support triage** | HAHA | AI drafts, human approves for quality |
| **Report generation** | HAaAH | Frontier plans structure, GLM crunches data, human reviews |
| **Code review** | HAaAH | GLM scans, frontier flags issues, human decides |
| **Meeting summaries** | HAHA | AI drafts summary, human checks for accuracy |
| **Documentation updates** | HAHA | AI drafts updates, human verifies technical correctness |

---

#### First Steps

1. **Pick ONE repetitive workflow** your team does
2. **Use the Workflow Designer Prompt** with your AI
3. **Run it as a pilot** with 2-3 people
4. **Measure the difference** — time saved, quality maintained
5. **Expand what works**

---

### This Scales Beyond Your Team

- **Team training on agentic workflows** — Custom workshops for your org
- **Workflow architecture and automation** — Build systems, not just prompts
- **Cost optimization audits** — Find the leaks in your AI spend
- **AI system design** — Multi-agent systems for your specific workflows

**Talk to me after** if you're running a business and want to scale these patterns.

---

## Key Takeaways

1. **Systems > Scale** - Architecture beats model size
2. **Use both** - Frontier for thinking, open source for doing
3. **Cache aggressively** - Cached input is 40× cheaper than output
4. **Human-in-the-loop** - U + AI beats AI alone
5. **Start simple** - /goal is your entry point

---

*You don't need bigger models. You need better systems.*

**#IntelligencePerDollar**

---

## Resources

- **Build Lab Companion Guide**: https://allenix.com/resources/build-lab-kit
- **ArtificialAnalysis.ai**: https://artificialanalysis.ai
- **Poetiq**: https://github.com/poetiq-ai/poetiq-arc-agi-solver
- **GLM (Zhipu AI)**: https://z.ai/subscribe?ic=AEJDWIWQK8
- **Kimi (Moonshot AI)**: https://www.kimi.com/membership/pricing
- **Microsoft AutoGen**: https://github.com/microsoft/autogen
- **Archon**: https://github.com/coleam00/Archon
- **Paperclip**: https://github.com/paperclipai/paperclip
- **Agent Zero**: https://github.com/agent0ai/agent-zero

*All links and pricing current as of May 2026. Models change fast - always verify.*

---

## Troubleshooting

**"The open source model isn't following instructions well"**
- Be more explicit in the planning phase (frontier model)
- Break complex tasks into smaller chunks
- Use examples in your prompts

**"Cost is still higher than expected"**
- Check if you're caching repeated context
- Use smaller models for verification steps
- Review if you're over-using frontier for simple tasks

**"Results are inconsistent"**
- Add a human verification step
- Use the /goal pattern to define clear completion criteria
- Build a generator-verifier loop

**"Not sure which model to use"**
- Check ArtificialAnalysis.ai first
- Start with GLM for coding, Kimi for research
- Use frontier for planning and final review only

---

## Making Multi-Agent Workflows Real

The patterns in this guide (HAHA, HAaAH, generator-verifier) work best when you can split roles across models or agents. But you do **not** need a full framework to start.

If your tool supports sub-agents or agent teams, use that. If not, run the same workflow manually by copying outputs between models. The pattern matters more than the tooling.

### Option 1: Manual Multi-Model Workflow (Easiest)
Works with any chat tools:
1. Ask a frontier model to plan the task
2. Copy the plan into GLM/Kimi/another lower-cost model for execution
3. Ask that model, or a second low-cost model, to verify the output
4. Bring the result back to a frontier model or human expert for review

### Option 2: Use Tools With Sub-Agents or Agent Teams
If your coding assistant or workflow tool supports sub-agents, assign clear roles:
- Planner
- Executor
- Verifier
- Reviewer

### Option 3: Download Working Examples
**Poetiq ARC Solver** - A real multi-agent system that solves AGI benchmarks:
```bash
git clone https://github.com/poetiq-ai/poetiq-arc-agi-solver
cd poetiq-arc-agi-solver
# Read their implementation of generator-verifier loops
```

### Option 4: Use Multi-Agent Frameworks
- **AutoGen** (Microsoft): `pip install pyautogen`
- **Archon Framework**: In the Allenix repo - designed for agent teams
- **LangGraph**: For building multi-agent workflows

### Option 5: Single-Agent Iteration (Works with Any AI)
Even without special tools, you can approximate these patterns:
1. **Generate**: Ask AI to produce first pass
2. **Verify**: Ask "What's wrong with this? Check against [criteria]"
3. **Revise**: Ask "Fix the issues you identified"
4. **Repeat** until satisfied

This captures 80% of the benefit with 0% of the framework complexity.
