Resource: EvaluationMatcher
An evaluation matcher.
| JSON representation |
|---|
{ "name": string, "displayName": string, "description": string, // Union field |
| Fields | |
|---|---|
name |
Identifier. The resource name of the evaluation matcher. |
displayName |
Required. The human-readable name of the evaluation matcher. |
description |
Optional. The description of the evaluation matcher. |
Union field matcher. The matcher to use for the evaluation matcher. The matcher must produce a boolean result indicating whether the evaluation matcher passed or not. matcher can be only one of the following: |
|
orderResultMatcher |
Optional. An evaluation matcher for an order result. |
agentUtteranceStringMatcher |
Optional. An evaluation matcher for an agent utterance string. |
llmJudgementMatcher |
Optional. An evaluation matcher using LLM judgement. |
OrderResultMatcher
An evaluation matcher for an order result.
| JSON representation |
|---|
{
"expectedOrder": {
object ( |
| Fields | |
|---|---|
expectedOrder |
Required. The expected order to match against. The actual order must match this expected order after normalization. The evaluation passes if all fields and quantities match. Default quantities of 1 are ignored during comparison to handle field omission consistently. |
AgentUtteranceStringMatcher
An evaluation matcher for an agent utterance string.
| JSON representation |
|---|
{ "invert": boolean, // Union field |
| Fields | |
|---|---|
invert |
Optional. If true, the match condition is inverted (e.g., "does not contain" or "does not match"). |
Union field
|
|
contains |
Optional. The agent utterance should contain this substring. |
regex |
Optional. The agent utterance should match this regex. |
LLMJudgementMatcher
An evaluation matcher using LLM judgement with the following prompt: "You are a helpful assistant that helps users place food orders at a restaurant. You will be given user inputs and agent responses. Your task is to determine if the agent response satisfies the following criteria: {criteria}"
| JSON representation |
|---|
{ "criteria": string, "invert": boolean } |
| Fields | |
|---|---|
criteria |
Required. The criteria for the LLM to consider if an agent response passes the check. |
invert |
Optional. If true, the match condition is inverted (e.g., "does not contain"). |
Methods |
|
|---|---|
|
Creates an EvaluationMatcher. |
|
Deletes the specified EvaluationMatcher. |
|
Gets an EvaluationMatcher. |
|
Lists EvaluationMatchers. |
|
Updates the specified EvaluationMatcher. |