-
docs: Add how-to guide for aligning LLM-as-Judge (#2348)
发布于
2025-10-14 15:45:47 +00:00 | 133 次提交 在此版本后已推送到 mainIssue Link / Problem Description
Adds documentation and examples for aligning LLM-as-Judge evaluators
with human expert judgments. This addresses a common challenge where LLM
judges may not align well with human evaluations, leading to unreliable
automated assessments.Changes Made
- Add comprehensive how-to guide:
docs/howtos/applications/align-llm-as-judge.md - Step-by-step instructions for measuring and improving judge alignment
- Add complete evaluation example:
examples/ragas_examples/judge_alignment/ evals.py: Baseline and improved judge metrics with alignment
measurement__init__.py: Module initialization with main entry points
- Documentation covers:
- Why judge alignment matters
- Dataset structure and loading
- Defining judge and alignment metrics
- Running baseline evaluations
- Iterating on judge prompts to improve alignment
Testing
How to Test
- Manual testing steps:
- Run baseline evaluation:
uv run python -m ragas_examples.judge_alignment - Verify alignment metrics are calculated correctly
- Build docs locally:
make serve-docsand navigate to the new guide
下载附件
- Add comprehensive how-to guide: