import type { ScorerRunInputForAgent, ScorerRunOutputForAgent } from '@mastra/core/evals'; import type { MastraModelConfig } from '@mastra/core/llm'; import type { ScorerRunInputForLLMJudge, ScorerRunOutputForLLMJudge } from '../../utils.js'; export interface SummarizationMetricOptions { scale?: number; /** Text the summary is judged against. Defaults to the user message of the run input. */ source?: string; sourceExtractor?: (input: ScorerRunInputForAgent, output: ScorerRunOutputForAgent) => string; /** Upper bound on the coverage questions drawn from the source. Defaults to 10. */ maxQuestions?: number; } /** * Creates a scorer that evaluates a summary against the text it condenses. * * The scorer judges two axes and returns the lower one, so a summary cannot pass * by being faithful but empty, or thorough but wrong: * - Alignment: supported claims / total claims * - Coverage: answered questions / total questions * * Coverage is judged in a separate call that never receives the source text, so * the judge cannot answer a question from information the summary left out. * * @param model - Language model used as the judge * @param options - Source resolution, question cap, and score scaling * @returns A scorer producing `min(alignment, coverage) × scale` * @throws When `maxQuestions` is below 1 * * @example * ```ts * const scorer = createSummarizationScorer({ * model: 'openai/gpt-5.5', * options: { maxQuestions: 10 }, * }); * * const result = await scorer.run(run); * ``` */ export declare function createSummarizationScorer({ model, options, }: { model: MastraModelConfig; options?: SummarizationMetricOptions; }): import("@mastra/core/evals").MastraScorer & Record<"analyzeStepResult", { coverage: { question: string; answered: boolean; reason: string; }[]; }> & Record<"generateScoreStepResult", number> & Record<"generateReasonStepResult", string>>; //# sourceMappingURL=index.d.ts.map