Skip to content

MatchStrategy

MatchStrategy<T> = "strict" | "fuzzy" | ((expected, actual, context?) => boolean)

Matching strategy used by structured-output and tool-call judges.

T = unknown

const exact: MatchStrategy = "strict";
const custom: MatchStrategy = (expected, actual) =>
String(actual).includes(String(expected));