MaYiding commited on
Commit
cd48c1e
·
1 Parent(s): 07d7708

Update README

Browse files
Files changed (2) hide show
  1. README-ZH.md +18 -0
  2. README.md +18 -0
README-ZH.md CHANGED
@@ -43,6 +43,7 @@
43
  ```text
44
  OracleProto/
45
  ├── forecast_eval_set_example.db # SQLite 数据库文件(数据集本体;约 52 KB)
 
46
  ├── README.md # 本文件
47
  ├── LICENSE # MIT
48
  └── .gitattributes # HF 标准二进制属性
@@ -50,6 +51,8 @@ OracleProto/
50
 
51
  数据集以单个 SQLite 文件(而非 Parquet 或 JSONL)发布,因为提示重建配方与逐行 provenance 与题目行同住一个文件中(位于 `dataset_metadata.features_json`)。`datasets.Dataset` 的 loader 与 Parquet 转换示例见 §6。
52
 
 
 
53
  ---
54
 
55
  ## 3. 数据库 schema
@@ -350,6 +353,21 @@ def render_prompt(row, meta):
350
 
351
  完整参考 renderer(含 >26 选项的反引号规则与可选的 reflection / belief-elicitation 尾部)位于 [`forecast_eval/prompts.py`](https://github.com/MaYiding/OracleProto/blob/main/forecast_eval/prompts.py);复用它即可获得 byte-identical 提示。
352
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
353
  ---
354
 
355
  ## 7. 推荐评估协议
 
43
  ```text
44
  OracleProto/
45
  ├── forecast_eval_set_example.db # SQLite 数据库文件(数据集本体;约 52 KB)
46
+ ├── forecast_eval_set_example.csv # 行表的 CSV 导出;80 行 + 表头(约 18 KB)
47
  ├── README.md # 本文件
48
  ├── LICENSE # MIT
49
  └── .gitattributes # HF 标准二进制属性
 
51
 
52
  数据集以单个 SQLite 文件(而非 Parquet 或 JSONL)发布,因为提示重建配方与逐行 provenance 与题目行同住一个文件中(位于 `dataset_metadata.features_json`)。`datasets.Dataset` 的 loader 与 Parquet 转换示例见 §6。
53
 
54
+ CSV 是 `forecast_eval_set_example` 行表的导出,不含 `dataset_metadata`,因此提示模板仅能从 SQLite 文件中获取。下游流水线只需要这 80 行(pandas、电子表格、`grep`)并自行重建提示时使用 CSV。`options` 列保留为 JSON 编码的数组字符串,按 RFC 4180 转义。
55
+
56
  ---
57
 
58
  ## 3. 数据库 schema
 
353
 
354
  完整参考 renderer(含 >26 选项的反引号规则与可选的 reflection / belief-elicitation 尾部)位于 [`forecast_eval/prompts.py`](https://github.com/MaYiding/OracleProto/blob/main/forecast_eval/prompts.py);复用它即可获得 byte-identical 提示。
355
 
356
+ ### 6.5 使用预生成的 CSV(标准库 `csv`,不含提示模板)
357
+
358
+ ```python
359
+ import csv, json
360
+
361
+ with open("forecast_eval_set_example.csv", encoding="utf-8", newline="") as f:
362
+ rows = [
363
+ {**r, "options": json.loads(r["options"])}
364
+ for r in csv.DictReader(f)
365
+ ]
366
+ print(f"loaded {len(rows)} rows; first event: {rows[0]['event']!r}")
367
+ ```
368
+
369
+ CSV 路径完全绕过 `dataset_metadata`。要把行与提示模板配对,要么按 §5 手工渲染,要么回到 §6.1 的 SQLite 路径。
370
+
371
  ---
372
 
373
  ## 7. 推荐评估协议
README.md CHANGED
@@ -64,6 +64,7 @@ A SQLite-packaged evaluation set of 80 hand-curated forecasting questions on rea
64
  ```text
65
  OracleProto/
66
  ├── forecast_eval_set_example.db # SQLite database file (the dataset; ~52 KB)
 
67
  ├── README.md # this file
68
  ├── LICENSE # MIT
69
  └── .gitattributes # standard HF binary attributes
@@ -71,6 +72,8 @@ OracleProto/
71
 
72
  The dataset ships as one SQLite file, not Parquet or JSONL, because the prompt-reconstruction recipe and per-row provenance live in the same file as the rows (in `dataset_metadata.features_json`). A loader for `datasets.Dataset` and Parquet conversion appears in §6.
73
 
 
 
74
  ---
75
 
76
  ## 3. Database schema
@@ -371,6 +374,21 @@ def render_prompt(row, meta):
371
 
372
  The full reference renderer (with the >26-option backtick rule and an optional reflection / belief-elicitation tail) lives at [`forecast_eval/prompts.py`](https://github.com/MaYiding/OracleProto/blob/main/forecast_eval/prompts.py); reusing it gives byte-identical prompts.
373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
  ---
375
 
376
  ## 7. Recommended evaluation protocol
 
64
  ```text
65
  OracleProto/
66
  ├── forecast_eval_set_example.db # SQLite database file (the dataset; ~52 KB)
67
+ ├── forecast_eval_set_example.csv # CSV export of the rows table; 80 rows + header (~18 KB)
68
  ├── README.md # this file
69
  ├── LICENSE # MIT
70
  └── .gitattributes # standard HF binary attributes
 
72
 
73
  The dataset ships as one SQLite file, not Parquet or JSONL, because the prompt-reconstruction recipe and per-row provenance live in the same file as the rows (in `dataset_metadata.features_json`). A loader for `datasets.Dataset` and Parquet conversion appears in §6.
74
 
75
+ The CSV is a row-table export of `forecast_eval_set_example`; it does not carry `dataset_metadata`, so the prompt template is reachable only via the SQLite file. Use the CSV when a downstream pipeline needs only the 80 rows (pandas, spreadsheet, `grep`) and reconstructs prompts on its own. The `options` column is preserved as a JSON-encoded array string, escaped per RFC 4180.
76
+
77
  ---
78
 
79
  ## 3. Database schema
 
374
 
375
  The full reference renderer (with the >26-option backtick rule and an optional reflection / belief-elicitation tail) lives at [`forecast_eval/prompts.py`](https://github.com/MaYiding/OracleProto/blob/main/forecast_eval/prompts.py); reusing it gives byte-identical prompts.
376
 
377
+ ### 6.5 With the prebuilt CSV (stdlib `csv`, no prompt template)
378
+
379
+ ```python
380
+ import csv, json
381
+
382
+ with open("forecast_eval_set_example.csv", encoding="utf-8", newline="") as f:
383
+ rows = [
384
+ {**r, "options": json.loads(r["options"])}
385
+ for r in csv.DictReader(f)
386
+ ]
387
+ print(f"loaded {len(rows)} rows; first event: {rows[0]['event']!r}")
388
+ ```
389
+
390
+ The CSV path skips `dataset_metadata` entirely. To pair the rows with the prompt template, either render by hand from §5 or fall back to the SQLite path in §6.1.
391
+
392
  ---
393
 
394
  ## 7. Recommended evaluation protocol