Papers › DS-Agent: Automated Data Science by Empowering Large Language Models with Case-Based Reasoning

DS-Agent: Automated Data Science by Empowering Large Language Models with Case-Based Reasoning

27 Feb 2024arXiv:2402.17453archive 2025-07-28

Siyuan Guo, Cheng Deng, Ying Wen, Hechang Chen, Yi Chang, Jun Wang

In this work, we investigate the potential of large language models (LLMs) based agents to automate data science tasks, with the goal of comprehending task requirements, then building and training the best-fit machine learning models. Despite their widespread success, existing LLM agents are hindered by generating unreasonable experiment plans within this scenario. To this end, we present DS-Agent, a novel automatic framework that harnesses LLM agent and case-based reasoning (CBR). In the development stage, DS-Agent follows the CBR framework to structure an automatic iteration pipeline, which can flexibly capitalize on the expert knowledge from Kaggle, and facilitate consistent performance improvement through the feedback mechanism. Moreover, DS-Agent implements a low-resource deployment stage with a simplified CBR paradigm to adapt past successful solutions from the development stage for direct code generation, significantly reducing the demand on foundational capabilities of LLMs. Empirically, DS-Agent with GPT-4 achieves 100\% success rate in the development stage, while attaining 36\% improvement on average one pass rate across alternative LLMs in the deployment stage. In both stages, DS-Agent achieves the best rank in performance, costing \$1.60 and \$0.13 per run with GPT-4, respectively. Our data and code are open-sourced at https://github.com/guosyjlu/DS-Agent.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.17453")

Code

Syntology Ran 9 of 13 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 9 ran with no contract checked.

By repository: official repository: 13 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

guosyjlu/ds-agent officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 9 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

9ran
4unverified

Licence: 13 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from guosyjlu/DS-Agent. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

compute_metrics_for_classification guosyjlu/DS-Agent/deployment/experience_replay/chatgpt-prompt.py official repository ran fingerprinted no licence file found · pointer only · e48536a39e307f1c · report
compute_metrics_for_classification guosyjlu/DS-Agent/deployment/experience_replay/enzyme-substrate.py official repository ran fingerprinted no licence file found · pointer only · c7c62555e1f51544 · report
execute_script guosyjlu/DS-Agent/deployment/execution.py official repository ran no licence file found · pointer only · 34caab810cace413 · report
predict guosyjlu/DS-Agent/deployment/experience_replay/airline-reviews.py official repository ran no licence file found · pointer only · 6419d62b28f3cfc1 · report
predict guosyjlu/DS-Agent/deployment/experience_replay/chatgpt-prompt.py official repository ran no licence file found · pointer only · d168412c0d94b909 · report
predict guosyjlu/DS-Agent/deployment/experience_replay/enzyme-substrate.py official repository ran no licence file found · pointer only · a43e675ac4b0fed0 · report
train_model guosyjlu/DS-Agent/deployment/experience_replay/airline-reviews.py official repository ran no licence file found · pointer only · 0755b9a6ac3a5909 · report
train_model guosyjlu/DS-Agent/deployment/experience_replay/chatgpt-prompt.py official repository ran no licence file found · pointer only · 53971733e3acbbb1 · report
train_model guosyjlu/DS-Agent/deployment/experience_replay/enzyme-substrate.py official repository ran no licence file found · pointer only · e759f3555c9dc70d · report
compute_metrics_for_regression guosyjlu/DS-Agent/deployment/experience_replay/airline-reviews.py official repository unverified no licence file found · pointer only · 2b03d09920c8d2a1 · report
get_case guosyjlu/DS-Agent/deployment/prompt.py official repository unverified no licence file found · pointer only · 6d0f8f6dd1bc8b2f · report
get_prompt guosyjlu/DS-Agent/deployment/prompt.py official repository unverified no licence file found · pointer only · 15c1e503e527a5bf · report
get_task guosyjlu/DS-Agent/deployment/prompt.py official repository unverified no licence file found · pointer only · a45eb6f9978ac8b0 · report

Tasks

Code Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutGPT-4Label SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections