Manuscript Offprint

arXiv:2610.33817

EnvLunch: The Environment as a Free Lunch for Learning to Interact

Wei Liu, Min Gao, Yali Du, Yulan He

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Wei Liu♠✉, Min Gao♢, Yali Du♣, Yulan He♣✉

♠King's College London ♢Chongqing University ♣The Alan Turing Institute

Abstract. For agentic data analysis, language-model agents often require a large number of annotated tasks to learn how to interact effectively with executable environments (i.e., databases). While high-quality annotated tasks require heavy manual effort, an executable environment already provides rich interaction structure and verifiable outcomes. In this sense, the environment itself offers a free lunch, an additional set of verifiable tasks that require no human annotation. We propose EnvLunch, a warm-up stage that turns this environmental signal into agent training without human-written or model-generated task descriptions, before downstream agentic reinforcement learning. EnvLunch samples valid action trajectories, executes them to obtain final observations, and trains an agent to recover a functionally equivalent trajectory given only its final observation. This label-free warm-up enables the model to outperform the baseline by over 9% on average across all downstream training budgets, and with few labels, the baseline needs 8 to 32 times as many annotated examples to match the accuracy that the EnvLunch model reaches at its smallest training budget. Letting the environment alone define the task yields a larger gain than having the model write its own tasks over the same environments, and this warm-up also improves fine-tuning on benchmarks beyond data analysis. EnvLunch therefore saves annotated tasks and provides a better starting point for fine-tuning agentic models when such tasks are limited.

Correspondence: {wei.4.liu, yulan.he}@kcl.ac.uk

KINGS LONDON

The Alan Turing Institute

Figure

Figure 1: Label-efficiency curves for agentic data analysis. The top row shows the 9B model and the bottom row the 4B model, with one benchmark per column. The x-axis is the number of annotated examples on a log scale, and 0 denotes evaluation without downstream fine-tuning. Lines show the mean over three runs, and shaded bands span the corresponding min–max. The green areas between the lines are the gain from the warm-up; red regions indicate the reverse.

1 INTRODUCTION

Language model agents can interact with databases to perform long-horizon and complex data querying, analysis, and report generation (Zhang et al., 2024; Grijalba et al., 2024; Wu et al., 2025;

Code and data: https://github.com/thinkwee/EnvLunch

Lei et al., 2025), a setting we refer to as agentic data analysis. Training agents to acquire such capabilities currently relies heavily on either large-scale collections of human-annotated verifiable tasks for reinforcement learning (Bai et al., 2024; Jin et al., 2025; Xi et al., 2026; Ma et al., 2025; Zhang et al., 2026a), or long-horizon trajectories distilled from much larger models (Sun et al., 2025; Su et al., 2025; Tongyi DeepResearch Team, 2025). Both approaches require substantial human effort and careful data curation (Huang et al., 2025).

Yet agentic training has an abundant source of supervision that is often underused, which is the executable environment itself (Yu et al., 2018; Li et al., 2023; Lei et al., 2025). In data analysis, databases and tables expose rich state and action spaces, while execution provides an automatic signal for the outcome of an action sequence (Tran et al., 2009; 2014; Wang et al., 2017; Silver & Sutton, 2025; Yao, 2025; Xi et al., 2025; Liu et al., 2026b; Meta PyTorch and Hugging Face, 2026). Existing methods partly reduce annotation costs by synthesising tasks with LLMs or human-defined templates, but still require these environments to be converted into explicit questions or task statements (Sun et al., 2025; Zhou et al., 2025; Stojanovski et al., 2025). We ask whether this step is necessary at all: can an agent learn to interact effectively by learning directly from information inherent in the environment? Any executable trajectory in an environment could expose the interaction process, providing signals for interaction behaviours such as recovering from failures or exploring the environment over long-horizon interactions. Such trajectories form an additional set of verifiable tasks without human annotation, which we call the free lunch of the environment.

Therefore, we propose EnvLunch, an environment-driven warm-up stage that runs before downstream agentic reinforcement learning. EnvLunch randomly composes valid actions into an executable trajectory, executes it to obtain a final observation, and trains the agent to recover a trajectory that could have produced that observation. Intuitively, this is like placing a target at a random location in a maze and training the agent to navigate to it: the target need not correspond to a meaningful downstream question, as long as reaching it requires effective interaction with the environment. To prevent the agent from simply copying the target observation, we create multiple perturbed copies of the original environment and execute the recovered trajectory in each, and agreement across these counterfactual environments determines the reward. EnvLunch requires no human or model annotation, is fully verifiable, and is lightweight, taking 20 minutes on CPU to construct 1600 warm-up tasks compared with more than 4 hours for model-based task synthesis.

We validate EnvLunch on Qwen3.5-4B and Qwen3.5-9B across six agentic data-analysis tasks. Averaged across different training budgets, EnvLunch improves accuracy by 9.6% at 4B and 9.3% at 9B, with the largest gains when labels are scarce, where the baseline requires 8–32× as many labelled examples to match the accuracy reached by the EnvLunch model at its smallest training budget. Environment-driven warm-up also yields larger gains than reinforcement learning on tasks that the model synthesises over the same environments. Across seven additional agentic tasks spanning text-to-SQL, question answering, software use, and embodied interaction, EnvLunch also improves downstream performance, despite using warm-up environments disjoint from the evaluation tasks. Finally, in a constructed environment where uncertainty can be computed exactly, EnvLunch produces the largest reduction in uncertainty about the environment, providing evidence that learning to interact contributes to the downstream gains.

Our contributions are threefold. First, we show that an executable environment alone can define verifiable agentic tasks without any annotation. Second, we propose EnvLunch, a warm-up stage for agents to learn from the environment without human annotation. Third, across two model scales and thirteen benchmarks, we show that EnvLunch substantially reduces the annotated examples needed for downstream agentic reinforcement learning, which suggests that executable environments contain useful training signals that can be extracted without first specifying the meaningful tasks. EnvLunch provides a preliminary step towards agentic training that learns directly from environments.

References (100)

Couldn't load all references. Reload the page to try again.