atlas

Research map / Multi-agent systems and games / LLM agents

Executable Code Actions Elicit Better LLM Agents

ICML 2024 · Multi-agent systems and games › LLM agents · approach: LLM multi-agent decision making · 10 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes CodeAct, which has LLM agents act by emitting executable Python code in a Python interpreter with multi-turn feedback, and builds CodeActInstruct (7k trajectories) to fine-tune open-source CodeActAgent models from Llama-2 and Mistral 7B.

Problem

LLM agents usually emit actions as JSON or text in predefined formats, which limits the action space to pre-defined tools and restricts composition (no control or data flow), and open-source models are weak at tool use.

Approach

Use executable Python code as the unified action space for LLM agents, executed in an interpreter so that agents can use existing packages, compose tools with control and data flow, and self-debug from execution feedback over multiple turns; then instruction-tune open models on filtered multi-turn code-action trajectories.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use CodeAct instead of text actionsGPT-4-1106-preview · M³ToolEvalsuccess rate (%): 53.7 -> 74.4Helped
Use CodeAct instead of text actionsGPT-4-1106-preview · M³ToolEvalavg. turns: 7.7 -> 5.5Helped
Use CodeAct instead of text actionsLlama-2-7B-chat · API-Bank level-1correctness (%): 25.8 -> 28.8Helped
Add CodeActInstruct to fine-tuning data (ablation)CodeActAgent (LLaMA-2) · MINT (ID)success rate: 17.0 -> 51.3Helped
Add CodeActInstruct to fine-tuning data (ablation)CodeActAgent (LLaMA-2) · MINT (OD)success rate: 15.5 -> 20.4Helped
Add CodeActInstruct to fine-tuning data (ablation)CodeActAgent (Mistral) · MINT (ID)success rate: 32.9 -> 57.4Helped
Add CodeActInstruct to fine-tuning data (ablation)CodeActAgent (Mistral) · MINT (OD)success rate: 23.0 -> 32.4Helped
Add general conversation data to fine-tuning (ablation)CodeActAgent (LLaMA-2) · Miniwob++ (OD)success rate: 0.0 -> 25.5Helped
Add general conversation data to fine-tuning (ablation)CodeActAgent (Mistral) · GSM8K (OD)score: 26.8 -> 58.0Helped
Add general conversation data to fine-tuning (ablation)CodeActAgent (LLaMA-2) · MINT (ID)success rate: 29.2 -> 51.3Helped
Add general conversation data to fine-tuning (ablation)CodeActAgent (Mistral) · MINT (ID)success rate: 50.5 -> 57.4Helped
Add CodeActInstruct to fine-tuning data (ablation)CodeActAgent (Mistral) · GSM8K (OD)score: 59.5 -> 58.0No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: CodeActInstruct HotpotQA MATH APPS WikiTableQuestions ALFWorld OpenOrca ShareGPT Capybara API-Bank

Benchmarks: API-Bank M3ToolEval MINT MiniWob++ SciWorld MMLU HumanEval GSM8K MT-Bench

Metrics: correctness success rate average turns accuracy pass rate MT-Bench score

Baselines: JSON action Text action AgentLM-7B FireAct Llama2 Chat Mistral Instruct gpt-3.5-turbo-0613 gpt-4-0613

Builds on: MINT ReAct FireAct AgentInstruct ToolBench

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy