Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion data_preprocess/stem/gpqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 7 additions & 1 deletion data_preprocess/stem/gpqa_diamond.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down