File size: 7,500 Bytes
0b2f974
2d38339
0b2f974
 
 
 
 
 
b79dc52
0b2f974
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1b21390
 
a789054
 
1b21390
 
 
 
 
0b2f974
 
1b21390
 
0b2f974
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1b21390
0b2f974
 
 
 
1b21390
0b2f974
 
 
 
 
 
b79dc52
 
0b2f974
 
b79dc52
 
1b21390
0b2f974
321d02a
0b2f974
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b79dc52
 
0b2f974
 
 
 
1b21390
 
 
 
 
 
 
 
 
 
 
0b2f974
 
 
b79dc52
0b2f974
 
 
 
 
 
2db44f5
 
 
 
 
5bcc3ea
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
---
pretty_name: LexBench-Zyte-Product-Extraction
license:
- mit
- apache-2.0
tags:
- benchmark
- evaluation
- webstone
- web-scraping
- structured-data-extraction
- product-extraction
- frozen-html
task_categories:
- other
source_datasets: []
language:
- und
configs:
- config_name: zyte-products-140
  data_files:
  - split: test
    path: data/zyte-products-140.jsonl
---

# Product extraction benchmark (Zyte)

Short name: **LB-ZPE**.

[Product extraction benchmark](https://github.com/scrapinghub/product-extraction-benchmark)
was published by Zyte in 2021. This Hub repository distributes its 140
archived product pages and original references. Lexmount maintains the distribution
and a separately identified annotation supplement; it is not the original dataset author.
The original source URL and full upstream commit remain part of every release.

Each task asks an extractor to return price, SKU and stock status from the same
frozen HTML. The source URL records provenance; requesting the live website changes
the input.

## Population and references

| Viewer group | Source suite | Tasks | Scope |
| --- | --- | ---: | --- |
| `zyte-products-140` | `zyte-products-140` | 140 | All 140 upstream frozen product pages, original labels and separately identified source-qualified annotations |

The upstream source is pinned to commit
`cba97d7a8d42aeefd4021bc15d482f297faceaa3`. All 140 compressed HTML files and the
original ground-truth JSON retain their upstream bytes. The runtime manifest
also binds the decompressed HTML, original evaluator and license.

Each viewer record contains the source URL, compressed HTML path, HTML hash,
original `reference`, and separate `source_qualified_reference`. The latter
amends 47 fields on 36 pages following a complete model-assisted source audit.
It is an additional annotation view, not a second population or human gold.
The original reference remains the default for reproducing the upstream score.
[Reference corrections](definitions/reference-corrections.json) retain the old
and accepted values, literal source excerpts, locators and reasons. Provider
outputs, model judgments and measured scores are not part of this dataset.

The original references contain 134 nonempty price fields, 135 nonempty SKU
fields and 140 stock labels, including nine out-of-stock labels. The source-qualified
view has 134 price fields, 140 SKU fields and 140 stock labels, including 11
out-of-stock labels. Missing values are meaningful and must not become zero prices
or automatic in-stock outputs. The original evaluator's stock convention and
identifier matching must be retained when reproducing its results.

## Load frozen inputs

Select a full Hugging Face commit and keep it with the evaluated outputs:

```python
import gzip
import json
from pathlib import Path
from datasets import load_dataset
from huggingface_hub import snapshot_download

revision = "YOUR_FULL_HF_COMMIT"
rows = load_dataset(
    "Lexmount/zyte-product-extraction-benchmark", "zyte-products-140",
    split="test", revision=revision,
)
task = json.loads(rows[0]["task"])
snapshot = Path(snapshot_download(
    "Lexmount/zyte-product-extraction-benchmark", repo_type="dataset", revision=revision,
    allow_patterns=["definitions/**", "manifest.json", "LICENSE", "NOTICE", "THIRD_PARTY.md"],
))
html = gzip.decompress((snapshot / "definitions" / task["html_path"]).read_bytes())
reference = task["reference"]
```

Webstone uses the shared immutable dataset cache and
[data lock](https://github.com/lexmount/webstone/blob/7f010e7617b6ac6a6df366495480af9ac92e4840/src/harness/benchmarks/data-lock.json):

```sh
git clone https://github.com/lexmount/webstone
cd webstone
git checkout 7f010e7617b6ac6a6df366495480af9ac92e4840
uv sync --frozen --extra web-scraper-eval
make pin-dataset DATASET=web-scraper REV=YOUR_FULL_HF_COMMIT
uv run --frozen python -m harness.benchmarks.data web-scraper
uv run --frozen python -m harness.web_scraper.cli prepare
```

The download verifies the archive and every file. A verified cache works offline
with `HF_HUB_OFFLINE=1`. Historical upstream predictions are fetched separately
only by `reproduce`; they are not extraction inputs. Preparation does not call any
extraction provider or require an API key.

## Evaluation

Use the original evaluator's per-field precision, recall and F1 for price, SKU
and stock. Report out-of-stock recognition separately because the original
population is dominated by in-stock pages. Keep transport failures in the
predeclared denominator. A structured JSON response alone does not establish
field correctness.

Record latency for every logical result, physical retry time separately, and
native usage or actual charges where available. API tiers, input limits and
billing units differ. This dataset defines extraction inputs and references;
it contains no vendor ranking. Webstone's
[execution guide](https://github.com/lexmount/webstone/blob/7f010e7617b6ac6a6df366495480af9ac92e4840/examples/web_scraper/README.md)
describes native HTML/URL routes and certification.

## License, attribution and revisions

| Component | Publisher and license | Retained notice |
| --- | --- | --- |
| Original 140 archived pages, ground truth, evaluator, README and upstream extractor | Zyte, MIT, Copyright (c) 2021 Zyte | [LICENSE](LICENSE) and [original upstream license](definitions/upstream/LICENSE) |
| Lexmount-authored packaging metadata and source-qualified annotation supplement | Lexmount, Apache-2.0 | [LICENSE-annotations](LICENSE-annotations) and [NOTICE](NOTICE) |
| Content captured from third-party websites | Original website publishers retain their rights | Source URLs and [THIRD_PARTY.md](THIRD_PARTY.md) |

The two Hub license badges describe different components. They do not offer a
choice to relicense Zyte's original material or the captured websites. The upstream
project released its dataset with an MIT notice; this distribution retains that
notice and does not independently establish training or redistribution rights
for every website asset. Annotation amendments do not replace the original labels.

Cite the upstream [product-extraction benchmark](https://github.com/scrapinghub/product-extraction-benchmark)
and identify this dataset's full commit and reference view. For tooling, cite
[Webstone](https://github.com/lexmount/webstone/blob/7f010e7617b6ac6a6df366495480af9ac92e4840/CITATION.cff).
[VERSIONING.md](VERSIONING.md) describes changes to inputs, references and packaging.
No moving branch name identifies an evaluated edition.

[LexBench-Web-Fetch](https://huggingface.co/datasets/Lexmount/LexBench-Web-Fetch)
and [LexBench-WebMainBench](https://huggingface.co/datasets/Lexmount/LexBench-WebMainBench)
cover different retrieval and main-content extraction tasks with separate metrics.

## Public HTML snapshots

[snapshots.json](snapshots.json) binds every page ID to its SHA-256 and an immutable public deployment. Native extraction APIs receive `fixture_base + '/' + id`; the original HTML files remain in this repository.

Original files are authoritative. Publication verifies the declared dataset version and complete input inventory before adding this binding. Changed HTML requires a new deployment and a new HF commit; previous files and deployment URLs remain available. Pin the full HF commit for evaluation and verify page hashes before and after calls. A mismatch stops collection rather than silently replacing the input. The navigation index does not host dataset HTML.