Product

Prompt optimization that proves itself

July 12, 2026

Apprentice rewrites your prompt with DSPy's GEPA optimizer against your verified examples, then scores the old and new prompt on a held-out slice the optimizer never saw. You see the diff and the delta before anything changes in production.

Measured, not promised

  • Receipt extraction (200 real scanned receipts): GPT-5.4-mini went 72.9 to 79.6, a +6.7 gain from the prompt alone. Full write-up.
  • Document type classification (Tobacco3482 OCR): GPT-5.4-mini went 78.33 to 81.67 with the shipped paperless-gpt prompt as baseline.
  • Contract clause extraction (CUAD): GPT-5.4-mini went 34.0 to 36.3. Small gain, reported anyway. A run that barely moves is a real result.

Baseline prompt, then the GEPA prompt

72.9GPT-5.4-mini, baseline prompt · 72.90
79.6GPT-5.4-mini, GEPA-optimized · 79.60
Receipt extractionGPT-5.4-mini
78.3GPT-5.4-mini, baseline prompt · 78.33
81.7GPT-5.4-mini, GEPA-optimized · 81.67
Doc-type classificationGPT-5.4-mini
34.0GPT-5.4-mini, baseline prompt · 34.00
36.3GPT-5.4-mini, GEPA-optimized · 36.30
Contract clauses (CUAD)GPT-5.4-mini
Held-out scores per task, 0 to 100. Bars start at zero; scores compare within a task only. The CUAD run barely moved and is shown anyway.

Every number comes from the public, rerunnable benchmark repo.

How it works

The optimization loop

Verified rowsgold + silver
GEPA rewritesproposes and scores
Held-out slicenever seen by the optimizer
You decidenothing changes on its own
The held-out slice never touches optimization. You see the old and new score side by side and choose; nothing changes on its own.
  • Upload or capture examples; your team verifies rows into a gold set.
  • GEPA proposes prompt rewrites and scores them against verified rows (gold plus silver).
  • The final comparison runs on a held-out slice of verified rows the optimizer never saw. You see both scores and decide whether to adopt the new prompt; nothing changes on its own.
  • The optimized prompt is plain text. You keep it, no lock-in.

pip install runapprentice

Start with the quickstart. No Apprentice fee; optimization runs use your model key. Local fine-tuning on Apple silicon ships too; eval-gated production takeover is coming soon. Weighing tools after the TensorZero and OpenPipe shutdowns? The decision guide, job by job.

Further reading: what makes a row verified, which surface to start with, and why prompts get worse over time. Or see every guide.