# Data Interpreter: An LLM Agent For Data Science

**Authors:** Sirui Hong, Yizhang Lin, Bangbang Liu, Binhao Wu, Danyang Li, Jiaqi Chen, Jiayi Zhang, Jinlin Wang, Lingyao Zhang, Mingchen Zhuge, Taicheng Guo, Tuo Zhou, Wei Tao, Wenyi Wang, Xiangru Tang, Xiangtao Lu, Xinbing Liang, Yaying Fei, Yuheng Cheng, Zongze Xu  
**arXiv:** [2402.18679](https://arxiv.org/abs/2402.18679)  
**Date:** 2024-02-28  
**Summary page:** https://www.summarizepaper.com/en/paper/2402.18679v1/

## Key points

- Large Language Model (LLM)-based agents are effective in data science applications but can struggle with real-time data adjustment and optimization.
- The Data Interpreter solution focuses on dynamic planning with hierarchical graph structures, tool integration, and logical inconsistency identification to enhance problem-solving in data science.
- The Data Interpreter outperforms open-source baselines across different tasks, showing significant improvements in machine learning tasks, MATH dataset, and open-ended tasks.
- The solution will be available on GitHub at https://github.com/geekan/MetaGPT for independent tool library building and expansion.
- The Data Interpreter enhances reasoning by being logic bug aware based on confidence scores, test-driven validations, and recording task-level experiences for both successes and failures.

## Summary

In the realm of data science, Large Language Model (LLM)-based agents have proven to be highly effective in various applications. However, their performance can sometimes falter in scenarios that require real-time data adjustment and optimization expertise due to complex task dependencies. To address these challenges, a solution known as the Data Interpreter has been introduced in this study. The Data Interpreter is designed to enhance problem-solving in data science by focusing on three key techniques: dynamic planning with hierarchical graph structures for real-time data adaptability, tool integration for code proficiency enhancement during execution, and logical inconsistency identification for efficient reasoning through experience recording. This solution has been evaluated across different data science and real-world tasks, showcasing superior performance compared to open-source baselines. Specifically, the Data Interpreter demonstrated significant improvements in machine learning tasks with a notable increase from 0.86 to 0.95. It also showed a 26% enhancement on the MATH dataset and an impressive 112% improvement in open-ended tasks. The solution will be made available on GitHub at https://github.com/geekan/MetaGPT. Furthermore, the Data Interpreter allows for independent tool library building and expansion, simplifies tool usage, and enables code restructuring as needed. It enhances reasoning by being logic bug aware based on confidence scores from execution results and test-driven validations. Task-level experiences are recorded throughout the execution process to capture both successes and failures. In comparison to existing open-source frameworks, the Data Interpreter significantly outperforms them across machine learning tasks, mathematical problems, and open-ended tasks. Its dynamic planning framework with hierarchical structures improves adaptability and problem-solving capabilities in data science tasks. Automated tool integration enhances coding proficiency in LLMs while verification and experience integration improve reasoning accuracy and efficiency. Overall, this study sets a new standard for performance in utilizing LLM-based agents for data science challenges by addressing key limitations and enhancing problem-solving capabilities across various domains.
