Skip to content

Fix gpqa-fi inspect backend: Finnish prompt + Finnish answer parsing - #27

Merged
dzautner merged 2 commits into
mainfrom
fix/gpqa-fi-inspect
Sep 28, 2026
Merged

dzautner merged 2 commits into
mainfrom
fix/gpqa-fi-inspect

Conversation

@dzautner

@dzautner dzautner commented Sep 28, 2026 •

Copy link
Copy Markdown

Reported by Kai Hakala: gpqa-fi:diamond on the inspect-ai backend (what TW runs) sent inspect's default English multiple-choice prompt and scored with choice(), which only parses ANSWER: X. Finnish answers (Vastaus: X) were scored incorrect.

Changes

  • gpqa_fi.py: inspect solver is multiple_choice(template=...) using the same Finnish instruction as the native prompt functions (GPQA_FI_INSTRUCTION, now shared); scorer is multichoice_scorer(language=Language.FINNISH). Applied to both gpqa-fi and gpqa-fi:diamond; versions bumped.
  • metrics.py: multichoice_scorer takes a language (default English, no other callers) and builds regexes for len(state.choices) letters. Previously it used len_choices=1, so only A could ever be extracted.

Verification (TW, vLLM 0.20 container, deployed runtime + this patch)

mockllm smoke, 6 samples of gpqa-fi:diamond with scripted completions:

completion before (deployed) after
...Vastaus: **A** (correct) I C
Vastaus: A (correct) I C
vastaus: C. (correct) I C
Vastaus: C (wrong) I I
... Vastaus: C (wrong) I I
ANSWER: B (correct) C C

Prompt before: Answer the following multiple choice question...; after: Vastaa seuraavaan monivalintakysymykseen....

Native backend: gpqa-fi:diamond now uses a Finnish counterpart of gpqa_instruct_pass_at_k (same config, Language.FINNISH).

Crafted-completion check (native Finnish / old English / inspect Finnish), all through the real scorer code on TW:

  • Vastaus: A, **Vastaus: A**, vastaus: (A). → correct in all
  • Vastaus: A. Vaihtoehto B on väärä. → Finnish correct, old English metric picks the distractor B
  • wrong answers → incorrect in all

Known limitation, shared with English gpqa:diamond: in lazy_indices_regex the letter suffix does not accept a newline, so Vastaus: A\n\n<more text mentioning other letters> falls back to the last bare letter. Left unchanged on purpose to keep parity with the English task.

Daniel Zautner added 2 commits September 28, 2026 12:30
The inspect-ai path used multiple_choice() with inspect's default English
template and the choice() scorer, which only parses 'ANSWER: X'. Finnish
responses ('Vastaus: X') were therefore scored incorrect.

- Render the Finnish instruction via a multiple_choice template, shared
  with the native prompt functions.
- Score with multichoice_scorer(language=Language.FINNISH), which uses
  lighteval's language-aware index extraction ('vastaus' anchor).
- multichoice_scorer: accept a language, and build regexes for all
  choices (previously len_choices=1, so only 'A' was extractable).
Metrics.gpqa_instruct_pass_at_k extracts with English anchors. Use a Finnish
counterpart (same config, Language.FINNISH) so 'Vastaus: X' is recognised.
@dzautner
dzautner merged commit 8d5d7eb into main Sep 28, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant