import { ModelContract } from "../contracts/model.contract.mjs"; //#region ../ai/src/prompts/prompts-validate.d.ts /** * Turn caller-supplied `criteria` into the judge rubric that replaces the * built-in {@link PROMPT_JUDGE_RUBRIC}. A single string is used verbatim; * a list is joined into a numbered rule set the judge must check ALL of. * Returns `undefined` for an empty/blank input, so the caller falls back * to the default rubric. * * @example * formatCriteria(["Addresses the user by {{name}}", "Under 200 words"]); * // → "Grade the system prompt against ALL of these criteria …\n1. …\n2. …" */ declare function formatCriteria(criteria: string | readonly string[] | undefined): string | undefined; /** Outcome of the optional LLM-as-judge pass over a resolved prompt body. */ type JudgeOutcome = { /** * The judge score in `[0, 1]`, or `undefined` when the judge degraded * (errored, returned no parseable verdict, or threw) — never a misleading * `0` masquerading as a real verdict. */ readonly score?: number; /** Human-readable issues raised by the judge (its reason, or a degrade note). */ readonly issues: string[]; }; /** * Run the optional LLM-as-judge pass over a resolved prompt body, REUSING the * eval `judge` scorer (the same path `prompt().validate` uses) so there is no * second judging implementation. * * **Nova-safe by contract.** The judge NEVER throws here: the eval scorer * already degrades a broken judge to `score: 0` with a failure reason, and any * exception that still escapes (model wiring, agent construction) is caught. * Both degrade paths surface `score: undefined` plus an issue note — so a flaky * judge can never fail an otherwise-valid prompt. * * @param text - The resolved prompt body under evaluation. * @param model - The model that powers the judge agent. * @param criteria - Optional caller rules that REPLACE the built-in rubric * ({@link formatCriteria}). Omitted ⇒ the default prompt-quality rubric. */ declare function judgePromptBody(text: string, model: ModelContract, criteria?: string | readonly string[]): Promise; //#endregion export { JudgeOutcome, formatCriteria, judgePromptBody }; //# sourceMappingURL=prompts-validate.d.mts.map