DS-STAR: Data Science Agent via Iterative Planning and Verification

Jaehyun Nam, Jinsung Yoon, Jiefeng Chen, Tomas Pfister · DOI

Abstract

DS-STAR is a specialized multi-agent framework designed to bridge the gap between simple code generation and the complex, "messy" reality of real-world data science. By utilizing an iterative planning-and-verification loop and a dedicated data-profiling module, it handles heterogeneous file formats (JSON, PDF, etc.) and generates comprehensive, grounded research reports for open-ended user queries.

Introduction

While Large Language Models (LLMs) have demonstrated remarkable proficiency in code generation, their deployment as autonomous data science agents faces significant hurdles. Most existing frameworks assume clean, relational data and well-defined queries. However, real-world data is often heterogeneous—scattered across unstructured text, JSON, and PDFs. Furthermore, users frequently pose open-ended requests, such as "Analyze this data and create a report," which require synthesis and exploration rather than simple calculation. DS-STAR addresses these challenges by prioritizing logical alignment over mere code execution.

Methodology: The DS-STAR Framework

DS-STAR (Data Science Agent for Solving Diverse Tasks) employs a multi-agent architecture where specialized LLM "workers" collaborate through an iterative loop.

DS-STAR for Well-Defined Problems

The core framework begins with a Data File Analyzer that generates a textual summary of file structures and metadata via Python scripts. This "map" guides the subsequent iterative loop:

  1. Planner Agent: Suggests the next logical step.
  2. Coder Agent: Writes the necessary script.
  3. Verifier Agent: An LLM judge that evaluates if the execution output aligns with the user's intent.
  4. Router Agent: Manages failures by deciding whether to append new steps or backtrack to fix errors.

DS-STAR+ for Deep Data Research

To handle open-ended queries, DS-STAR+ introduces a Question Generation layer. It decomposes vague requests into concrete sub-questions, solves them using the core DS-STAR loop, and synthesizes the findings into a final document via a Report Writer.

Overview of the DS-STAR and DS-STAR+ architectures for well-defined and open-ended data science tasks.

Experimental Evaluation

The authors evaluated DS-STAR across four benchmarks: DABStep (multi-step reasoning on diverse files), DABStep-Research (report quality), KramaBench (data discovery in large "lakes"), and DA-Code (general data science tasks).

Key Results

DS-STAR achieved state-of-the-art performance, particularly on complex tasks. On "hard-level" DABStep tasks, DS-STAR (using Gemini-2.5-Pro) improved accuracy from a 12.70% baseline to 45.24%. In KramaBench, it outperformed the previous best (DA-Agent) by nearly 5 percentage points (44.69% vs 39.79%).

Performance comparison of DS-STAR against various baselines on the DABStep benchmark.

Discussion and Insights

A key finding is that Execution ≠ Correctness. Many agents fail because they assume successful code execution implies a correct answer. DS-STAR’s Verifier agent explicitly checks for logical alignment, significantly boosting performance. Additionally, the authors found that backtracking (regenerating a step from scratch) is more effective than "patching" code, which often leads to brittle solutions.

Conclusion

DS-STAR represents a significant step toward autonomous data science agents capable of handling real-world complexity. While currently fully automated, future work will explore human-in-the-loop components to combine agent speed with human domain expertise.

Summary updated

BibTeX
@article{nam2026ds,
  author = {Jaehyun Nam and Jinsung Yoon and Jiefeng Chen and Tomas Pfister},
  title = {{DS-STAR: Data Science Agent via Iterative Planning and Verification}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}
Figure