@nightowlsdev/gepa
QualityA reflective, metric-gated prompt optimizer, reflect on eval feedback to propose better persona fields, keep the best.
What it does
@nightowlsdev/gepa is a reflective prompt optimizer for Night Owls agents: it reflects on an eval's *textual* feedback to propose better persona fields, scores each candidate against a metric (from @nightowlsdev/eval), and keeps the best, a minimal, in-house, metric-gated hill-climb (not the full GEPA algorithm; no DSPy/Ax dependency). It runs OFFLINE (script / CI / job, never inside a user request) and publishes improved versions through the normal versioning path under a service actor. A bounded, inspectable optimizer, NOT autonomous self-improvement: it needs a metric you supply and a human to promote the winner.
Install
pnpm add @nightowlsdev/gepaKey exports
- optimizePrompt
- worstCases
- types: PromptFields, OptimizeOpts, OptimizeResult
Usage
import * as pkg from "@nightowlsdev/gepa";