import type { ILLMProvider } from '../llm/ILLMProvider.ts'; /** * Context a judge needs to score a single evaluation task. `expected` is the * suite's ground truth; `output` is what the member actually produced. */ export interface JudgeContext { input: string; output: string; expected: string; } export interface EvalJudge { /** Returns a score in [0, 1], or null when the metric cannot be scored. */ score(metric: string, context: JudgeContext): Promise; } export declare const AB_METRICS: string[]; export declare const JUDGE_SYSTEM_PROMPT = "You are an evaluation judge. Score the answer on a single metric. Respond with ONLY one decimal number between 0 and 1, where 0 is worst and 1 is perfect. Do not explain."; /** * Default judge. LLM-judged metrics (faithfulness, relevance, context_recall) * ask the provider for a bare score; answer_correctness compares embeddings * with cosine similarity so it costs no extra LLM calls. */ export declare class LLMJudge implements EvalJudge { private readonly llm; constructor(llm: ILLMProvider); score(metric: string, context: JudgeContext): Promise; private llmScore; private embeddingScore; } /** Extracts the first number from a judge reply and clamps it to [0, 1]. */ export declare function parseJudgeScore(text: string): number | null; //# sourceMappingURL=EvalJudge.d.ts.map