feat: add ranking conflict detection between models #130
+1,245
−3
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
Adds detection of fundamental disagreements between models based on how they rank each other during Stage 2.
This helps distinguish between:
Conflict Types
Mutual Opposition (High Severity)
Both models rank each other poorly while ranking themselves highly. This pattern strongly indicates fundamental disagreement rather than stylistic preferences.
Example: Model A ranks itself #1 and Model B #3, while Model B ranks itself #1 and Model A #3.
Ranking Swap (Medium Severity)
Large position difference in mutual rankings. One model places the other high, but the other places them low.
Example: Model A ranks Model B #1, but Model B ranks Model A #4.
Changes
Backend (
backend/council.py):detect_ranking_conflicts()functionranker_rankings[ranker_model][ranked_model] = positionFrontend:
Stage2.jsx: AddedrankingConflictsprop and display componentStage2.css: Red-styled card (distinct from yellow minority opinions)ChatInterface.jsx: Pass ranking_conflicts to Stage2Validation
8 test cases in
tests/test_ranking_conflicts.py:test_no_conflict_when_agreementtest_mutual_opposition_detectedtest_ranking_swap_detectedtest_empty_inputstest_single_model_no_conflicttest_5_model_conflict_scenariotest_conflict_details_populatedtest_severity_orderingDependencies
This PR builds on:
Test plan
python3 tests/test_ranking_conflicts.py- all 8 tests passpython3 tests/test_minority_opinions.py- all 8 tests pass🤖 Generated with Claude Code