File size: 6,098 Bytes
0e11747
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
830cdf4
 
0e11747
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
830cdf4
0e11747
830cdf4
 
 
0e11747
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
830cdf4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e11747
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
830cdf4
 
 
 
 
 
 
 
 
 
 
 
 
0e11747
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
830cdf4
0e11747
830cdf4
 
 
0e11747
 
 
 
 
 
 
 
 
 
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
---
language:
- en
license: apache-2.0
task_categories:
- text-retrieval
task_ids:
- document-retrieval
annotations_creators:
- algorithmic
multilinguality: monolingual
source_datasets:
- original
pretty_name: ParseEmbed
size_categories:
- n<1K
tags:
- benchmark
- evaluation
- text
- retrieval
- hard-negatives
- table-retrieval
configs:
- config_name: parse-embed
  data_files:
  - split: mean
    path: mean.jsonl
  - split: text_formatting
    path: text_formatting.jsonl
  - split: table
    path: table.jsonl
- config_name: corpus
  data_files:
  - split: test
    path: corpus.jsonl
- config_name: queries
  data_files:
  - split: test
    path: queries.jsonl
- config_name: default
  data_files:
  - split: test
    path: qrels.jsonl
dataset_info:
- config_name: parse-embed
  features:
  - name: id
    dtype: string
  - name: query
    dtype: string
  - name: positive_doc_id
    dtype: string
  - name: positive_text
    dtype: string
  - name: hard_negative_doc_ids
    sequence: string
  - name: hard_negative_texts
    sequence: string
  - name: answer
    dtype: string
  - name: style
    dtype: string
  - name: difficulty
    dtype: string
  splits:
  - name: mean
    num_examples: 240
  - name: text_formatting
    num_examples: 240
  - name: table
    num_examples: 240
- config_name: corpus
  features:
  - name: _id
    dtype: string
  - name: title
    dtype: string
  - name: text
    dtype: string
  - name: style
    dtype: string
  - name: difficulty
    dtype: string
  - name: trap
    dtype: string
  splits:
  - name: test
    num_examples: 2880
- config_name: queries
  features:
  - name: _id
    dtype: string
  - name: text
    dtype: string
  - name: style
    dtype: string
  - name: difficulty
    dtype: string
  - name: answer
    dtype: string
  splits:
  - name: test
    num_examples: 720
- config_name: default
  features:
  - name: query-id
    dtype: string
  - name: corpus-id
    dtype: string
  - name: score
    dtype: int64
  splits:
  - name: test
    num_examples: 720
---

# ParseEmbed

Hard, parse-sensitive retrieval evaluation for embedding models.

ParseEmbed is a compact benchmark for embedding models. It tests whether a
model can retrieve the exact correct document when hard negatives share nearly
all surface tokens with the answer.

## Tasks

| Task ID | Split | What it measures |
|---------|-------|------------------|
| `mean` | `mean` | Semantic scope, negation, numeric values, temporal conditions, and exception handling |
| `text_formatting` | `text_formatting` | Meaning carried by Markdown-like formatting such as code spans, headings, quotes, and strike-through |
| `table` | `table` | Row/column grounding in compact Markdown tables |

## Files

- `eval.yaml`: Hugging Face Benchmark definition.
- `mean.jsonl`, `text_formatting.jsonl`, `table.jsonl`: benchmark splits.
- `corpus.jsonl`: retrieval corpus.
- `queries.jsonl`: retrieval queries.
- `qrels.jsonl`: relevance judgments.
- `evaluate_parseembed.py`: reference evaluator for embedding models.
- `requirements.txt`: evaluator dependencies.

## Quick Start

Install the evaluator dependencies:

```bash
pip install -r requirements.txt
```

Run a local evaluation:

```bash
python evaluate_parseembed.py   --model sentence-transformers/all-MiniLM-L6-v2   --task all   --k 10   --output results.json
```

The evaluator reports `ndcg_at_10`, `recall_at_10`, and `mrr_at_10` for each
task and an average across tasks.

## Evaluation Protocol

ParseEmbed is evaluated as dense retrieval:

1. Embed every document in `corpus.jsonl`.
2. Embed the queries from one benchmark split.
3. Rank corpus documents by cosine similarity.
4. Score the rank of each query's `positive_doc_id`.

The official leaderboard metric should be `ndcg_at_10`. `recall_at_10` and
`mrr_at_10` are included as secondary diagnostics.

## Data Format

Each benchmark split contains one JSON object per query with these fields:
`id`, `query`, `positive_doc_id`, `positive_text`, `hard_negative_doc_ids`,
`hard_negative_texts`, `answer`, `style`, and `difficulty`.

The corpus is stored separately in `corpus.jsonl`, and `qrels.jsonl` provides
standard retrieval relevance judgments with `query-id`, `corpus-id`, and
`score`.

## Eval Results

Model repositories can report results with `.eval_results/parseembed.yaml`:

```yaml
- dataset:
    id: Convence/ParseEmbed
    task_id: mean
    revision: <dataset_commit_hash>
  value: <ndcg_at_10_score>
  notes: "metric=ndcg_at_10"
```

Use task IDs `mean`, `text_formatting`, and `table`.

## Benchmark Registration

This repository is prepared for Hugging Face's beta Benchmark system:

- It contains a root `eval.yaml`.
- `evaluation_framework` is set to `parseembed`.
- The benchmark has three task leaderboards: `mean`, `text_formatting`, and
  `table`.
- A working reference evaluator is included in `evaluate_parseembed.py`.

Because Hugging Face's Benchmark feature is allow-listed, `parseembed` must be
added by the Hugging Face team before the official Benchmark tag appears.

## Usage

```python
from datasets import load_dataset

mean = load_dataset("Convence/ParseEmbed", "parse-embed", split="mean")
corpus = load_dataset("Convence/ParseEmbed", "corpus", split="test")
queries = load_dataset("Convence/ParseEmbed", "queries", split="test")
qrels = load_dataset("Convence/ParseEmbed", split="test")
```

## Dataset Construction

The benchmark is generated deterministically from `generate_parseembed.py` with
seed `91247`. Each query has one positive document and three hard negatives.
The negatives are constructed by changing a decisive detail while preserving
most of the vocabulary.

No private or external source text is used. The benchmark is synthetic and is
intended as a diagnostic stress test alongside natural retrieval benchmarks.

## Reproducibility

ParseEmbed is fully deterministic. Regenerating from `generate_parseembed.py`
with the same seed produces the same queries, corpus IDs, hard negatives, and
relevance judgments.

## Size

- Queries: 720
- Corpus documents: 2,880
- Queries per task: 240

## License

Apache 2.0