How sumanth369msb/llm-as-a-judge works
This is a configurable LLM-as-a-judge quality-control framework. Its main workflow runs batch evaluation with either custom rubrics or Ragas, compares scores with human baselines at a calibration gate, then optionally simulates or accepts production traffic for asynchronous shadow evaluation and drift reporting. The graph preserves the provider-routing and pluggable observability branches. Some runtime wiring is documented in the README or pipeline entry point; unsampled implementation details are not inferred.
Main entry points: run_pipeline.py Pipeline runner · online_evaluator.py Shadow evaluator · evaluate_custom_judge.py Custom batch judge · __init__.py Observability backend factory
Components 18
Pipeline and calibration
- Pipeline runner
scripts/run_pipeline.py - Calibration gate
src/phase_2_calibration/calibration/calibrate_delta.py - Human baseline
data/human_baseline.csv
Evaluation engines
- Custom batch judge
src/phase_1_evaluation/custom_judges/evaluate_custom_judge.py - Ragas evaluator
src/phase_1_evaluation/ragas/evaluate_ragas.py - Faithfulness rubric
prompts/faithfulness_judge_prompt.py - Relevancy rubric
prompts/relevancy_judge_prompt.py
Judge providers
- Provider client and fallback
src/llm_client.py - LLM provider APIs
Online evaluation and observability
- Shadow evaluator
src/phase_3_online_evals/custom_online_evals/online_evaluator.py - Observability backend factory
src/phase_3_online_evals/langsmith_online_evals/__init__.py - Backend interface
src/phase_3_online_evals/langsmith_online_evals/base.py - Native drift backend
src/phase_3_online_evals/langsmith_online_evals/native_backend.py - Shadow evaluation store
- LangSmith backend
src/phase_3_online_evals/langsmith_online_evals/langsmith_backend.py - LangSmith service
Other components
- Pipeline operator
- Production request handler
Connections 22
- Pipeline operator → Pipeline runner: runs pipeline
README.md - Pipeline runner → Custom batch judge: selects engine
scripts/run_pipeline.py - Pipeline runner → Ragas evaluator: selects engine
README.md - Custom batch judge → Faithfulness rubric: formats rubric
src/phase_1_evaluation/custom_judges/evaluate_custom_judge.py - Custom batch judge → Relevancy rubric: formats rubric
src/phase_1_evaluation/custom_judges/evaluate_custom_judge.py - Custom batch judge → Provider client and fallback: requests judgments
src/phase_1_evaluation/custom_judges/evaluate_custom_judge.py - Provider client and fallback → LLM provider APIs: calls provider
src/llm_client.py - Pipeline runner → Calibration gate: checks scores
scripts/run_pipeline.py - Pipeline runner → Human baseline: reads baseline
scripts/run_pipeline.py - Pipeline runner → Shadow evaluator: starts simulation
scripts/run_pipeline.py - Production request handler → Shadow evaluator: enqueues traffic
README.md - Shadow evaluator → Faithfulness rubric: formats rubric
src/phase_3_online_evals/custom_online_evals/online_evaluator.py - Shadow evaluator → Relevancy rubric: formats rubric
src/phase_3_online_evals/custom_online_evals/online_evaluator.py - Shadow evaluator → Provider client and fallback: requests judgments
src/phase_3_online_evals/custom_online_evals/online_evaluator.py - Shadow evaluator → Observability backend factory: selects backend
src/phase_3_online_evals/custom_online_evals/online_evaluator.py - Observability backend factory → Backend interface: implements strategy
src/phase_3_online_evals/langsmith_online_evals/__init__.py - Observability backend factory → Native drift backend: constructs backend
src/phase_3_online_evals/langsmith_online_evals/__init__.py - Observability backend factory → LangSmith backend: constructs backend
src/phase_3_online_evals/langsmith_online_evals/__init__.py - Native drift backend → Shadow evaluation store: reads and writes
src/phase_3_online_evals/langsmith_online_evals/native_backend.py - LangSmith backend → LangSmith service: sends traces
README.md - Pipeline runner → Shadow evaluator: requests drift report
scripts/run_pipeline.py - Ragas evaluator → LLM provider APIs: evaluates with models
README.md