diff --git a/data_preprocess/stem/gpqa.py b/data_preprocess/stem/gpqa.py index c06607cc1..a7d5e7016 100644 --- a/data_preprocess/stem/gpqa.py +++ b/data_preprocess/stem/gpqa.py @@ -31,7 +31,14 @@ def preprocess(text): return " " text = text.strip() text = text.replace(" [title]", ". ") - text = re.sub("\\[.*?\\]", "", text) + # NOTE: the upstream harness also does `re.sub("\\[.*?\\]", "", text)` here + # to strip citation-style "[1]" markers, but GPQA's Answer fields are + # dominated by organic-chemistry/physics questions where "[...]" is + # load-bearing content (IUPAC ring-locants like spiro[4.5], SMILES + # stereocenters like [C@H], LaTeX like \left[...\right], or plain math + # grouping). Auditing gpqa_main found 19/448 rows with such content and + # zero genuine citation markers -- dropped it (see gpqa_diamond.py, where + # the same line corrupted 12/198 answer choices). text = text.replace(" ", " ") return text diff --git a/data_preprocess/stem/gpqa_diamond.py b/data_preprocess/stem/gpqa_diamond.py index c1dbad484..72d62b287 100644 --- a/data_preprocess/stem/gpqa_diamond.py +++ b/data_preprocess/stem/gpqa_diamond.py @@ -31,7 +31,13 @@ def preprocess(text): return " " text = text.strip() text = text.replace(" [title]", ". ") - text = re.sub("\\[.*?\\]", "", text) + # NOTE: the upstream harness also does `re.sub("\\[.*?\\]", "", text)` here + # to strip citation-style "[1]" markers, but GPQA-Diamond's Answer fields + # are dominated by organic-chemistry/physics questions where "[...]" is + # load-bearing content (IUPAC ring-locants like spiro[4.5], SMILES + # stereocenters like [C@H], LaTeX like \left[...\right], or plain math + # grouping). Auditing all 198 questions found zero genuine citation + # markers and 12 corrupted answer choices from this line -- dropped it. text = text.replace(" ", " ") return text