Repository navigation
docs(evaluate): document rubric_based_multi_turn_trajectory_quality_v1 and clarify Rubric.type / criterion.rubrics - #1853
Conversation
…1 and clarify Rubric.type / criterion.rubrics Closes three gaps in docs/evaluate/criteria.md: 1. Adds a section for `rubric_based_multi_turn_trajectory_quality_v1`. The metric is registered in metric_evaluator_registry.py and implemented in rubric_based_multi_turn_trajectory_evaluator.py upstream, but the explanatory section that its two sibling rubric-based metrics have was missing. Also adds the corresponding row to the criteria table. 2. Adds a "Notes On Rubrics" subsection under each of the three rubric-based metric sections, stating the required Rubric.type value (FINAL_RESPONSE_QUALITY / TOOL_USE_QUALITY / TRAJECTORY_QUALITY) and the criterion-vs-EvalCase rubric relationship (criterion.rubrics required and non-empty; EvalCase.rubrics is additive, filtered by type). 3. Adds the explicit `type` field to existing JSON examples in the two existing rubric-based sections so users have a complete template. Refs google#1852.
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
koverholt
left a comment
There was a problem hiding this comment.
Thanks for the PR and additions / fixes! The new section, table row, and the non-empty/additive notes are accurate and verified against adk-python.
Requesting changes on one substantive point, flagged inline: the Rubric.type filter only applies to EvalCase.rubrics, not to criterion-level rubrics in EvalConfig. The "Notes On Rubrics" bullets state it as a blanket rule, and the examples add type to criterion-level rubrics, which together imply criterion rubrics are dropped on a type mismatch, which they aren't. See the inline suggestions on both the bullets and the example type fields across all three sections. Everything else looks good.
(Cross-referencing #1833 as the original adk-bot issue where these were originally flagged.)
Only EvalCase.rubrics is filtered by type in create_effective_rubrics_list; criterion-level rubrics on EvalConfig are added unconditionally. Update the Notes On Rubrics bullet in each of the three rubric-based metric sections to reflect this, using koverholt's review suggestion.
…mples type is only consulted for entries in EvalCase.rubrics, per create_effective_rubrics_list. Keeping it on criterion-level rubrics implied they were type-filtered, which they are not. Removed from all six criterion-level rubric entries across the three rubric-based metric sections.
…ally applies The type field only affects filtering on EvalCase.rubrics per create_effective_rubrics_list. Show that behavior concretely in each of the three rubric-based metric sections by adding a small EvalCase.rubrics snippet with the type field set to the criterion's expected value, plus a one-line reminder that the effective rubric set passed to the judge is the union of criterion-level rubrics and any type-matching entries from EvalCase.rubrics.
|
Thank you @koverholt. Verified the filter scope in
PTAL. |
koverholt
left a comment
There was a problem hiding this comment.
Thanks for working through the issues and revising. All updates and content LGTM. Thank you for the contribution! Merging.
Fixes #1852.
What
Closes a documentation gap around rubric-based evaluation criteria in
docs/evaluate/criteria.md. Three small additions:rubric_based_multi_turn_trajectory_quality_v1. The metric is registered inmetric_evaluator_registry.pyand exists in upstream ADK 2.x, but the explanatory section that the other two rubric-based metrics have was missing. Also adds the corresponding row to the criteria table at the top of the page.Rubric.typenotes added to each rubric-based metric section. EachRubricBasedEvaluatorsubclass uses aRUBRIC_TYPEClassVar that acts as a filter — rubrics carried onEvalCase.rubricsare only picked up when theirtypefield matches the evaluator's expected value:Rubric.typerubric_based_final_response_quality_v1FINAL_RESPONSE_QUALITYrubric_based_tool_use_quality_v1TOOL_USE_QUALITYrubric_based_multi_turn_trajectory_quality_v1TRAJECTORY_QUALITYtypefield explicitly so users have a complete template.criterion.rubricsrequirement clarified.RubricBasedEvaluator.__init__assertscriterion.rubricsis non-empty (rubric_based_evaluator.py:332), andEvalCase.rubricsis additive on top of the criterion-level list (create_effective_rubrics_list). The "Notes On Rubrics" block in each rubric-based metric section now states both.Why
Without these notes, three failure modes happen quickly in practice (see #1852 for full context):
rubric_based_multi_turn_trajectory_quality_v1in the criteria table but no example of how to build anEvalConfigentry for it.EvalCase.rubricswithtypeunset (or mismatched) and the rubrics are silently dropped.EvalCase.rubricsand none on the criterion, and hitAssertionError: Rubrics are required.at evaluator init.All three are observable in
RubricBasedEvaluatorsource but aren't surfaced in the user-facing docs.Changes
Only
docs/evaluate/criteria.mdis modified. No code changes.Testing
mkdocs servelocally; verified the new section renders, the criteria table at the top is consistent with the sections below, and existing internal anchors still resolve.CLA
Individual CLA signed;
cla/googlecheck is passing on this PR.Notes