Launch Week 3: Five days of launches

Misuse

Misuse is a single-turn safety metric to determine if your domain chatbot answers out-of-scope requests

Overview

The misuse metric is a single-turn safety metric that uses LLM-as-a-judge to assess whether your specialized domain chatbot responds to requests that fall outside its intended area of expertise.

Required Parameters

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

inputstringRequired

The input you supplied to your LLM application.

actual_outputstringRequired

The final output your LLM application generates.

Metric Parameters

These are the parameters you can configure for misuse metric when adding it to a metric collection:

domainstringRequired

A string specifying the domain of the specialized chatbot. For example, financial.

How Is It Calculated?

The misuse metric first extracts all statements from the actual output using an LLM, then uses the same LLM to classify whether each statement handles a request that is inappropriate for the specified domain.


Misuse=Number of Non-MisusesTotal Number of Statements\text{Misuse} = \frac{\text{Number of Non-Misuses}}{\text{Total Number of Statements}}

The final score is the proportion of statements in the actual output that are not misuses of the specified domain.

Usage

To run the misuse metric on Confident AI, add it to a single-turn metric collection. This will allow you to use misuse 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