/** * Auto-analysis: detect patterns and generate insights from evaluation results. */ import type { Report, AnalysisResult, Sample, SampleQualityAggregate, Representativeness, Lang } from '../types/index.js'; /** opts for `analyzeResults`. Optional because most older callers don't have * samples in scope; new callers (evaluation-pipeline / evolver) pass them in to * populate `analysis.sampleQuality`. */ export interface AnalyzeResultsOptions { /** Original Sample[] from eval-samples. Enables `analysis.sampleQuality` aggregation. */ samples?: Sample[]; } /** * Analyze an evaluation report and produce structured insights. */ export declare function analyzeResults(report: Report, opts?: AnalyzeResultsOptions): AnalysisResult; /** * Build sample design science aggregate from sample metadata. * * Pure function — no result/score data needed. Reads: * - `Sample.capability` (string[], normalized case-insensitive + dash/camel/underscore stripped) * - `Sample.difficulty` ('easy' | 'medium' | 'hard') * - `Sample.construct` (free-form string) * - `Sample.provenance` ('human' | 'llm-generated' | 'production-trace') * - `Sample.rubric` (for avgRubricLength) * * Missing fields are bucketed under the `unspecified` key in the relevant * distribution map, so users see "I have N samples without difficulty declared". * * Persisted on the report so studio can surface coverage gaps. Does NOT * participate in grading / judge / verdict. See docs/specs/sample-design-spec.md. */ export declare function buildSampleQualityAggregate(samples: Sample[]): SampleQualityAggregate; /** * Relative-balance / skew of the sample set. Pure function of the aggregate's * distributions — no external "expected" denominator exists (capabilities are * free-form), so it reports concentration (dominant bucket share) + the dominant * label per dimension, not absolute coverage. Diagnostic only. */ export declare function buildRepresentativeness(aggregate: SampleQualityAggregate): Representativeness; export declare function generateAnalysisSummary(report: Report, lang?: Lang): string | undefined;