/** * Loading the stored LLM reference labels, shared by `evaluate` and `audit`. * * Both commands must read the same reference, or a pattern that looks precise in one report and * harmful in the other is only a difference in which annotations were counted. */ import { type CorpusStore } from '../corpus/store'; import { type Label, type Segment } from '../types'; export interface ReferenceRow { path: string; block_index: number; /** MIME part the block came from. Null on annotations made before it was recorded. */ mime_part: string | null; label: Label; char_count: number; client: string | null; lang: string | null; reply_style: string | null; } /** * Latest annotation per (path, block) for the chosen model, grouped by message, so re-annotated * messages do not count twice. An explicit prompt version pins the reference to labels made under * one convention; without it, the newest label per block wins, whatever prompt produced it, and * messages labelled only under an older convention are still included. The annotation guide's rule * that runs made under different conventions must never be silently compared is the reason the * option exists; use it whenever more than one prompt version is present. */ export declare function loadReference(store: CorpusStore, model: string, promptVersion?: string): Map; export interface CoveringPrediction { label: Label; hidden: boolean; } /** * Map a stored (part, block index) to the output segment covering it. Segments merge adjacent * blocks, so a block is matched by its index falling inside a segment's block range. * * Keyed per MIME part, not by block index alone. Block indices are section-local, so in a multipart * message with several body sections two segments legitimately start at index 0, and a flat map * silently kept only the last of them. Older annotations predate the part being recorded; those * fall back to the first part the output used, which is exactly the previous behaviour for the * single section messages they came from. * * A recorded part the output never used gets no prediction. Falling back for it scored the HTML * alternative's block indices against the plain text alternative's segments; check `emitted` and * leave such blocks out instead. */ export declare function segmentLookup(...segmentLists: readonly (readonly Segment[])[]): { lookup: (part: string | null, index: number) => CoveringPrediction | null; emitted: (part: string | null) => boolean; }; //# sourceMappingURL=reference.d.ts.map