import type { GraderFn, JudgeCallFn } from "../../config/types.js"; /** Options for the `llmClassify` LLM-as-judge grader. Requires at least 2 categories. */ export interface LlmClassifyOptions { /** Categories to classify into. Map of category name to description. Must have at least 2 entries. */ readonly categories: Readonly>; /** Additional instruction for the judge beyond the category descriptions. */ readonly criteria?: string | undefined; /** Override the judge function from config for this grader only. */ readonly judge?: JudgeCallFn | undefined; } /** * Creates a grader that classifies agent output into categories using an LLM judge. * * Expected value: `expected.metadata.classification` (string matching a category key). * Pass condition: Judge's classification matches expected classification. * When no expected classification is set, the grader always passes (classification-only mode * — useful for labeling output without asserting a specific category). * Score: 1.0 for exact match, 0.0 for mismatch. * * @example * ```ts * // Assert a specific classification * llmClassify({ * categories: { * helpful: "The response directly answers the user's question", * partial: "The response partially addresses the question", * unhelpful: "The response does not address the question", * }, * }) * * // Classification-only (always passes, label in metadata) * // Omit expected.metadata.classification on the case * ``` */ export declare function llmClassify(options: LlmClassifyOptions): GraderFn; //# sourceMappingURL=llm-classify.d.ts.map