Introduction
The rise of Large Language Models (LLMs) as autonomous "data science agents" promises to revolutionize data analysis. However, current benchmarks often fail to reflect real-world constraints, such as data privacy and the inherent complexity of multi-step analytical tasks. Organizations frequently cannot upload raw datasets to third-party LLMs due to security concerns. Moreover, real-world queries are rarely simple; they involve cleaning, parsing, and visualizing data in a single workflow.
To bridge this gap, we introduce DSBC (Data Science task Benchmarking with Context engineering). This benchmark evaluates agents using structured metadata—rather than raw files—to mirror privacy-conscious environments and tests their ability to handle complex, multi-category data problems.
Methodology: Context Engineering
A core innovation of DSBC is Context Engineering. Instead of providing a full dataset, models receive a nested JSON dictionary containing essential metadata:
- Statistical summaries (min, max, mean, percentiles).
- Data types and row/column counts.
- Categorical value counts and a sample of the first five rows.
We evaluated three frontier models—Claude-4.0-Sonnet, Gemini-2.5-Flash, and OpenAI-o4-Mini—across three agentic strategies: Zero-shot ReAct loops, Multi-step sequential execution, and the smolagents framework.
Experimental Results
The benchmark utilizes 303 questions across 11 diverse datasets (e.g., Walmart sales, COVID-19 data) featuring realistic challenges like inconsistent data types and missing values.
Model Performance and Strategy
Our findings indicate that Claude-4.0-Sonnet is the leading model, particularly when paired with a multi-step prompting approach. A significant "multi-task penalty" was observed: while agents achieved ~55.8% accuracy on single-category tasks, performance dropped to 25.4% for queries requiring three or more distinct operations.
As shown in the figure above, performance varies significantly by model and approach, with reasoning-heavy models like OpenAI-o4-Mini demonstrating better resilience to task complexity. Interestingly, there is no "optimal" temperature setting; the best configuration depends heavily on the specific model and task.
Error Analysis
Failures were primarily driven by logic errors rather than code execution issues. Approximately 70% of unsuccessful attempts resulted in incorrect final answers, while 20% were due to code errors.
The error distribution remains relatively stable across temperature settings, though specific models like OpenAI-o4-Mini showed higher rates of formatting errors.
Conclusion
DSBC highlights the current limitations of AI data science agents, particularly regarding task complexity and the trade-offs between cost and performance. While multi-step frameworks like smolagents improve accuracy, they come at a higher inference cost. Future work will focus on dynamic context engineering and expanding the benchmark to include visual interpretation and multilingual support.
Summary updated