A meta-evaluation system that detects bias, inconsistency, and hallucinated rationales in automated LLM judges. Uses the PubMedQA medical QA dataset to stress-test whether AI evaluators can actually be trusted.
Live Dashboard: Streamlit App
| Finding | Value |
|---|---|
| Gemini positional bias | 61.5% (threshold: 10%) |
| Gemini hallucinated rationale | 96.9% (threshold: 5%) |
| Krippendorff's Alpha (cross-judge) | -0.15 (judges agree less than chance) |
| Gemini vs Human expert correlation | -0.13 (anti-correlated with ground truth) |
- Runs 5 judges (Gemini LLM, ROUGE-like, BERTScore-like, Regex Tripwire, Human Gold Labels) on 200 PubMedQA examples
- Generates adversarial test variants (position-swap, paraphrase, length, tripwire) — 6 variants per example, 6000 total evaluations
- Detects 6 bias types: positional bias, verbosity bias, self-enhancement, inconsistency, hallucinated rationale, calibration failure
- Computes cross-judge agreement (Cohen's Kappa, Krippendorff's Alpha)
- Produces a Judge Health Report with composite trust scores and a Streamlit dashboard
git clone https://github.com/Anantaverma20/AI-Judge-Alignment-Checker.git
cd AI-Judge-Alignment-Checker
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtOptional — set a Gemini API key for live LLM judging (free from aistudio.google.com):
export GOOGLE_API_KEY="your-key-here"Without a key, Gemini falls back to a deterministic offline scorer.
# Process PubMedQA data
python main.py --process-data
# Run full pipeline (judges + detectors + reports)
python main.py --run-all
# Launch the dashboard
streamlit run app/streamlit_app.py├── judges/ # 5 judge implementations (LLM, rule-based, human gold)
├── detectors/ # 6 bias detectors + adversarial test suite
├── reports/ # Agreement metrics, health report, disagreement map
├── alignment/ # LoRA fine-tuning pipeline scaffold
├── app/ # Streamlit dashboard
├── data/ # PubMedQA loader and processing
├── outputs/ # Pre-computed results (JSON)
├── tests/ # Regression tests
├── main.py # CLI entry point
└── technical_design.md # Full TDD with experiment + decision logs
Python, Streamlit, Plotly, scikit-learn, SciPy, Google Generative AI (Gemini), Hugging Face Datasets, Krippendorff
MIT