AIAny

Executable Code Actions Elicit Better LLM Agents

Lets language-model agents compose tools through executable Python and revise actions from interpreter feedback. Evaluates 17 models and releases 7,000 interaction trajectories for training agents that can debug their own code.

Introduction

An agent can know which tools to call yet struggle to combine their outputs. The central insight is to make action composition part of the language itself: variables, loops, and conditionals carry work that would otherwise require repeated model turns. Interpreter feedback then makes failed actions repairable.

Key Findings
  • Across 17 models, code actions are competitive on atomic API calls; the larger benefit appears when tasks require multiple tools and dependent steps.
  • On the 82-task M³ToolEval benchmark, the authors report gains of up to about 20 percentage points and up to 30% fewer actions, linking composability to fewer interactions.
  • About 7,000 CodeActInstruct trajectories teach interaction and self-debugging. Fine-tuned Llama-2 and Mistral agents improve agent tasks without sacrificing the general capabilities measured in the paper.
Who Should Read It

Great fit if you are choosing an action interface for tool-using agents or collecting interactive training data. Look elsewhere if you need proof that code always beats structured calls: results vary by model, the main benchmark has 82 tasks, and executing generated code requires careful sandboxing.

Information

  • Websitearxiv.org
  • OrganizationsUniversity of Illinois Urbana-Champaign, Apple
  • AuthorsXingyao Wang, Yangyi Chen, Lifan Yuan, Yizhe Zhang, Yunzhu Li, Hao Peng, Heng Ji
  • Published date2024/02/01

More Items

Breaks hard reasoning problems into simpler subproblems, then solves them using earlier answers. With 14 exemplars, code-davinci-002 reaches at least 99% accuracy on SCAN splits, including the length split.

Distills reusable reasoning strategies from successful and failed agent runs. Retrieved lessons guide later tasks, while memory-aware test-time scaling turns extra exploration into better memories.

Turns successful web-agent trajectories into executable, verified Python skills that expand the action space. On WebArena, success reaches 40.4%, versus 32.7% for a static agent and 36.3% for textual skills.