Repository navigation
fix: grade every question in batched prompt evaluation - #63
林SO (Linxiushen) wants to merge 1 commit into
Conversation
|
I checked this against the cases in my comment on #57, running
Two limits that are design choices rather than bugs in this change:
|
|
Thanks for running this independently. I reproduced your numbers on my side: the test file gives 26 passed on this branch and 14 failed / 12 passed against unchanged Both limits you list are real, and I confirmed each of them against the branch. I would rather leave them out of this change, for these reasons: Positional alignment. Confirmed: with Class-level tag constants. Also confirmed: a On the complete-tag regex: agreed, and that is why the pattern matches No code changes from this round. Lint state on the changed files is unchanged from what the description reports: the new test file passes Black, isort and Flake8, and the Black/isort failures on |
With
questions_batch_size > 1,evaluate()replaces the extracted answers with the full completion and only grades the first question. Unanswered questions are also omitted fromwrong_examples, so an incomplete batch can receive a perfect score.Grade each tagged answer against its corresponding question and include unanswered questions in the wrong examples. Preserve the complete response for single-question evaluation and retain the existing policy of taking the last answers when the model returns extra ones. Matching complete tags also keeps empty answers from producing overlapping regex matches.
Fixes #57 and #36. Thanks to shaurya416 for the detailed compatibility analysis, including preserving tags for dataset-specific extractors.
Validation uses the actual
CritiqueNRefine, shipped configuration/prompt-pool classes,ParamLogger, and two dataset processors covering first-tag and last-tag extraction. It covers wrong, missing, empty, extra, untagged and multiline batch answers, single-question compatibility, and an empty dataset. No LLM calls or full optimization experiments were run.python -m pytest tests/test_batch_evaluation.py -q --tb=short: 14 failed / 12 passed on unchanged main in a separate worktree; 26 passed after the fix (Python 3.11, Windows).git diff --checkpasses. A dependency emits an existing Pydantic field-attribute warning.