/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Generate golden-set candidate entries by LLM-driven surface-form synthesis from a verified-label * seed pulled out of the corpus's labeled test split. * * ## Why this approach * * The Phase 2 golden set has 74 entries; session-notes.md called for ≥500/locale. Manual curation * doesn't scale. Pure-LLM generation (invent raw + labels from scratch) is too noisy — labels * would be unverified. * * This module takes the middle path: * * 1. **Seeds come from corpus-v0.2.0 test shard** — already through the alignment pipeline, so labels * are pipeline-verified. * 2. **LLM only varies the surface form** — case, abbreviations, reordering, dropped components. The * component VALUES (locality string, postcode digits, etc.) are preserved verbatim. * 3. **Programmatic validator drops hallucinations** — every component value must appear as a * substring (case-insensitive, whitespace-normalized) of the variant's raw. Failures dropped * silently; cost is wasted tokens, never bad-labeled golden entries. * * ## Usage * * ```sh * DEEPSEEK_API_KEY=sk-... \ * mailwoman corpus golden expand \ * --count 1000 \ * --variants 5 \ * --output data/eval/golden/candidates/expand-$(date +%Y%m%d-%H%M%S).jsonl * ``` * * ## Env * * - `DEEPSEEK_API_KEY` — required for provider `deepseek` * - `ANTHROPIC_API_KEY` — required for provider `anthropic` * * ## What this module does NOT do * * - Does not commit anything or modify the versioned golden dir. Candidates land in * `data/eval/golden/candidates/` for operator review (skim, prune, then run * `mailwoman corpus golden promote`). * - Does not score the LLM's quality — that's an eyeball job after pilot lands. * - Does not retry hallucinated candidates. Cost of wasted tokens is trivial (~$0.0006/each). */ export interface ExpandGoldenOptions { /** * Corpus test shard path(s), comma-separated. Default: the v0.2.0 test shard under the data root. */ corpus?: string; /** * Total seeds to process. Default `100` (pilot). */ count?: number; /** * Variants requested per seed. Default `5`. */ variants?: number; /** * JSONL output path. Default `data/eval/golden/candidates/expand-.jsonl`. */ output?: string; /** * LLM provider. Default `deepseek`. */ provider?: "deepseek" | "anthropic"; /** * Model id. Default depends on provider. */ model?: string; /** * Parallel LLM calls. Default `4`. */ concurrency?: number; /** * Comma-separated source allow-list. */ includeSources?: string; } export interface ExpandGoldenSummary { seedsProcessed: number; kept: number; dropped: number; errored: number; outputPath: string; } export declare function expandGolden(options?: ExpandGoldenOptions, report?: (line: string) => void): Promise; //# sourceMappingURL=golden-expand.d.ts.map