File size: 4,412 Bytes
009e71e
970dc4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
009e71e
970dc4f
 
 
 
 
 
02df102
970dc4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
pretty_name: RefCraft
language:
  - en
  - zh
tags:
  - arxiv:2610.26826
  - benchmark
  - multimodal
  - coding-agents
  - visual-reference
  - web-development
size_categories:
  - n<1K
configs:
  - config_name: tasks
    default: true
    data_files:
      - split: test
        path: tables/tasks.parquet
  - config_name: keypoints
    data_files:
      - split: test
        path: tables/keypoints.parquet
---

<p align="center"><img src="assets/refcraft-mascot.png" alt="RefCraft mascot" width="100" /></p>
<h1 align="center">RefCraft</h1>
<p align="center"><strong>Benchmarking Visual-Reference-Conditioned Agentic Generation<br>through Web Development</strong></p>
<p align="center">
  <a href="https://arxiv.org/abs/2610.26826">Paper</a> ·
  <a href="https://wangyuchi369.github.io/RefCraft/">Project website</a> ·
  <a href="https://github.com/wangyuchi369/RefCraft">Code &amp; evaluation</a> ·
  <a href="https://huggingface.co/datasets/YuchiWang/RefCraft/resolve/main/bundles/refcraft-inputs.tar.gz?download=true">Download inputs</a>
</p>

RefCraft provides **300 webpage-development tasks** in English and Chinese.
Each task combines a user request with screenshots from **one to five reference
webpages**, together with evaluation criteria for the generated webpage.

<p align="center"><img src="assets/teaser.webp" alt="RefCraft benchmark overview and reference-guided webpage generation" width="1000" /></p>

## Download

| File | Contents |
| --- | --- |
| [refcraft-inputs.tar.gz](https://huggingface.co/datasets/YuchiWang/RefCraft/resolve/main/bundles/refcraft-inputs.tar.gz?download=true) | Requests and all 3,491 reference screenshots |
| [refcraft-evaluation.tar.gz](https://huggingface.co/datasets/YuchiWang/RefCraft/resolve/main/bundles/refcraft-evaluation.tar.gz?download=true) | Evaluation criteria, core tests and supporting metadata |

From the [code repository](https://github.com/wangyuchi369/RefCraft) root, download and extract the data:

```bash
pip install -U huggingface_hub
hf download YuchiWang/RefCraft --repo-type dataset --include 'bundles/*' --local-dir .
tar -xzf bundles/refcraft-inputs.tar.gz
tar -xzf bundles/refcraft-evaluation.tar.gz
```

The files are restored under `data/`. The code repository already includes the
annotations, so only the input archive is needed with that checkout.

## Browse the data

Select **tasks** to browse requests and reference-image previews, or **keypoints**
to browse evaluation criteria. Both use the `test` split. Previews show one frame;
download the input archive for the complete ordered reference images.

To load the tables, install `datasets` and run:

```python
from datasets import load_dataset

tasks = load_dataset("YuchiWang/RefCraft", "tasks", split="test")
keypoints = load_dataset("YuchiWang/RefCraft", "keypoints", split="test")
print(tasks[0]["query"])
```

Task records contain `sample_id`, `query`, `language`, and ordered
`reference_images` paths relative to `data/`. Evaluation criteria are for the
judge; keep them out of the tested agent's workspace.

## Run evaluation

In the RefCraft code repository, install the dependencies and place your agent's
webpages in `responses/` as `<task_id>.html` or `<task_id>/index.html` (IDs 1–300):

```bash
pip install -r requirements.txt
python -m playwright install chromium
export REFCRAFT_JUDGE_BASE_URL='https://YOUR-PROVIDER/v1'
export REFCRAFT_JUDGE_API_KEY='YOUR_API_KEY'
export REFCRAFT_JUDGE_MODEL='YOUR_VISION_MODEL'
python scripts/evaluate.py --responses responses --output runs/my-model \
  --model-name YOUR_MODEL_ID
```

Use Python 3.12+ and a vision-capable judge. Results are written to `scores.csv`
and `summary.json` under the output directory. See the
[Quickstart](https://github.com/wangyuchi369/RefCraft#quickstart) for generating webpages.

## Citation

```bibtex
@misc{wang2026refcraft,
  title = {RefCraft: Benchmarking Visual-Reference-Conditioned Agentic Generation through Web Development},
  author = {Yuchi Wang and Rongyao Fang and Weihao Yu and Xilin Wei and Tiancheng Gu and Dingkang Yang and Hang Zhang and Dayiheng Liu and Hongsheng Li and Shuai Bai},
  year = {2026},
  eprint = {2610.26826},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.26826}
}
```

## License

Original annotation licensing is pending. See [LICENSE.md](LICENSE.md) and
[reference attribution](docs/attribution.md) for the recorded terms.