Conversation
There was a problem hiding this comment.
Pull request overview
Adds a reusable LLM-as-a-judge evaluator factory to the evaluation harness with shared OpenAI-parse utilities, rubric/prompt rendering, deterministic error metrics, and unit tests for success/error scenarios.
Changes:
- Introduces
make_llm_as_judge_evaluatorwith structured response parsing and mapping toEvaluationobjects - Adds shared grader utilities for structured parse calls (with retry), markdown loading, prompt rendering, and prompt serialization
- Adds pytest coverage for successful mapping, default/custom rubric behavior, and deterministic error metrics
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| aieng-eval-agents/aieng/agent_evals/evaluation/graders/llm_judge.py | Adds the LLM-judge evaluator factory and response-to-evaluations mapping |
| aieng-eval-agents/aieng/agent_evals/evaluation/graders/_utils.py | Adds shared helpers for structured parse calls, retry logic, rubric rendering, and serialization |
| aieng-eval-agents/aieng/agent_evals/evaluation/graders/config.py | Introduces request/retry configuration for LLM grader calls |
| aieng-eval-agents/aieng/agent_evals/evaluation/graders/init.py | Exposes grader factory/types at the package level |
| aieng-eval-agents/tests/aieng/agent_evals/evaluation/graders/test_llm_judge.py | Adds comprehensive unit tests for the evaluator factory and helpers |
| aieng-eval-agents/tests/aieng/agent_evals/evaluation/init.py | Establishes test package structure for evaluation modules |
| aieng-eval-agents/tests/aieng/agent_evals/evaluation/graders/init.py | Establishes test package structure for grader tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aieng-eval-agents/aieng/agent_evals/evaluation/graders/__init__.py
Outdated
Show resolved
Hide resolved
aieng-eval-agents/aieng/agent_evals/evaluation/graders/llm_judge.py
Outdated
Show resolved
Hide resolved
aieng-eval-agents/aieng/agent_evals/evaluation/graders/_utils.py
Outdated
Show resolved
Hide resolved
aieng-eval-agents/aieng/agent_evals/evaluation/graders/llm_judge.py
Outdated
Show resolved
Hide resolved
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.
Summary
This PR adds a reusable LLM-as-a-judge evaluator factory for the evaluation harness, including request/retry configuration, shared grader utilities, and comprehensive unit tests for success and error paths.
Clickup Ticket(s): N/A
Type of Change
Changes Made
make_llm_as_judge_evaluatorwith structured response parsing and mapping to Langfuse-compatibleEvaluationobjects.Testing
uv run pytest tests/)uv run mypy <src_dir>)uv run ruff check src_dir/)Manual testing details:
N/A
Screenshots/Recordings
N/A
Related Issues
N/A
Deployment Notes
N/A
Checklist