bowang0911 commited on
Commit
cdd078c
·
verified ·
1 Parent(s): 3f32c32

Add DAPR-ConditionalQA chunk-level retrieval eval (native passages + coref)

Browse files
README.md ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ task_categories:
5
+ - text-retrieval
6
+ size_categories:
7
+ - 1K<n<10K
8
+ dataset_info:
9
+ - config_name: documents
10
+ features:
11
+ - name: chunk_id
12
+ dtype: string
13
+ - name: chunk
14
+ dtype: string
15
+ - name: source_url
16
+ dtype: string
17
+ - name: title
18
+ dtype: string
19
+ - name: chunk_idx
20
+ dtype: int64
21
+ - name: chunk_start_char
22
+ dtype: int64
23
+ - name: chunk_end_char
24
+ dtype: int64
25
+ splits:
26
+ - name: test
27
+ num_bytes: 1761506
28
+ num_examples: 4936
29
+ download_size: 600220
30
+ dataset_size: 1761506
31
+ - config_name: queries
32
+ features:
33
+ - name: original_query
34
+ dtype: string
35
+ - name: query
36
+ dtype: string
37
+ - name: answer
38
+ list: string
39
+ - name: score
40
+ list: int64
41
+ - name: source_url
42
+ list: string
43
+ - name: frag_start_char
44
+ list: int64
45
+ - name: frag_end_char
46
+ list: int64
47
+ - name: n_gold
48
+ dtype: int64
49
+ - name: roles
50
+ list: string
51
+ - name: fact
52
+ dtype: string
53
+ splits:
54
+ - name: test
55
+ num_bytes: 26959
56
+ num_examples: 38
57
+ download_size: 14279
58
+ dataset_size: 26959
59
+ configs:
60
+ - config_name: documents
61
+ data_files:
62
+ - split: test
63
+ path: documents/test-*
64
+ - config_name: queries
65
+ data_files:
66
+ - split: test
67
+ path: queries/test-*
68
+ ---
69
+
70
+ # EDGAR 8-K — Context Chunk Retrieval (coreference + near-duplicate)
71
+
72
+ A contextualized sentence-level (query2chunk) retrieval eval built from **SEC 8-K
73
+ restructuring filings** (EDGAR), for the
74
+ [Chunk-level Retrieval Eval](https://huggingface.co/collections/bowang0911/chunk-level-retrieval-eval)
75
+ collection.
76
+
77
+ **Why this benchmark exists.** Standard passage benchmarks (e.g. DAPR) don't discriminate
78
+ contextual embedding models, because their answer passages already contain the
79
+ distinguishing entity and have no near-duplicate distractors. This dataset is built to
80
+ stress **document-context disambiguation**:
81
+
82
+ - **Sentence chunks are coreference-dependent** — the answer sentence says *"the Company"*,
83
+ never the company name, so resolving it requires the surrounding document.
84
+ - **Near-identical distractors across companies** — 8-Ks are templated, so the corpus holds
85
+ dozens of near-identical sentences like *"the Company estimates that it will incur charges
86
+ of approximately $X million"* differing only by amount/company. In isolation these are
87
+ indistinguishable; only the document context resolves which "Company" is meant.
88
+
89
+ Example — query *"What restructuring charges does Elastic expect to incur?"* → answer
90
+ *"The Company expects to incur total non-recurring cash charges of approximately $22 million
91
+ to $25 million…"* competes against 58 near-identical charge sentences from other filings.
92
+
93
+ ## Stats
94
+
95
+ | | count |
96
+ | --- | --- |
97
+ | documents (filings) | 246 |
98
+ | corpus (sentence chunks) | 4,936 |
99
+ | queries | 38 (28 with a supporting-evidence fragment) |
100
+ | near-duplicate charge sentences | 58 |
101
+ | near-duplicate workforce sentences | 53 |
102
+
103
+ ## Graded gold: answer vs supporting evidence
104
+
105
+ Gold is **graded** via the standard `score` field (no schema change vs the rest of the
106
+ collection):
107
+
108
+ | `score` | role | meaning |
109
+ | --- | --- | --- |
110
+ | **2** | `answer` | the sentence that directly answers the query (uses coreference) |
111
+ | **1** | `evidence` | a supporting fact that disambiguates the answer (e.g. the sentence binding the company name to *"the Company"*) |
112
+
113
+ Derive the two metrics from one qrels:
114
+ ```python
115
+ standard_recall@k = |topk ∩ {score >= 2}| / |{score >= 2}| # answer only
116
+ evidence_recall@k = |topk ∩ {score >= 1}| / |{score >= 1}| # answer + supporting evidence
117
+ ```
118
+ `nDCG@k` can consume the graded scores directly. A human-readable `roles` field
119
+ (`answer` / `evidence`) mirrors the score. Backward compatible: datasets that use
120
+ `score = 1` uniformly are answer-only (no evidence tier).
121
+
122
+ ## Configs
123
+
124
+ ### `documents`
125
+ `chunk_id`, `chunk` (one sentence), `source_url` (filing accession — **group chunks by this
126
+ to give a contextual model its document view**), `title` (company + 8-K date),
127
+ `chunk_idx` (sentence position in the filing), `chunk_start_char` / `chunk_end_char`.
128
+
129
+ ### `queries`
130
+ `original_query` / `query`, `answer[]` (gold sentence texts), `score[]` (2=answer, 1=evidence),
131
+ `source_url[]` (filing per gold), `frag_start_char[]` / `frag_end_char[]`, `n_gold`,
132
+ `roles[]` (`answer`/`evidence`), `fact` (`workforce` / `charges`).
133
+
134
+ Gold matching: a chunk is gold for a query if it shares `source_url` and its
135
+ `[chunk_start_char, chunk_end_char)` overlaps a gold fragment's span (each gold maps to
136
+ exactly one sentence chunk).
137
+
138
+ ## Construction & limitations
139
+
140
+ Built from EDGAR full-text search for restructuring 8-Ks (2022–2026), one primary filing per
141
+ company. HTML cleaned (inline-XBRL/hidden/exhibit boilerplate stripped, sliced to the Item
142
+ narrative), sentence-split with **NLTK Punkt**, junk/heading/fragment chunks removed.
143
+
144
+ - **Prototype scale** — 38 queries; the query set skews toward `charges` (workforce answers
145
+ more often repeat the company name and are filtered out to preserve the coreference axis).
146
+ - **Templated queries** — 2 regex-generated templates (`workforce`, `charges`); phrasing
147
+ overlaps the gold, so the difficulty is the coreference/near-duplicate disambiguation, not
148
+ the wording. A natural/LLM-generated query pass is future work.
149
+ - **Evidence coverage** — 28/38 queries have a supporting-evidence fragment; the rest are
150
+ answer-only.
151
+
152
+ Source: public SEC EDGAR filings (U.S. government works / public domain).
documents/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:692306ebc405514378497ec486a6644078626ae6c285793511136b4e79d5b8ea
3
+ size 600220
queries/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:575196179f081e165f461f669510bdbf20e0c50e097cf0dfd474b4c5d3682126
3
+ size 14279