REST Resource: projects.locations.brands.evaluationMatchers

Resource: EvaluationMatcher

An evaluation matcher.

JSON representation
{
  "name": string,
  "displayName": string,
  "description": string,

  // Union field matcher can be only one of the following:
  "orderResultMatcher": {
    object (OrderResultMatcher)
  },
  "agentUtteranceStringMatcher": {
    object (AgentUtteranceStringMatcher)
  },
  "llmJudgementMatcher": {
    object (LLMJudgementMatcher)
  }
  // End of list of possible types for union field matcher.
}
Fields
name

string

Identifier. The resource name of the evaluation matcher.

displayName

string

Required. The human-readable name of the evaluation matcher.

description

string

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

object (OrderResultMatcher)

Optional. An evaluation matcher for an order result.

agentUtteranceStringMatcher

object (AgentUtteranceStringMatcher)

Optional. An evaluation matcher for an agent utterance string.

llmJudgementMatcher

object (LLMJudgementMatcher)

Optional. An evaluation matcher using LLM judgement.

OrderResultMatcher

An evaluation matcher for an order result.

JSON representation
{
  "expectedOrder": {
    object (Order)
  }
}
Fields
expectedOrder

object (Order)

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 match_pattern can be only one of the following:
  "contains": string,
  "regex": string
  // End of list of possible types for union field match_pattern.
}
Fields
invert

boolean

Optional. If true, the match condition is inverted (e.g., "does not contain" or "does not match").

Union field match_pattern.

match_pattern can be only one of the following:

contains

string

Optional. The agent utterance should contain this substring.

regex

string

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

string

Required. The criteria for the LLM to consider if an agent response passes the check.

invert

boolean

Optional. If true, the match condition is inverted (e.g., "does not contain").

Methods

create

Creates an EvaluationMatcher.

delete

Deletes the specified EvaluationMatcher.

get

Gets an EvaluationMatcher.

list

Lists EvaluationMatchers.

patch

Updates the specified EvaluationMatcher.