Agent Wealth HubFree public resources
中文 EN العربية

Back to catalog / Agent workflows

Compare context and tool-cost optimization on benchmark cases

Compare lean context, selective retrieval, subagents, and batching under the same quality threshold.

Goal

Goal: Compare lean context, selective retrieval, subagents, and batching under the same quality threshold.

Steps

  1. Use the cookbook’s synthetic claims and labeled expected outcomes as a fixed set; run a full-context baseline first. [cost-opt]
  2. Measure deferred tool_search, on-demand manual reads, isolated subagents, and Message Batches; change one cost lever at a time. [cost-opt]
  3. Record accuracy, calls, input tokens, and API cost; adopt a cheaper design only if accuracy meets baseline. [cost-opt]

How to verify

Each design is compared on the same cases; cost falls while accuracy stays above the chosen threshold.

Troubleshooting

Review disagreements as possible regressions; do not claim savings or unchanged quality from a single sample.

Permissions

Prerequisites

Permissions

Limitations

The optimizations are specific to synthetic insurance tasks; prices, caching, models, and tools change, so rerun on your own workload.

Pinned upstream source

https://github.com/anthropics/anthropic-cookbook/blob/9c1e493ddd2b82df399d2a61b9c806c539e18be6/cost_optimization/cost_optimization.ipynb

Repository
anthropics/anthropic-cookbook
File path
cost_optimization/cost_optimization.ipynb
Pinned commit
9c1e493ddd2b82df399d2a61b9c806c539e18be6
Source checked
2026-10-14 · Reviewed against the pinned upstream source

Repository metrics

These values describe the upstream repository, not popularity or likes for an individual skill or playbook.

Stars
Not collected
Forks
Not collected
Observed at
Not collected

No metrics snapshot is available yet.

License: MIT

Main topic

Turn ecommerce campaign materials into a reviewable weekly brief

Related resources