Unsupervised Tool Evolution for Coding Agents in Data-Lake Analytics
Organizations: University of Southern California · Google · New York University
Abstract
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.
Figures & tables
| KramaBench | ||
|---|---|---|
| DS-Guru | 39.73 | |
| Smolagents | 46.69 | |
| [2pt/2pt] Baseline | ||
| ISE | – | |
| TEAL | ||
| KramaBench | LakeQA | |||
|---|---|---|---|---|
| Acc. | Acc. | |||
| Baseline | – | – | ||
| TEAL (real questions) | +9.31 | +21.67 | ||
| TEAL (synthetic questions) | +8.95 | +20.42 | ||
| KramaBench | |||
|---|---|---|---|
| Acc. | |||
| Baseline | – | ||
| TEAL | +9.31 | ||
| Explorer | +8.36 | ||
| Evolved skills | +5.46 | ||
| [2pt/2pt] Ground-truth answers | +9.50 | ||
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Tool | Coverage | Role | What it does |
|---|---|---|---|
| resolve_concept_to_datasets | 55.3% | concept lookup | Maps a natural-language concept or a few keywords to the lake files that hold the corresponding measurements. |
| locate_field_in_lake | 39.6% | field search | Finds every file, sheet, and column in which a query string appears as a header or a cell value, including inside Excel workbooks that grep cannot read. |
| catalog_data_lake | 37.7% | enumeration | Lists the files under a lake root, following symlinks and optionally filtered by substring, glob, or regex, with a one-line schema per file. |
| load_report_csv | 36.5% | CSV loading | Loads one or more report-style CSVs in one call, detecting stacked data sections separated by title rows and blank rows. |
| inspect_excel_workbook | 13.8% | workbook loading | Lists every sheet of a workbook with its shape and detected header row, or loads one sheet as a clean typed table. |
| Tool | Coverage | Role | What it does |
|---|---|---|---|
| query_lake_catalog | 97.1% | metadata lookup | Answers where a dataset is, which columns and format it has, how big it is, what its known traps are, or which sibling files it has, from a pre-built SQLite catalog of the lake. |
| aggregate_over_files | 82.1% | streaming compute | Runs one filter, count, distinct, projection, group-by, or aggregate over a large delimited file or a union of sibling files through DuckDB, without loading the file into memory. |
| preview_candidate_columns | 40.4% | schema preview | Shows the columns of a set of candidate files given as paths, a glob, or a dataset slug. |
| resolve_filter_values | 32.9% | value matching | Maps a fuzzy category term to the exact distinct values stored in a column, with the row count of each value. |
| search_lake_content | 30.8% | full-text search | Finds which dataset, file, or column contains a keyword, phrase, or value through a pre-built full-text index over dataset names and column headers. |
| Worker | Uncached input | Cached input | Output |
|---|---|---|---|
| Sonnet-5 | 2.50 | 0.20 | 10.00 |
| Opus-4.8 | 6.25 | 0.50 | 25.00 |
| Gemini-3.1-Pro | 2.00 | 0.20 | 12.00 |
| Gemini-3.8-Flash | 0.75 | 0.075 | 3.75 |
| Model | Methods | KramaBench | LakeQA | ||
|---|---|---|---|---|---|
| Acc. | Acc. | ||||
| Sonnet-5 | Baseline | – | – | ||
| TEAL (real questions) | |||||
| TEAL (synthetic questions) | |||||
| Opus-4.8 | Baseline | – | – | ||
| TEAL (real questions) | |||||
AI Coding Agents
AI coding agents use language models and software tools to plan, edit, test, and maintain code with varying levels of autonomy.
See all 327 papers