Mahal Systems

Overview › 6Topologies

Topologies

6 optimizations in 3 sub-categories.

a.Escalating

Escalate from cheap to capable models

  1. i.

    Oracle-worker multi-model

    Let a cheap model do the work and call an expensive one only when a trigger fires: a cascade escalates when the cheap answer looks unreliable or fails a check, a router picks the model before the call, and an advisor tool lets a cheap agent consult a stronger model mid-task.

    Better governanceMixed qualityMixed costMixed performance

    Tier 4 · restructuring · changes model · any agent · 6 sources, 5 measured

See also

  1. 9.c.iii

    Audit a verifier-gated cascade against a gold sample the verifier never sees

    When a cheap model's outputs are accepted or escalated by a verifier, measure true error on a small gold-labeled sample outside the verifier: metrics measured through the verifier showed about 3% error while true error was 14-32%.

    Verification › Sizing verification

    Better qualityHigher cost

    Tier 4 · restructuring · changes control flow, model · any agent · 13 sources, 13 measured

b.Parallelizing

Decompose work across parallel agents

  1. i.

    Parallel tool execution for read-only calls

    Let the model put several independent read-only tool calls (searches, fetches, file reads) in one turn and have the harness run them at once, while calls that write, share state or need another call's result run one at a time in the order the model emitted them.

    Lower costFasterMixed quality

    Tier 3 · tuning · changes control flow · any agent · 6 sources, 3 measured

  2. ii.

    LLM map-reduce

    Give each piece of a large or untrusted input its own tool-less model call that sees only that piece and must answer in a fixed schema, then combine the answers in code or in a reducer that never sees the raw text.

    More secureBetter governanceMixed qualityMixed costMixed performance

    Tier 2 · reliability · changes control flow · any agent · 6 sources, 4 measured

  3. iii.

    Use multi-agent orchestration only for breadth-first, independent sub-tasks

    Spawn parallel sub-agents when the work splits into independent, breadth-first parts with little shared context; expect about 15x the tokens of a chat and up to 90% less wall-clock.

    FasterMixed qualityHigher cost

    Tier 4 · restructuring · changes control flow, context · any agent · 22 sources, 7 measured

c.Separating privileges

Separate roles by trust and privilege

  1. i.

    Code-then-execute (CaMeL)

    Have a privileged model turn the trusted request into a small program before any untrusted data is read, then run it in an interpreter that labels every value with where it came from and checks a per-tool policy before each call, so injected text can neither add actions nor send private data to the wrong place.

    More secureBetter governanceMixed costLower qualitySlower

    Tier 4 · restructuring · changes guardrails · any agent · 7 sources, 5 measured

  2. ii.

    Plan-then-execute

    Have the agent fix its tool calls (an ordered list or a dependency graph) from the trusted request before it reads any tool output, and let a controller execute only those calls, so injected text cannot add an action.

    More secureBetter governanceBetter for brandMixed qualityMixed costSlower

    Tier 4 · restructuring · changes guardrails, control flow · any agent · 6 sources, 4 measured

Before you go...

Build better agents, weekly

Our latest research, performance benchmarks, optimization strategies, and updates around AOT development.

One email a week, nothing else. Unsubscribe anytime.