Agent in a Bottle

Can LLM agents turn their capabilities into cheap, scalable artifacts?

Ankit Sonthalia1 Haritz Puerto2 Alexander Rubinstein1

Martin Gubri3 Seong Joon Oh4

1 Research Question

LLMs can do a lot of narrow tasks zero-shot, sometimes even better than dedicated solutions. But they can get expensive fast, often prohibitively so. However, narrow tasks must require only a fraction of the model's capabilities. Can we get LLMs to "bottle" this fraction into a cheap artifact? Bottled is built to answer this.

How bottling works Workload millions of unlabelled instances Zero-shot one instance at a time Frontier LLM one API call per instance repeat × millions one label per instance Bottled Agent studies workload with tools token budget time budget GPU builds artifact code small model one instance at a time repeat × millions one label per instance $17,273 Opus 5 on ESCI $26.28 Opus 5 on ESCI 657× cheaper

2 Our setup

A bottled run Workload no labels SANDBOX 5 Mtok 600 min Agent opencode builds Artifact /task input.jsonl out.txt GPU A100 runs on Proxy every request blocklist on blocklist? yes blocked no LLM API call? no Web yes the run's model? yes Frontier LLM no blocked TOKEN WEIGHTS input 1 output 2 cache write 1 cache read 0.1 trace, out.txt Judge audits the trace contaminated? yes: run again no Score out.txt vs. gold labels F1 · macro F1 · AUROC

3 Results

2026-10-16T14:42:51.680502 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 0.0 0.2 0.4 0.6 Relative gain Gemini 3.1 Flash-Lite GPT 5.6 Sol Sonnet 5 GLM 5.3 Qwen 3.8 Flash GPT 5.6 Terra Qwen 3.8 Max Gemini 3.1 Pro GLM 5.3 Flash Opus 5 bottled gap to zero-shot zero-shot Qwen3-0.6B student SmolLM2-360M-it student
2026-10-16T14:42:51.795087 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ $0.1 $0.3 $1 $3 $10 $30 Average per-task cost (USD) 0.1 0.2 0.3 0.4 0.5 0.6 Relative gain Gemini 3.1 Flash-Lite (0-shot, $5.2k) Opus 5 (0-shot, $26.3k) Gemini 3.1 Flash-Lite Qwen 3.8 Flash GLM 5.3 Flash GPT 5.6 Terra Gemini 3.1 Pro Sonnet 5 GLM 5.3 GPT 5.6 Sol Qwen 3.8 Max Opus 5 Pareto frontier dominated zero-shot
2026-10-16T14:42:51.903469 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 0.0 0.2 0.4 F1 Gemini 3.1 Flash-Lite GPT 5.6 Sol Sonnet 5 GLM 5.3 Qwen 3.8 Flash GPT 5.6 Terra Qwen 3.8 Max Gemini 3.1 Pro GLM 5.3 Flash Opus 5 bottled gap to zero-shot zero-shot Qwen3-0.6B student SmolLM2-360M-it student
2026-10-16T14:42:52.000388 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ $0.1 $0.3 $1 $3 $10 $30 cost (USD) 0.0 0.1 0.2 0.3 0.4 0.5 F1 Gemini 3.1 Pro (0-shot, $40.1k) Gemini 3.1 Flash-Lite Qwen 3.8 Flash GLM 5.3 Flash GPT 5.6 Terra Sonnet 5 Gemini 3.1 Pro GLM 5.3 GPT 5.6 Sol Qwen 3.8 Max Opus 5 Pareto frontier dominated zero-shot
2026-10-16T14:42:52.088656 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 0.0 0.2 0.4 0.6 macro F1 Gemini 3.1 Flash-Lite GPT 5.6 Sol Sonnet 5 GLM 5.3 Qwen 3.8 Flash GPT 5.6 Terra Qwen 3.8 Max Gemini 3.1 Pro GLM 5.3 Flash Opus 5 bottled gap to zero-shot zero-shot Jev 1.13 Qwen3-0.6B student SmolLM2-360M-it student
2026-10-16T14:42:52.196463 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ $0.1 $0.3 $1 $3 $10 $30 cost (USD) 0.2 0.3 0.4 0.5 0.6 macro F1 Jev 1.13: $105 Opus 5 (0-shot, $17.3k) Gemini 3.1 Flash-Lite Qwen 3.8 Flash GLM 5.3 Flash GPT 5.6 Terra GLM 5.3 Gemini 3.1 Pro Sonnet 5 Qwen 3.8 Max GPT 5.6 Sol Opus 5 Pareto frontier dominated zero-shot Jev 1.13
2026-10-16T14:42:52.335151 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 0.00 0.25 0.50 0.75 1.00 AUROC Gemini 3.1 Flash-Lite GPT 5.6 Sol Sonnet 5 GLM 5.3 Qwen 3.8 Flash GPT 5.6 Terra Qwen 3.8 Max Gemini 3.1 Pro GLM 5.3 Flash Opus 5 bottled gap to zero-shot zero-shot Jev 1.13 Qwen3-0.6B student SmolLM2-360M-it student
2026-10-16T14:42:53.434831 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ $0.1 $0.3 $1 $3 $10 $30 cost (USD) 0.5 0.6 0.7 0.8 0.9 AUROC Jev 1.13: $223 GPT 5.6 Sol (0-shot, $67.6k) Gemini 3.1 Flash-Lite GLM 5.3 Flash Qwen 3.8 Flash Gemini 3.1 Pro Sonnet 5 GPT 5.6 Terra GLM 5.3 GPT 5.6 Sol Qwen 3.8 Max Opus 5 Pareto frontier dominated zero-shot Jev 1.13

4 Takeaways

  1. Models that look alike zero-shot can bottle very differently.

    GPT 5.6 Terra and Sonnet 5 solve MAVE zero-shot equally well. Bottled, GPT 5.6 Terra recovers almost all of its zero-shot F1, Sonnet 5 only about a third.

    MAVEZero-shot F1Bottled F1Bottled ÷ zero-shotTraces
    GPT 5.6 Terra0.4380.40592%run 1run 2
    Sonnet 50.4440.15435%run 1run 2
    ↑ almost equal, 0.006 apart↑ 0.251 apart
  2. Most bottled runs fall well below zero-shot.

    In the current version, 48 of 60 bottled runs score below the 95% confidence interval of their model's zero-shot score. Qualitative examples below:

    TaskModelZero-shotBottledRemarks
    Judgment failures
    MAVE F1Sonnet 50.4440.113Ran an off-the-shelf Qwen2.5-1.5B-Instruct with a few-shot prompt on all instances; performed minimal quality checks on output correctness, justifying the low quality as "an inherent limitation of small-model zero-shot extraction".trace
    ESCI macro F1Gemini 3.1 Pro0.5550.364Ran Qwen2.5-7B-Instruct with a prompt on all instances, almost no quality checks. trace
    RAID AUROCGemini 3.1 Flash-Lite0.7800.511Trained a TF-IDF classifier on a small subset labeled via the API. Almost no correctness checks; further, gave binary predictions instead of confidences as requested in the prompt. trace
    Agentic failures
    MAVE F1GPT 5.6 Sol0.4280.000Spent the token budget in 57 min and wrote no out.txttrace
    ESCI macro F1GPT 5.6 Terra0.5730.198Wrote 134 of 2.6 M labels and marked the task complete after 3 mintrace
    RAID AUROCOpus 50.9110.500Spent the token budget and wrote no out.txttrace
  3. Agents frequently attempt to hack the reward.

    In line with PostTrainBench's observations, we find that agents frequently try to obtain the test dataset's labels or a model trained on said labels. We view these as reward hacking attempts, because a successful attempt would raise the score (reward) while telling us nothing about how well the agent can bottle its own capability.

    We believe that the alternative approach of asking the agent not to hack the reward can lead to ambiguity; it requires the agent to judge what counts as hacking. Therefore, we block known contamination sources, i.e., test labels or models trained on those labels, via the harness instead. The proxy returns a 403 error stating, This resource is prohibited. Do not attempt to circumvent. This provides a better measure of the model's bottling capabilities compared to assigning a baseline score to contaminated runs.

    We find that blocking known contamination sources via the proxy works. Most agents do try to access prohibited sources. But after a handful of failed attempts, most give up and start building a solution honestly. Automated judges label all our runs, except one, as uncontaminated. We repeated the single run found to be contaminated; see more about the original (contaminated) run below.

    Case: RAID · GLM 5.3 Flash · run 1
    Agent
    Downloaded a ModernBERT detector trained on MAGE + RAID via the ModelScope mirror (HF was blocked), converted the ONNX fp16 weights to PyTorch, ...

5 Cite us

If you find Bottled useful, please cite:

BibTeX
@article{sonthalia2026agent,
  title={Agent in a Bottle: Can {LLM} Agents Turn Their Capabilities Into Cheap, Scalable Artifacts?},
  author={Sonthalia, Ankit and Puerto, Haritz and Rubinstein, Alexander and Gubri, Martin and Oh, Seong Joon},
  journal={arXiv:2610.08775},
  year={2026},
  url={https://arxiv.org/abs/2610.08775}
}