Skip to content

Add human calibration workflow for semantic evaluation - #26

Merged
sakshammaurya merged 2 commits into
mainfrom
feat/human-calibrated-semantic-evaluation
Nov 19, 2026
Merged

sakshammaurya merged 2 commits into
mainfrom
feat/human-calibrated-semantic-evaluation

Conversation

@sakshammaurya

@sakshammaurya sakshammaurya commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add a versioned, blinded human-review packet generator for saved RAG reports
  • add an explicit human-label schema with reviewed/unreviewed state and N/A applicability
  • add calibration comparison for exact agreement, within-one agreement, MAE, pass/fail agreement, and unsupported-claim agreement
  • report human/judge case mismatches and case-level score disagreements without converting missing values to zero
  • commit the real eight-case v2 review packet, unreviewed template, and completed blinded human review
  • document reviewer instructions, blinding rules, metric definitions, commands, and small-sample limitations

Blinding and integrity

  • packet includes question, answer, abstention state, and retrieved evidence
  • packet excludes expected facts, deterministic correctness, judge scores, and pass/fail labels
  • rubric version, dataset version, and pass threshold must match before comparison
  • applicability is derived from preserved abstention/evidence flags and cannot be changed to exclude inconvenient scores
  • malformed judge judgments reuse the RAG-003 strict parser and are rejected
  • generators refuse to overwrite existing files
  • a regression test validates that the committed human-review artifact remains complete and schema-valid

Human review results

One reviewer completed all 8 blinded cases at pass threshold 3:

  • human pass rate: 6/8 (75%)
  • mean faithfulness: 4.0 across 6 applicable cases
  • mean answer relevance: 4.0 across 8 cases
  • mean context relevance: 3.17 across 6 applicable cases
  • unsupported-claim cases: 0/8

These are human-only descriptive results, not judge-calibration results or ground truth. One rubric-consistency point remains visible for future adjudication: remote work received context relevance 4 with one irrelevant passage, while the comparable home-office case received 3 with one irrelevant passage. The reviewer label is preserved rather than silently rewritten.

Validation

  • python -m pytest tests/test_semantic_calibration.py -q: 15 passed
  • python -m pytest -m "not integration" -q: 124 passed, 6 deselected
  • python -m ruff check .: passed
  • git diff --check: passed
  • committed reviewed-label validation: 8 cases, 8 reviewed

Synthetic fixture example only

The test fixture intentionally produces:

  • answer-relevance exact agreement: 0.0
  • within-one agreement: 0.5
  • mean absolute error: 1.5
  • pass/fail agreement: 0.0
  • unsupported-claim agreement: 0.5

These values test disagreement handling and are not measured project results.

Scope and completion boundary

  • no production API, retrieval, generation, deterministic evaluator, or semantic judge behavior changed
  • no LangChain, LangGraph, RAGAS, or DeepEval dependency
  • the separate usage: null provider robustness issue is intentionally not included
  • the human review is complete; measured human-versus-judge calibration remains pending because no compatible semantic-judge report is committed
  • a second blinded reviewer and adjudication are recommended before treating human labels as a reference baseline

@sakshammaurya
sakshammaurya merged commit 5810c47 into main Nov 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant