Resource: EvaluationCase
An individual evaluation case.
| JSON representation |
|---|
{ "name": string, "displayName": string, "description": string, "evaluationContext": string, "evaluationMatchers": [ string ], // Union field |
| Fields | |
|---|---|
name |
Identifier. The resource name of the evaluation case. Format: projects/{project}/locations/{location}/brands/{brand}/evaluationCases/{evaluationCase} |
displayName |
Required. The human-readable name of the evaluation case. |
description |
Optional. The description of the evaluation case. |
evaluationContext |
Required. The resource name of the evaluation context this case is associated with. Format: projects/{project}/locations/{location}/brands/{brand}/evaluationContexts/{evaluationContext} |
evaluationMatchers[] |
Optional. The list of evaluation matchers to use for the evaluation case. The evaluation is performed once at the end of the BidiProcessOrder session. Each matcher produces a boolean result indicating whether the evaluation matcher passed or failed. |
Union field test_case. The test case to use for the evaluation case. test_case can be only one of the following: |
|
staticTextTurnCase |
Optional. A test case where the user and agent text turns are static. |
dynamicTextTurnCase |
Optional. A test case where the user text inputs are dynamically generated using LLM with an ordering instruction. |
StaticTextTurnCase
An evaluation case where the user inputs are static text inputs.
| JSON representation |
|---|
{
"textTurns": [
{
object ( |
| Fields | |
|---|---|
textTurns[] |
Required. The list of text turns in the evaluation case. |
TextTurn
A single text turn in the evaluation case, consisting of user input and agent response.
| JSON representation |
|---|
{ "userTextInput": string, "exampleAgentResponse": string } |
| Fields | |
|---|---|
userTextInput |
Required. The user text input for this turn. |
exampleAgentResponse |
Optional. The example agent response for this turn. Note that this is not the actual agent response. The actual agent response may differ from this example response. The example response is NOT used for evaluation, but only for display purposes to make the evaluation case easier to understand. |
DynamicTextTurnCase
An evaluation case where the user inputs are dynamically generated using LLM with an ordering instruction.
| JSON representation |
|---|
{ "orderingInstruction": string } |
| Fields | |
|---|---|
orderingInstruction |
Required. The ordering instruction for the user to interact with the Food Ordering Agent. LLM dynamically generates the user text inputs based on the ordering instruction. This may include the targeted items to order, the user's preferences and constraints, and specific actions to that the user should inform the ordering agent. |
Methods |
|
|---|---|
|
Batch creates EvaluationCases. |
|
Batch updates EvaluationCases. |
|
Creates an EvaluationCase. |
|
Deletes the specified EvaluationCase. |
|
Gets an EvaluationCase. |
|
Lists EvaluationCases. |
|
Updates the specified EvaluationCase. |
|
Runs an evaluation case. |