Add position bias detection and Cohen's kappa to llm_judge#3810
Open
joaquinhuigomez wants to merge 1 commit intolm-sys:mainfrom
Open
Add position bias detection and Cohen's kappa to llm_judge#3810joaquinhuigomez wants to merge 1 commit intolm-sys:mainfrom
joaquinhuigomez wants to merge 1 commit intolm-sys:mainfrom
Conversation
Extends compute_agreement.py with compute_position_bias(), compute_cohens_kappa(), and interpret_kappa() functions that work with the standard _pair.jsonl output format. Modifies show_result.py to print a one-line consistency summary at the bottom of pairwise results and adds --show-consistency flag for detailed metrics (bias rate, direction, kappa, Landis & Koch). Includes 13 unit tests with synthetic data in tests/test_consistency_metrics.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
compute_position_bias(),compute_cohens_kappa(), andinterpret_kappa()tocompute_agreement.py, working with the standard_pair.jsonlformatdisplay_result_pairwise()inshow_result.pywith a one-line consistency summary (position bias rate + kappa) printed after win ratesdisplay_consistency_metrics()function and--show-consistencyCLI flag for detailed breakdown (agreement rate, bias direction, kappa with Landis & Koch interpretation)Test plan
python3 -m pytest tests/test_consistency_metrics.py -v)🤖 Generated with Claude Code