feat: multi-judge consensus scoring with agreement signal - #57
Open
brainsparker wants to merge 1 commit into
Open
feat: multi-judge consensus scoring with agreement signal#57brainsparker wants to merge 1 commit into
brainsparker wants to merge 1 commit into
Conversation
Score with a panel of 2-5 LLM judges in parallel. The reported score is the panel median, each result carries per-judge scores and an agreement gap, and results where the panel disagrees beyond a configurable threshold are flagged low confidence in the HTML report and JSON output. Fully backward compatible with single-judge configs. Co-Authored-By: Claude Fable 5 <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.
What this does
PromptLens can now score with a panel of 2-5 LLM judges instead of a single judge. Each judge on the panel evaluates every response independently and in parallel (asyncio.gather). The reported score is the panel median (robust to one outlier judge), and every result carries:
Low-confidence results get an amber "low confidence" badge in the HTML report; agreeing panels get a quiet "N-judge consensus" note. All fields flow through the JSON export automatically.
How to use it
Existing single-judge configs are untouched: when judges is absent, the runner builds the same LLMJudge as before (a new create_judge factory picks the implementation). Old serialized runs still validate because all new JudgeScore fields default.
Why this, why now
This was roadmap item one in the README, and the market evidence for it is fresh:
promptfoo, DeepEval, and Langfuse all default to single-judge scoring today. Shipping panel consensus with a visible disagreement signal is a real differentiator for a lightweight local tool, and mixing providers on the panel also reduces self-preference bias.
Runner-up candidates considered today: an A2A v1.0 operation-name upgrade for youagent (solid, but mechanical and that repo has an external interop PR in flight) and merging you.md's pending export targets plus an npm publish (release plumbing that needs npm credentials, not a feature).
Implementation notes
Test status
101 passed (83 existing plus 18 new in tests/test_multi_judge.py). New tests cover config validation (panel size caps, threshold range), factory selection, median consensus with an outlier, half-up rounding on even panels, custom and zero thresholds, panel identity fields, judge-failure fallback behavior, and backward compatibility of the result model. Also verified end to end: a YAML config with a judge panel parses through RunConfig, and the HTML report renders the low-confidence badge. All judges are mocked; no live API keys needed.