You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9a8567b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: vertexai/_genai/types/common.py
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1866,6 +1866,11 @@ class LLMMetric(Metric):
1866
1866
description="""Optional. The name of the column in the EvaluationDataset containing the list of rubrics to use for this metric.""",
1867
1867
)
1868
1868
1869
+
result_parsing_function: Optional[str] = Field(
1870
+
default=None,
1871
+
description="""Optional. A Python function string used to parse the raw output of the LLM judge model. The function must be named `parse_results` and accept a list of model response strings. It should return a dictionary with `score` (float) and `explanation` (str) keys.""",
@@ -2007,6 +2012,9 @@ class MetricDict(TypedDict, total=False):
2007
2012
metric_resource_name: Optional[str]
2008
2013
"""The resource name of the metric definition. Example: projects/{project}/locations/{location}/evaluationMetrics/{evaluation_metric_id}"""
2009
2014
2015
+
result_parsing_function: Optional[str]
2016
+
"""Optional. A Python function string used to parse the raw output of the LLM judge model. The function must be named `parse_results` and accept a list of model response strings. It should return a dictionary with `score` (float) and `explanation` (str) keys."""
0 commit comments