mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
feat: Add Rubrics to EvalCase datamodel
For advanced eval use cases, we do expect agent developers to have rubrics that are specific to an Eval Case and in some cases even specific to a single invocation/turn in the eval case conversation. A separate PR will be created to consume this data model changes in ADK Eval. PiperOrigin-RevId: 805588808
This commit is contained in:
committed by
Copybara-Service
parent
0bc2ee64e3
commit
c5613fb6f0
@@ -23,6 +23,8 @@ from pydantic import BaseModel
|
||||
from pydantic import ConfigDict
|
||||
from pydantic import Field
|
||||
|
||||
from .eval_rubrics import Rubric
|
||||
|
||||
|
||||
class EvalBaseModel(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
@@ -55,7 +57,7 @@ class IntermediateData(EvalBaseModel):
|
||||
class Invocation(EvalBaseModel):
|
||||
"""Represents a single invocation."""
|
||||
|
||||
invocation_id: str = ''
|
||||
invocation_id: str = ""
|
||||
"""Unique identifier for the invocation."""
|
||||
|
||||
user_content: genai_types.Content
|
||||
@@ -74,6 +76,11 @@ class Invocation(EvalBaseModel):
|
||||
creation_timestamp: float = 0.0
|
||||
"""Timestamp for the current invocation, primarily intended for debugging purposes."""
|
||||
|
||||
rubrics: Optional[list[Rubric]] = Field(
|
||||
default=None,
|
||||
)
|
||||
"""A list of rubrics that are applicable to only this invocation."""
|
||||
|
||||
|
||||
class SessionInput(EvalBaseModel):
|
||||
"""Values that help initialize a Session."""
|
||||
@@ -105,3 +112,8 @@ class EvalCase(EvalBaseModel):
|
||||
|
||||
creation_timestamp: float = 0.0
|
||||
"""The time at which this eval case was created."""
|
||||
|
||||
rubrics: Optional[list[Rubric]] = Field(
|
||||
default=None,
|
||||
)
|
||||
"""A list of rubrics that are applicable to all the invocations in the conversation of this eval case."""
|
||||
|
||||
Reference in New Issue
Block a user