gepa-spo
Version:
Genetic-Pareto prompt optimizer to evolve system prompts from a few rollouts with modular support and intelligent crossover
20 lines (19 loc) • 581 B
TypeScript
import type { LLM } from './types.js';
export interface StrategyDefLite {
id: string;
hint: string;
core?: boolean;
}
export interface PrefilterResult {
kept: StrategyDefLite[];
scores: Record<string, number>;
raw: string;
}
/**
* Ask the LLM to rate each strategy's applicability to the task corpus.
* Returns strategies filtered by threshold and optional topK.
*/
export declare function prefilterStrategies(llm: LLM, strategies: StrategyDefLite[], taskPreview: string[], opts: {
threshold: number;
topK?: number;
}): Promise<PrefilterResult>;