NeFut Logo NeFut
中 Admin Login

[CS.AI] Up and Down the Abstraction Ladder: Code-Based Skills for Language Agents

Published at: 2026-09-28 22:00 Last updated: 2026-09-30 01:41
#algorithm #AI #Machine Learning

Language agents often struggle to act and learn in environments that require long sequences of low‑level actions. Code‑based abstractions improve productivity by letting the model invoke reusable skills; the code handles recurring local decisions while the language model decides which skills to use and how to combine them.

Abstractions are leaky, and situations beyond a skill’s capability still require a fallback to primitive actions. Motivated by this trade‑off between productivity and flexibility, we systematically study how code‑based action abstraction impacts performance, inference cost, and learning of language agents.

We conduct experiments in NetHack, a challenging long‑horizon game, using our CodeHack library that provides code‑based skills with natural‑language descriptions. Agents are compared across three configurations: primitives only, semantic skills only, and a hybrid of skills plus primitives.

Evaluation is performed under zero‑shot prompting, supervised fine‑tuning, and reinforcement learning. In zero‑shot tests, skill‑based agents achieve nearly three times the game progression of primitive‑only agents while reducing per‑episode inference cost by about 86%. Combining skills with primitives retains most of this benefit and preserves a path back to low‑level actions.

In reinforcement learning, skill‑based agents learn dramatically faster, attaining roughly a 7.2× larger average gain in dungeon level under the same training budget. These results demonstrate that a supplied skill library can improve performance, efficiency, and learning speed, while retaining primitives provides flexibility when the library is insufficient.

We release CodeHack together with the training and evaluation code.

Review

Original Source: https://arxiv.org/abs/2609.31076

[h] Back to Home