Launch Week 3: Five days of launches

Argument Correctness

Argument Correctness is a single-turn metric to determine if your agent generates the right tool arguments

Overview

The argument correctness metric is a single-turn metric that uses LLM-as-a-judge to assess whether your LLM agent generates the correct arguments for the tools it calls.

Required Parameters

These are the parameters you must supply in your test case to run evaluations for argument correctness metric:

inputstringRequired

The input supplied to your LLM agent.

actual_outputstringRequired

The final output your LLM agent generated for the given input.

tools_calledlistRequired

A list of the tools called by your LLM agent in the order of their calling in a ToolCall instance.

How Is It Calculated?

The argument correctness metric iterates over each tool call in the tools called and uses an LLM to determine whether the input parameters of that call are correct for the task described in the input.


Argument Correctness=Number of Correctly Generated Input ParametersTotal Number of Tool Calls\text{Argument Correctness} = \frac{\text{Number of Correctly Generated Input Parameters}}{\text{Total Number of Tool Calls}}

The final score is the proportion of tool calls that your agent supplied correct arguments for.

Usage

To run the argument correctness metric on Confident AI, add it to a single-turn metric collection. This will allow you to use argument correctness metric for:

  • Single-turn E2E testing
  • Single-turn component-level testing
  • Online and offline evals for traces and spans

Last updated on

Built byConfident AI