import type { MastraModelConfig } from '@mastra/core/llm'; import type { ScorerRunInputForLLMJudge, ScorerRunOutputForLLMJudge } from '../../utils.js'; export interface MultiTurnJudgeScorerOptions { /** Scale applied to the final score. Defaults to 1, so the scorer returns 1 or 0. */ scale?: number; } /** * Creates an LLM-as-judge scorer that grades a **whole multi-turn conversation** against a single * plain-English criterion and returns a **binary** score: `1` when the criterion is satisfied, * otherwise `0`. * * Unlike the other prebuilt LLM judges, which read a single assistant message, this scorer reads * every assistant turn accumulated in `run.output`, so it works with the multi-turn `inputs` form of * `runEvals`: * * @example * ```typescript * import { runEvals } from '@mastra/core/evals'; * import { createMultiTurnJudgeScorer } from '@mastra/evals/scorers/prebuilt'; * * const result = await runEvals({ * data: [{ inputs: ["How's the weather in London?", 'And Paris?', 'Should I pack an umbrella?'] }], * target: weatherAgent, * scorers: [ * { * scorer: createMultiTurnJudgeScorer({ * model: 'anthropic/claude-haiku-4-5', * criterion: 'The agent gave forecasts for London and Paris, and weather-appropriate packing advice.', * }), * threshold: 1, * }, * ], * }); * ``` * * To persist scores, register an instance under the same id on the Mastra instance. Only the id is * used to resolve scorer metadata, so the registered instance's `criterion` can be a placeholder. */ export declare function createMultiTurnJudgeScorer({ model, criterion, options, }: { model: MastraModelConfig; /** What the conversation must satisfy, in plain English. */ criterion: string; options?: MultiTurnJudgeScorerOptions; }): import("@mastra/core/evals").MastraScorer & Record<"generateScoreStepResult", number> & Record<"generateReasonStepResult", string>>; //# sourceMappingURL=index.d.ts.map