| --- |
| license: mit |
| language: |
| - en |
| - zh |
| tags: |
| - data-engineering |
| - benchmark |
| - agent |
| - sql |
| - text2sql |
| - pyspark |
| - flink |
| - llm-evaluation |
| size_categories: |
| - n<1K |
| task_categories: |
| - text-generation |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: tasks.jsonl |
| - config_name: hivesql |
| data_files: |
| - split: train |
| path: hivesql.jsonl |
| - config_name: mysql |
| data_files: |
| - split: train |
| path: mysql.jsonl |
| - config_name: prestosql |
| data_files: |
| - split: train |
| path: prestosql.jsonl |
| - config_name: pyspark |
| data_files: |
| - split: train |
| path: pyspark.jsonl |
| - config_name: flinksql |
| data_files: |
| - split: train |
| path: flinksql.jsonl |
| --- |
| |
| # DataClawEval |
|
|
| [](tasks) |
| [](#paper-results) |
| [](LICENSE) |
| [](DataClawEval__A_Benchmark_for_Data_Engineering_Agents_in_Real_Industrial_Harness.pdf) |
| [](https://arxiv.org/abs/2607.28033) |
|
|
|
|
| **An executable benchmark for end-to-end data-engineering agents in industrial environments.** |
|
|
| DataClawEval measures an autonomous agent's ability to inspect data, implement and debug pipelines, |
| and materialize correct artifacts in realistic data-engineering workflows. It contains 100 |
| production-grounded tasks across five execution engines: PySpark, MySQL, HiveSQL, PrestoSQL/Trino, |
| and FlinkSQL. Each task runs in an isolated Docker sandbox and is evaluated by a case-specific, |
| deterministic, rule-based grader. |
|
|
| --- |
|
|
| ## What's Inside |
|
|
| - **Production-grounded tasks** — 100 end-to-end tasks reconstructed from production-grade |
| implementations written by professional enterprise data engineers and validated through |
| execution checks, expert perturbations, and expert review. |
| - **Batch and streaming coverage** — batch transformations in PySpark, MySQL, HiveSQL, and |
| PrestoSQL/Trino, plus streaming-oriented FlinkSQL tasks involving event time, watermarks, |
| windows, joins, and aggregations. |
| - **End-to-end agent workflows** — schema inspection, data exploration, implementation, execution, |
| debugging, output validation, and artifact materialization. |
| - **Artifact- and process-oriented grading** — task-specific graders assess executable outputs and |
| engineering behaviors such as exploration, execution efficiency, and self-verification. |
| - **Reproducible environments** — every run starts in a fresh container with task-specific data, |
| services, execution engines, and deterministic initialization. |
| - **Flexible agent integration** — run evaluations with the `codebuddy`, `claude-code`, or `codex` |
| backend. The paper evaluates 16 model configurations through a unified CodeBuddy scaffold. |
| - **Batch experiments** — evaluate one or more engines in parallel and generate combined reports. |
|
|
| ### Task Suite |
|
|
| | Execution engine | Workload | Tasks | |
| |------------------|----------|------:| |
| | PySpark | Batch (`offline-compute`) | 20 | |
| | MySQL | Batch (`offline-compute`) | 20 | |
| | HiveSQL | Batch (`offline-compute`) | 28 | |
| | PrestoSQL/Trino | Batch (`offline-compute`) | 12 | |
| | FlinkSQL | Streaming (`online-compute`) | 20 | |
| | **Total** | | **100** | |
|
|
| The suite is also balanced between 50 English and 50 Chinese task prompts and covers five business |
| domains: Ops & Resource Governance (30), Data Analytics & User Growth (30), Security & Risk |
| Control (16), Content, Community & Dev-Efficiency (14), and Advertising & Marketing (10). |
|
|
| Each task lives in `tasks/<workload>/<engine>/<task_id>/` and contains: |
|
|
| - `task.md` — the natural-language request and metadata such as timeout and engine |
| - `init/` — initialization or verification assets; batch tasks initialize tables here, while FlinkSQL |
| tasks generally define generated streaming inputs in the submitted SQL |
| - `gt/` — the reference implementation and task-specific `grade.py` used during evaluation |
|
|
| --- |
|
|
| ## How It Works |
|
|
| For every model–task run, the harness: |
|
|
| 1. Starts a fresh Docker container from the configured `DOCKER_IMAGE`. |
| 2. Starts the services required by the selected engine and initializes task-specific inputs. |
| 3. Prepares the agent workspace with the task prompt and engineering tools. |
| 4. Runs the selected agent backend and records its execution trajectory. |
| 5. Loads `gt/` after agent execution and runs the task-specific grader in the same container. |
| 6. Collects the submitted solution files, workspace snapshot, scores, usage data, and execution |
| transcript into `output/`, then removes the container. |
|
|
| --- |
|
|
| ## Requirements |
|
|
| | Component | Requirement | |
| |-----------|-------------| |
| | Docker | Docker CLI and a running daemon | |
| | Python | Python 3.11 on the host; the scripts invoke `python3.11` | |
| | Storage | Enough free space for the multi-engine image and task outputs | |
| | Model access | Credentials and network access for the selected agent backend | |
|
|
| The evaluation image provides a ready-to-use multi-engine environment with Spark 3.5.0, Flink |
| 1.18.1, Trino 435, MySQL, a Hive Metastore, Python 3.11.13, and the supported agent runtimes. |
|
|
| --- |
|
|
| ## Quick Start |
|
|
| ### 0. Verify prerequisites |
|
|
| Make sure Docker is installed and running, and that Python 3.11 is available. |
|
|
| ```bash |
| docker version # verifies the Docker CLI and daemon connection |
| python3.11 --version # Python 3.11 is required |
| ``` |
|
|
| ### 1. Install Python dependencies |
|
|
| ```bash |
| python3.11 -m pip install -r requirements.txt |
| ``` |
|
|
| ### 2. Get the evaluation image |
|
|
| You have two options. |
|
|
| **Option A — Pull the prebuilt image (recommended)** |
|
|
| Skip the local build and pull the ready-made image from the registry: |
|
|
| ```bash |
| docker pull dicemy/dataclaweval:v1.0 |
| docker tag dicemy/dataclaweval:v1.0 dataclaw-eval:v1.0 # match DOCKER_IMAGE in .env |
| ``` |
|
|
| > The default `DOCKER_IMAGE` in `.env` is `dataclaw-eval:v1.0`. Either retag the pulled image |
| > as shown above, or set `DOCKER_IMAGE=dicemy/dataclaweval:v1.0` in your `.env`. |
|
|
| **Option B — Build locally** |
|
|
| `prepare.sh` vendors the installed CodeBuddy Agent SDK and builds the |
| `dataclaw-eval:v1.0` evaluation image. |
|
|
| ```bash |
| bash script/prepare.sh |
| ``` |
|
|
| ### 3. Configure credentials |
|
|
| Copy the example env file and fill in the values for the agent backend you plan to use. |
|
|
| ```bash |
| cp .env.example .env |
| ``` |
|
|
| Then edit `.env`: |
|
|
| ```ini |
| DOCKER_IMAGE=dataclaw-eval:v1.0 |
| |
| # CodeBuddy auth (required for the `codebuddy` harness) |
| CODEBUDDY_AUTH_TOKEN= |
| CODEBUDDY_API_KEY= |
| CODEBUDDY_INTERNET_ENVIRONMENT=ioa # public | internal | ioa |
| |
| # OpenRouter (required for `claude-code` and `codex` harnesses) |
| OPENROUTER_API_KEY= |
| OPENROUTER_BASE_URL=https://openrouter.ai/api/v1 |
| ``` |
|
|
| > Get a CodeBuddy API key: overseas → <https://www.codebuddy.ai/profile/keys> · |
| > China → <https://copilot.tencent.com/profile/> · iOA (Tencent staff) → |
| > <https://tencent.sso.copilot.tencent.com/profile/keys>. Set |
| > `CODEBUDDY_INTERNET_ENVIRONMENT` to match your account type. |
|
|
| ### 4. Run the evaluation |
|
|
| ```bash |
| # Run a single execution engine |
| bash script/run_batch.sh -P # PySpark |
| bash script/run_batch.sh -M # MySQL |
| bash script/run_batch.sh -H # HiveSQL |
| bash script/run_batch.sh -F # FlinkSQL |
| bash script/run_batch.sh -PR # PrestoSQL/Trino |
| |
| # Run workload groups |
| bash script/run_batch.sh -offline # PySpark + MySQL + HiveSQL + PrestoSQL/Trino |
| bash script/run_batch.sh -online # FlinkSQL |
| bash script/run_batch.sh -all # all 100 tasks |
| ``` |
|
|
| Use `script/run_batch.sh -all` to evaluate the complete 100-task suite. Results and a combined |
| report are written to `output/`. |
|
|
| --- |
|
|
| ## Usage Reference |
|
|
| `run_batch.sh` options: |
|
|
| | Flag / Option | Description | |
| |---------------|-------------| |
| | `-P` `-M` `-H` `-F` `-PR` | Select PySpark / MySQL / HiveSQL / FlinkSQL / PrestoSQL/Trino | |
| | `-offline` `-online` `-all` | Run predefined workload groups | |
| | `--parallel N` | Number of tasks to run concurrently (default: 10) | |
| | `--harness NAME` | Agent backend: `codebuddy` (default), `claude-code`, `codex` | |
| | `--model MODEL` | Model name (repeatable, `codebuddy` only) for multi-model runs | |
|
|
| Examples: |
|
|
| ```bash |
| # PySpark with 5 workers |
| bash script/run_batch.sh -P --parallel 5 |
| |
| # Use the Claude Code harness |
| bash script/run_batch.sh -P --harness claude-code |
| |
| # Compare two CodeBuddy models on PySpark |
| bash script/run_batch.sh -P --model model_a --model model_b |
| ``` |
|
|
| To run a single task directly (bypassing batch mode): |
|
|
| ```bash |
| python3.11 eval/run_batch.py \ |
| --agent-backend codebuddy \ |
| --task tasks/offline-compute/PySpark/pyspark_001/task.md \ |
| --model deepseek-v4-flash-ioa |
| ``` |
|
|
| --- |
|
|
| ## Output & Scoring |
|
|
| Each run is saved under `output/<harness>/<category>/<task_id>/<run_suffix>/` with the submitted |
| solution, workspace snapshot, transcript, usage statistics, and `score.json`. |
|
|
| DataClawEval evaluates both the final data product and the engineering workflow: |
|
|
| - **Artifact quality** — executability, schema correctness, row-level alignment, numerical accuracy, |
| and categorical or business correctness. |
| - **Process quality** — exploration adequacy, execution efficiency, and self-verification. |
|
|
| The overall score combines both dimensions: |
|
|
| \[ |
| S = \alpha S_{artifact} + (1-\alpha)S_{process} |
| \] |
|
|
| The artifact weight \(\alpha\) is configured per task, with 0.7 as the most common value. Repository |
| outputs normalize `overall_score` to 0–1, while the paper presents scores on a 0–100 scale. |
|
|
| Batch runs aggregate model and engine summaries into |
| `output/experiment_report_<timestamp>.json` and report the average score and the number of tasks |
| with `overall_score >= 0.5`: |
|
|
| ``` |
| Category/Model Tasks Avg Score Pass(>=0.5) |
| offline-compute/PySpark/model_a 20 0.7350 15/20 |
| ``` |
|
|
| --- |
|
|
| ## Paper Results |
|
|
| The paper evaluates 16 model configurations from eight families on all 100 tasks: 1,600 primary |
| runs in total. Every model uses the same fixed Tencent CodeBuddy scaffold, and only the underlying |
| LLM changes. The primary table uses one run per model–task pair; task prompts are evenly split |
| between English and Chinese (50 each). |
|
|
| | Model | Overall score (0–100) | Avg. tokens/task | |
| |-------|----------------------:|-----------------:| |
| | GPT 5.5 | **74.9** | 299.8k | |
| | Claude Opus 4.8 | 74.3 | 318.3k | |
| | Claude Sonnet 5 | 73.8 | 457.9k | |
| | Gemini 3.1 Pro | 73.7 | 292.4k | |
| | Gemini 3.5 Flash | 73.3 | 973.8k | |
| | DeepSeek V4 Flash | 73.0 | 419.6k | |
| | MiniMax M3 | 71.8 | 714.1k | |
| | GLM 5.1 | 71.6 | 355.4k | |
| | DeepSeek V4 Pro | 70.6 | 359.3k | |
| | Kimi K2.6 | 69.0 | 428.8k | |
| | GLM 5.2 | 68.8 | 403.9k | |
| | Kimi K2.7 | 68.1 | 407.5k | |
| | GPT 5.3 Codex | 66.4 | **271.4k** | |
| | Hy3 | 66.0 | 468.7k | |
| | MiniMax M2.7 | 63.7 | 501.0k | |
| | GLM 5V Turbo | 60.3 | 287.8k | |
|
|
| Research highlights: |
|
|
| - GPT 5.5 achieves the highest overall score at 74.9. |
| - Engine-level results reveal complementary strengths: Claude Opus 4.8 leads PySpark; GPT 5.5 |
| leads HiveSQL and MySQL; DeepSeek V4 Pro and Gemini 3.5 Flash tie on PrestoSQL/Trino; and |
| DeepSeek V4 Flash leads FlinkSQL. |
| - Token and tool-call analyses identify models that combine strong task performance with efficient |
| agent execution. |
| - Repeated-run experiments add execution consistency as a first-class evaluation dimension. |
| - Execution-grounded, rule-based graders provide stable, case-specific assessment of both generated |
| artifacts and engineering processes. |
|
|
| See the [paper](DataClawEval__A_Benchmark_for_Data_Engineering_Agents_in_Real_Industrial_Harness.pdf) |
| for complete engine-level results, efficiency and stability analyses, bilingual performance, and all |
| task listings. |
|
|
| --- |
|
|
| ## Project Structure |
|
|
| ``` |
| DataClawEval/ |
| ├── Dockerfile # Self-contained sandbox (Spark, Flink, Trino, MySQL, Python 3.11) |
| ├── requirements.txt # Host-side Python dependencies |
| ├── .env.example # Credentials template |
| ├── eval/ |
| │ └── run_batch.py # Evaluation entry point |
| ├── script/ |
| │ ├── prepare.sh # Vendor SDK + build the Docker image |
| │ ├── run_batch.sh # Batch runner + report generator |
| │ ├── run.sh # Thin wrapper around run_batch.py |
| │ └── ... # Metastore / Trino / entrypoint helpers |
| ├── src/ |
| │ ├── agents/ # Agent backends: codebuddy, claudecode, codex, common |
| │ └── utils/ # Docker orchestration, DB init, grading, task parsing |
| └── tasks/ |
| ├── offline-compute/ # PySpark, MySQL, HiveSQL, PrestoSQL |
| └── online-compute/ # FlinkSQL |
| ``` |
|
|
| --- |
|
|
| ## Citation |
|
|
| If you use DataClawEval in research, cite the project using [`CITATION.cff`](CITATION.cff). The |
| archived software release is available at <https://doi.org/10.5281/zenodo.21621566>. |
|
|
| --- |
|
|
| ## License |
|
|
| Released under the [MIT License](LICENSE). |