Manuscript Offprint

arXiv:2610.27327

Unsupervised Tool Evolution for Coding Agents in Data-Lake Analytics

Yuqing Yang, Yurong Liu, Deqing Fu, Manav Garg, Sravan Babu Bodapati, Fatma Ozcan, Alon Y. Halevy, Jiani Zhang

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

Yuqing Yang 1,†^{1,\dagger}, Yurong Liu 2,3^{2,3}, Deqing Fu 1,2^{1,2}, Manav Garg 2^{2}, Sravan Babu Bodapati 2^{2}, Fatma Ozcan 2^{2}, Alon Y. Halevy 2^{2} and Jiani Zhang 2^{2}

1^{1}University of Southern California, 2^{2}Google, 3^{3}New York University

Coding agents can answer analytical questions over a data lake by discovering, cleaning, and joining the relevant data. However, they discard this work after each question and redo it from scratch for the next one. Tool evolution, which automatically builds and refines reusable tools across tasks, is a natural fit for this repetition. Since a ground-truth label for a data-lake question requires an expert to solve it first, we consider the unsupervised setting. We propose TEAL (Tool Evolution for Analytics over data Lakes), which evolves a library of tools and usage skills for a given Worker agent without labels. Two agents propose tools from complementary evidence, an Explorer from the data lake itself and a Critic from Worker trajectories. A proposed change is kept only if the Worker adopts the tool on a rerun without extra steps and any changed answer is supported by trajectory evidence. We also introduce TEAL-Q, which generates synthetic questions for tool evolution when real ones are unavailable. We evaluate on KramaBench and LakeQA with four Worker LLMs under step budgets, which cap the number of steps the Worker may take per question. With a tight budget of 10 or 15 steps, TEAL improves every Worker on both benchmarks, lifting Sonnet-5 at 15 steps by 9.3 points on KramaBench and 21.7 points on LakeQA. A tighter budget also yields better feedback for evolution. For example, Sonnet-5's LakeQA library evolved at 20 steps and deployed unchanged at 30 steps scores 68.3, above both the baseline (59.6) and a library evolved directly at 30 steps (64.2). Additionally, a library evolved on synthetic questions performs comparably to one evolved on real questions. These results show that useful tools can be evolved without labels, and hopefully inspire future work on what to evolve and how to obtain feedback in unsupervised agent evolution.

1. Introduction

A data lake (Hai et al., 2023; Nargesian et al., 2019) stores a large, heterogeneous collection of tables, documents, and raw files. Answering analytical questions over a data lake requires discovering relevant data (Castelo et al., 2021; Fernandez et al., 2018), transforming messy records into structured representations (Kandel et al., 2011; Li et al., 2023), and integrating data across sources (Freire et al., 2025; Zhang et al., 2026b). Coding agents equipped with a bash shell and a file editor (Wang et al., 2024a, 2025) can automate this workflow (Fernandez et al., 2023; Narayan et al., 2022). However, they typically treat each question over the same data lake in isolation and discard every parser, schema check, and join script as soon as the question ends.

Consider an analyst asking which metropolitan area accounts for the largest proportion of its state's fraud reports (Lai et al., 2026). The answer lies in 52 per-state CSV files of metropolitan-area counts with irregular headers, hidden among the data lake's thousands of files next to similar national and state summaries. Without a catalog or index, table granularity cannot be inferred from filenames, so a coding agent may pick a national summary table that lacks state breakdowns. Even when the agent locates the 52 state files, opening and cleaning them one by one exhausts a 30-step budget and fails sooner under a 15-step budget. When the next question comes, the agent repeats the same manual exploration and cleaning from scratch.

†^{\dagger}Work done while interning at Google.

Emails: yyang063@usc.edu, jianizhang@google.com

© 2026 Google. All rights reserved

Database systems avoid repeated scans of raw data by maintaining catalogs (Halevy et al., 2016), indexes (Graefe, 2024), and views (Halevy, 2001). Coding agents can follow the same principle with reusable tools that replace repeated step-by-step exploration with a single call. Some of these tools are backed by precomputed data artifacts, such as catalogs and indexes, and usage skills tell the agent when and how to invoke each tool.

However, existing methods cannot automatically generate such tools, for two reasons. First, catalog and ontology formats (Zhang et al., 2026a) store descriptive metadata rather than executable tools for cleaning and querying data, whereas code tool generators (Li et al., 2026; Wang et al., 2024b) build tools for the task at hand, not artifacts that pay off only across many questions. Second, supervised tool generators (Cai et al., 2024) and self-evolving ontologies (Chong et al., 2026) rely on ground-truth validation labels, which are costly to obtain in data-lake analytics because verifying even one answer requires an expert to manually discover, clean, and join the underlying data sets first. Without ground-truth labels, keeping every tool that runs without a runtime error (Li et al., 2026) is unreliable because a tool can execute cleanly while reading a table at the wrong granularity, dropping rows during parsing, or joining tables on unaligned keys.

To address these challenges, we introduce TEAL (Tool Evolution for Analytics over data Lakes), an unsupervised framework that evolves a library for a fixed Worker agent. The library consists of executable tools, some backed by precomputed data artifacts, and usage skills. At test time, the library is frozen and provided to the Worker to answer new questions.

References (46)