Tapilot-Crossing: Benchmarking and Evolving LLMs Towards Interactive Data Analysis Agents

Jinyang Li, Nan Huo, Yan Gao, Jiayi Shi, Yingxiu Zhao, Ge Qu, Yurong Wu, Chenhao Ma, Jian-Guang Lou, Reynold ChengarXiv 2024

Abstract

Interactive Data Analysis, the collaboration between humans and LLM agents, enables real-time data exploration for informed decision-making. The challenges and costs of collecting realistic interactive logs for data analysis hinder the quantitative evaluation of Large Language Model (LLM) agents in this task. To mitigate this issue, we introduce Tapilot-Crossing, a new benchmark to evaluate LLM agents on interactive data analysis. Tapilot-Crossing contains 1024 interactions, covering 4 practical scenarios: Normal, Action, Private, and Private Action. Notably, Tapilot-Crossing is constructed by an economical multi-agent environment, Decision Company, with few human efforts. We evaluate popular and advanced LLM agents in Tapilot-Crossing, which underscores the challenges of interactive data analysis. Furthermore, we propose Adaptive Interaction Reflection (AIR), a self-generated reflection strategy that guides LLM agents to learn from successful history. Experiments demonstrate that Air can evolve LLMs into effective interactive data analysis agents, achieving a relative performance improvement of up to 44.5%.

Introduction

Data analysis in professional settings is rarely a "one-shot" task. It is inherently an iterative dialogue where users provide queries that may be ambiguous, agents encounter code errors requiring self-correction, and analysis often depends on proprietary, internal code libraries. Existing benchmarks like HumanEval or Spider primarily focus on single-turn code generation or SQL parsing, failing to capture the "interactive" essence of real-world data science—handling ambiguity, responding to feedback, and maintaining context over long conversations. Furthermore, the high cost of collecting human-agent interaction logs has historically hindered the development of robust evaluation frameworks.

Methodology

Decision Company: Economical Benchmark Construction

To address the data collection bottleneck, the authors developed Decision Company, a multi-agent simulation environment. In this framework, four specialized GPT-4 agents—an Administrator, a Client, a Data Scientist, and an AI Chatbot—interact to simulate realistic data analysis workflows. This approach allowed for the creation of a high-quality dataset of over 1,000 interactions for less than $100 USD, significantly reducing the human effort required for benchmark construction.

Adaptive Interaction Reflection (AIR)

To improve agent performance in multi-turn scenarios, the authors propose Adaptive Interaction Reflection (AIR). This "self-evolution" strategy operates in two stages:

  1. Pseudo Code Logic Generation: The agent analyzes successful past turns in a conversation to distill high-level "pseudo-code" logic.
  2. Re-Org One-Shot Reasoning: These distilled logic snippets serve as one-shot examples to guide the agent's reasoning for the current query, helping it maintain a consistent "mental model" across the analysis.

The Tapilot-Crossing Benchmark

The resulting benchmark, Tapilot-Crossing, evaluates agents across four distinct modes designed to mirror practical challenges:

  • Normal: Explicit queries with clear intents.
  • Action: Scenarios requiring handling of feedback or error correction.
  • Private: Tasks involving unseen, custom-generated code libraries.
  • Private Action: The most complex mode, combining custom libraries with interactive feedback.
The four interaction modes in Tapilot-Crossing: Normal, Action, Private, and Private Action.

The dataset comprises 1,024 interactions across five domains (ATP Tennis, Credit Card, Fast Food, Laptop Price, and Melbourne Housing). It includes both code generation and multiple-choice answers to test both execution and interpretation capabilities.

Experimental Results

Evaluation of leading LLMs on Tapilot-Crossing reveals several key insights:

  • The Efficacy of AIR: The AIR strategy (referred to as Inter_Agent mode) consistently outperformed base models. GPT-4-32k achieved a relative performance improvement of 44.5% over its base version when using AIR.
  • Model Performance Gap: GPT-4-32k emerged as the leader with an overall score of 30.2%, followed by Claude-2.1 and CodeLlama-34B. However, all models struggled significantly in "Private" modes, often scoring below 12%, highlighting a major gap in handling enterprise-specific data tasks.
  • Ambiguity and Clarification: Effective agents must recognize subjective terms (e.g., "notable") and seek clarification rather than hallucinating definitions.
Performance comparison across different agent actions, showing the effectiveness of the AIR (Inter_Agent) strategy.

Conclusion

Tapilot-Crossing provides a rigorous framework for evaluating interactive data analysis agents. The success of the AIR strategy suggests that distilling past successes into high-level logic is a powerful way to manage long-term context. Future work will focus on incorporating noisy interaction histories, developing "soft-metrics" for evaluation, and expanding the benchmark to include relational databases and SQL-based analysis.

Summary updated

BibTeX
@misc{li2024tapilot,
  author = {Jinyang Li and Nan Huo and Yan Gao and Jiayi Shi and Yingxiu Zhao and Ge Qu and Yurong Wu and Chenhao Ma and Jian-Guang Lou and Reynold Cheng},
  title = {{Tapilot-Crossing: Benchmarking and Evolving LLMs Towards Interactive Data Analysis Agents}},
  year = {2024},
  eprint = {2403.05307},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.05307},
}
Figure