[Dataset] Add ZebraLogic benchmark#2464
Merged
Merged
Conversation
Integrate the ZebraLogic logical reasoning benchmark (WildEval/ZebraLogic) into OpenCompass. ZebraLogic evaluates LLMs on constraint satisfaction problems (logic grid puzzles) and reveals the "curse of complexity" — accuracy degrades sharply as puzzle size grows. Two evaluation modes are supported: - mc_mode (3 259 samples): multiple-choice, evaluated with exact-match on the answer letter extracted from free-form model output. - grid_mode (1 000 samples): full grid completion, evaluated with cell-level accuracy by parsing markdown tables from model output. Changes: - opencompass/datasets/zebralogic.py – ZebraLogicDataset loader, ZebraLogicMCEvaluator, ZebraLogicGridEvaluator and helper functions - opencompass/datasets/__init__.py – register new classes - opencompass/configs/datasets/ZebraLogic/zebralogic_gen.py – eval configs - dataset-index.yml – add zebralogic entry Paper: https://arxiv.org/abs/2502.01100 HuggingFace: WildEval/ZebraLogic Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Myhs-phz
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two evaluation modes
mc_modegrid_modeFiles changed
opencompass/datasets/zebralogic.py—ZebraLogicDataset(HuggingFace loader, mc_mode choice formatting),ZebraLogicMCEvaluator(answer extraction + exact match),ZebraLogicGridEvaluator(markdown table parsing + cell-level accuracy)opencompass/datasets/__init__.py— register new classesopencompass/configs/datasets/ZebraLogic/zebralogic_gen.py— eval configs for both modesdataset-index.yml— add zebralogic entry under Reasoning categoryTest plan
_extract_mc_answer,_parse_grid_reference,_extract_grid_from_text) pass unit testsZebraLogicMCEvaluatorcorrectly scores predictions (50.0 on mixed correct/incorrect)ZebraLogicGridEvaluatorachieves 100% perfect accuracy on a perfect prediction🤖 Generated with Claude Code