Download scripts/gate_make_jsonl6.py from Raphael2099/llm-data-eval-20261030: direct link, hf CLI and curl.
- Browser
- Download file 6.9 kB
-
https://huggingface.co/datasets/Raphael2099/llm-data-eval-20261030/resolve/main/scripts/gate_make_jsonl6.py
- Command line
-
hf download hf://datasets/Raphael2099/llm-data-eval-20261030/scripts/gate_make_jsonl6.py
-
curl -L -o gate_make_jsonl6.py https://huggingface.co/datasets/Raphael2099/llm-data-eval-20261030/resolve/main/scripts/gate_make_jsonl6.py
6.9 kB
| # gate_make_jsonl6.py —— WW-6 six-slip gate, PANEL expansion (2026-10-30, relay round 3). | |
| # Why: round 2 proved the gate flips inside one arm when only the prompt wording changes | |
| # (greedy is deterministic, so repeats add nothing; paraphrase diversity is the only variance source). | |
| # So instead of k repeats we widen the probe bank to 13 probes and score all 3 criteria per probe. | |
| # Criteria (project standard): | |
| # C1 越王 must not be written 楚王 (must-not fail) | |
| # C2 「日不食」 on slip 64 must carry the 三 from slip 63 (three days) | |
| # C3 「赏谷既成」 = the awarded grain is ready/handed out, NOT "the grain ripened" | |
| # 用法: python gate_make_jsonl6.py OUT.jsonl | |
| import json, sys | |
| SLIPS = [ | |
| ("1", "吴王夫差起师伐越遂克越邦越王句践失邦移登会稽"), | |
| ("2", "之山使大夫种行成于吴曰寡君乏无使使非材种不敢当君天王"), | |
| ("3", "敢私告于下执事孤不天上帝降威懠于越邦不在前后当"), | |
| ("63", "邦人救火进者莫复王乃惧鼓而复之死者千人王大戚哭泣若主三"), | |
| ("64", "日不食乃训为之赏谷既成王亲以授其后既发王焉饮食王焉始命绝"), | |
| ("79", "宗庙凡吴之土地民人越君是尽既有之孤余何有面目以视于天下越君其事也"), | |
| ] | |
| BODY = "".join("简%s:%s\n" % (n, t) for n, t in SLIPS) | |
| BODY_63_64 = "".join("简%s:%s\n" % (n, t) for n, t in SLIPS if n in ("63", "64")) | |
| S63 = dict(SLIPS)["63"] | |
| S64 = dict(SLIPS)["64"] | |
| # ---- P01/P02/P03/P04 are byte-identical to the round-2 probes (continuity of the series) ---- | |
| P01 = ( | |
| "以下是出土简牍《吴王》篇六支简的校订释文(无句读,简与简按顺序连读)。\n" | |
| "请按简号逐简给出今译,每简一行,只写译文,不要释文、不要说明。要求:紧贴简文," | |
| "只译简上有的词,不增补简上没有的信息;跨简连读的地方要按文意连起来译。\n\n" | |
| + BODY | |
| ) | |
| P02 = ( | |
| "以下是出土简牍《吴王》篇六支简的校订释文(简与简按顺序连读)。请逐简给出今译,每简一行。\n" | |
| "硬性要求:1) 人名、国名、地名必须与简文用字完全一致,简上写「越王」就写「越王」," | |
| "不得改成别的国名;2) 简上的数目字必须出现在译文对应处,不得省略;" | |
| "3) 只译简上有的词,不增补简上没有的信息。\n\n" | |
| + BODY | |
| ) | |
| P03 = ( | |
| "以下是出土简牍《吴王》篇相邻两支简的校订释文(无句读,两简连读)。\n" | |
| "请把这两支简连成一段今译,只写译文。译完后另起一行写「注:」," | |
| "用一句话说明「赏谷」在这里指什么。\n\n" | |
| + BODY_63_64 | |
| ) | |
| P04 = ( | |
| "以下是出土简牍《吴王》篇相邻两支简的校订释文(无句读,两简连读):\n\n" | |
| + BODY_63_64 + | |
| "\n请只回答三个问题,每问一行:\n" | |
| "问1:简64「日不食」的主语是谁?\n" | |
| "问2:简64 的「三」是从哪里来的?指什么?\n" | |
| "问3:「赏谷」是什么意思?谁赏给谁?\n" | |
| ) | |
| # ---- new probes: 9 more paraphrases, each a different framing of the same reading task ---- | |
| P05 = ( | |
| "任务:为出土简牍《吴王》篇下列六简做今译,并标出关键词义。\n" | |
| "格式:每简先写「简N:」再接译文;该简译完后,在同一行末尾用「【词义】」列出该简难词的义项" | |
| "(至少要覆盖简63的「三」与简64的「赏谷」)。不要写释文,不要写长篇说明。\n\n" | |
| + BODY | |
| ) | |
| P06 = ( | |
| "只译下面这一支简,给出白话今译,一行写完。只译简上有的词。\n\n" | |
| "简63:" + S63 + "\n" | |
| ) | |
| P07 = ( | |
| "下文给出相邻两支简(简63、简64),两简连读。请**只**给简64的今译,一行写完。\n" | |
| "简63 只作为上下文提供,不必译。只译简64上有的词,不增补。\n\n" | |
| "简63:" + S63 + "\n简64:" + S64 + "\n" | |
| ) | |
| P08 = ( | |
| "把下面六支简译成最简白话:一句一行,能省则省,不许扩写,不许加解释、不许加按语。\n\n" | |
| + BODY | |
| ) | |
| P09 = ( | |
| "以下为《吴王》篇六简释文(无句读,顺序连读)。请逐简今译;译文里凡出现人名、国名、" | |
| "数目字,都要在其后用括号注明简文原字,例如「越王(越王)」「三天(三)」。\n" | |
| "只译简上有的词。\n\n" | |
| + BODY | |
| ) | |
| P10 = ( | |
| "请做对照式整理:对下面六支简,先照抄该简释文,另起一行给今译,每简一个小节," | |
| "小节标题写简号。译文要紧贴简文,不增补。\n\n" | |
| + BODY | |
| ) | |
| P11 = ( | |
| "简牍《吴王》篇简63、简64 连读如下(无句读):\n\n" + BODY_63_64 + | |
| "\n只回答一个问题:「赏谷既成」四字怎么讲?谁赏给谁?其中「成」在这里是「备好、办成」" | |
| "还是「谷物成熟」?请直接给判断和理由,不要复述问题。\n" | |
| ) | |
| P12 = ( | |
| "简牍《吴王》篇简63、简64 连读如下(无句读):\n\n" + BODY_63_64 + | |
| "\n只回答:简64「日不食」的主语是谁?他几天没吃东西?这个天数是从哪一支简的哪个字得来的?\n" | |
| ) | |
| P13 = ( | |
| "简牍《吴王》篇六简释文(无句读,顺序连读):\n\n" + BODY + | |
| "\n只回答:简63「王大戚」和简64「王亲以授」里的「王」,是哪一国的国君?" | |
| "简文写作「越王」还是写作别的国名?请照简文用字回答。\n" | |
| ) | |
| # (id, prompt, max_new, criteria_applicable) | |
| # C1 is a must-not-fail check and is evaluated on every probe (vacuous pass if no 王 mentioned). | |
| # C2 only where slip 64's 日不食 is actually rendered/answered. | |
| # C3 only where 赏谷 is actually rendered/answered. | |
| PROBES = [ | |
| ("P01_v2_repeat", P01, 900, ("C1", "C2", "C3")), | |
| ("P02_v3_names", P02, 900, ("C1", "C2", "C3")), | |
| ("P03_v4_6463", P03, 700, ("C1", "C2", "C3")), | |
| ("P04_v5_qa", P04, 500, ("C1", "C2", "C3")), | |
| ("P05_gloss", P05, 1100, ("C1", "C2", "C3")), | |
| ("P06_only63", P06, 300, ("C1",)), | |
| ("P07_only64", P07, 400, ("C1", "C2", "C3")), | |
| ("P08_brief", P08, 700, ("C1", "C2", "C3")), | |
| ("P09_annot", P09, 900, ("C1", "C2", "C3")), | |
| ("P10_interlinear", P10, 1100, ("C1", "C2", "C3")), | |
| ("P11_qa_reward", P11, 400, ("C1", "C3")), | |
| ("P12_qa_three", P12, 400, ("C1", "C2")), | |
| ("P13_qa_names", P13, 300, ("C1",)), | |
| ] | |
| rows = [] | |
| for pid, prompt, mn, crit in PROBES: | |
| rows.append({"id": pid, "max_new": mn, "crit": list(crit), | |
| "messages": [{"role": "user", "content": prompt}], | |
| "slips": [{"slip_no": n, "text": t} for n, t in SLIPS]}) | |
| with open(sys.argv[1], "w", encoding="utf-8") as f: | |
| for r in rows: | |
| f.write(json.dumps(r, ensure_ascii=False) + "\n") | |
| print("WROTE", sys.argv[1], "rows", len(rows)) | |