BobFlow: Towards Human-Agent Collaborative Data Science Using Dataflows
Organizations: University of California, Irvine Irvine, California, USA · University of Massachusetts Amherst Amherst, Massachusetts, USA
Abstract
Recent advances in large language models (LLMs) have established human-agent collaboration as a promising paradigm for data science. Effective collaboration requires a shared computational abstraction that enables agents to reason about processing logic while allowing human analysts to understand, guide, and refine the analysis. Although scripts written in Python or SQL provide precise control, their syntax and execution details can be difficult for analysts to understand and modify. In this paper, we argue that dataflows are an effective abstraction for human-agent collaboration in data science. We introduce BobFlow, a system that combines the dataflow abstraction with the ReAct paradigm. It enables agents to iteratively construct and execute dataflows for data science tasks while allowing analysts to inspect the analysis and provide feedback. Our user study shows that BobFlow helps analysts understand, inspect, and verify agent-generated analyses. A thorough experimental evaluation across proprietary and open-weight LLMs shows accuracy score gains of up to 18.6 points at just over 1/3 of a script-based ReAct agent's inference cost.
Figures & tables
| Abstraction | Precise [-2pt] Semantics | Intuitive [-2pt] Representation | Step-Level [-2pt] Transparency |
|---|---|---|---|
| Natural Language | ✗ | ✓ | ✗ |
| Programming Language | ✓ | ✗ | ✓ |
| SQL | ✓ | ✗ | ✗ |
| Dataflow | ✓ | ✓ | ✓ |
| Declarative operator | Pandas | PySpark |
|---|---|---|
| scan({ path } , { options }) | pd.read_csv(...) | spark.read.csv(...) |
| filter({ condition }) | query(...) | filter(...) |
| distinct({ columns }) | drop_duplicates(...) | dropDuplicates(...) |
| sort({ columns } , { orders }) | sort_values(...) | orderBy(...) |
| limit({ offset } , { count }) | iloc[...] | offset(...).limit(...) |
| project({ mapping }) | [[...]].rename(...) | select(...) |
| Action | Specifies | Application |
|---|---|---|
| DescribeReasoning | Reasoning | Display reasoning in chat. |
| AnswerTask | Answer | Display answer in chat. |
| GetDataflow | Operators, edges | Inspect operators, schemas, and edges. |
| SetDataflow | Dataflow changes | Add, delete, or update operators and edges. |
| GetCode | Retrieve registered physical implementation. | |
| SetCode | Code | Register implementation for custom operators. |
| Dimension | Questionnaire item | Script ReAct | BobFlow | |
|---|---|---|---|---|
| Intuitiveness | Easy to collaborate with the agent | 3.9 | 4.0 | |
| Transparency | Easy to grasp processed/produced tables | 3.5 | 4.3 | |
| Confident about what each step does | 3.3 | 3.8 | ||
| Easy to view each step’s output tables | 2.6 | 4.2 | ||
| Easy to follow data lineage | 2.3 | 4.2 | ||
| Clear final-answer vs. exploratory steps | 2.9 | 4.0 |
| Benchmark | Agent | GPT-5.6 Luna | GPT-5.6 Terra | GPT-5.6 Sol | GPT-6.1 Sol | ||||
|---|---|---|---|---|---|---|---|---|---|
| Acc. | Cost | Acc. | Cost | Acc. | Cost | Acc. | Cost | ||
| KramaBench | Script ReAct | 62.3 | 0.40 | 64.3 | 6.99 | 68.9 | 10.22 | 78.9 | 3.22 |
| BobFlow | 76.4 | 0.30 | 72.3 | 2.76 | 76.4 | 5.09 | 78.4 | 1.67 | |
| PrepBench | Script ReAct | 69.9 | 1.21 | 71.9 | 24.56 | 79.4 | 45.97 | 90.5 | 17.33 |
| BobFlow | 83.3 | 0.99 | 86.3 | 8.67 | 88.6 | 16.50 | 90.8 | 6.33 | |
| Benchmark | Agent | Gemini 3.8 Flash | Gemini 4 Argon | DeepSeek V4.1-Flash | Claude Opus 5.5 | ||||
| Model | Accuracy | Acc. | Cost ($) | Cost |
|---|---|---|---|---|
| GPT-5.6 Luna | 82.4 83.3 | 1.21 0.99 | % | |
| GPT-5.6 Terra | 85.9 86.3 | 10.66 8.67 | % | |
| GPT-5.6 Sol | 88.2 88.6 | 21.35 16.50 | % | |
| GPT-6.1 Sol | 88.6 90.8 | 8.39 6.33 | % | |
| Gemini 3.8 Flash | 90.2 89.5 | 16.19 13.22 | % | |
| Gemini 4 Argon | 90.2 91.5 | 17.97 15.42 | % |
| Model | Configuration | Accuracy | Input | Output | Cost ($) | |
|---|---|---|---|---|---|---|
| (K) | (K) | Cold | Warm | |||
| GPT-5.6 Luna | BobFlow without opt2 | 42.9 | 126 | 1.4 | 9.73 | 3.54 |
| BobFlow | 42.9 | 54 | 1.9 | 5.43 | 4.85 | |
| GPT-5.6 Terra | BobFlow without opt2 | 54.6 | 99 | 1.2 | 88.33 | 29.52 |
| BobFlow | 58.4 | 45 | 1.5 | 49.37 | 43.47 | |
| DeepSeek V4.1-Flash | BobFlow without opt2 | 58.0 | 239 | 4.0 | 9.87 | 2.57 |
Human-AI Collaboration
Human-AI collaboration studies how people and AI systems divide, coordinate, and adapt work to support decisions, creativity, and learning.
See all 463 papers