← all repositories
Eladlev/AutoPrompt

Your prompts are brittle. This tool makes them prove it.

It closes the gap between a prompt that works on your first three examples and one that survives real-world edge cases.

AutoPrompt
Not currently ranked — collecting fresh signals.
star history

What it does

AutoPrompt takes a rough prompt and task description, then iteratively generates synthetic samples designed to expose weaknesses. It evaluates the prompt against these edge cases—annotated by a human or an LLM—and uses the results to rewrite the prompt. The process spits out a calibrated prompt and a benchmark of the boundary cases that broke earlier versions.

The interesting bit

The framework treats prompt engineering as an adversarial game: instead of hoping your prompt generalizes, it forces an LLM to manufacture failure modes—imbalanced moderation scenarios, ambiguous classifications—then closes each hole. For generation tasks, it even learns a ranker prompt first so it can judge its own outputs during optimization.

Key highlights

  • Targets production scenarios like moderation and multi-label classification where imbalanced data usually makes benchmarking painful.
  • Caps spend in actual dollars or tokens; the authors note a typical run costs under a dollar and finishes in minutes on GPT-4 Turbo.
  • Supports an “optimize-only” mode that skips synthetic generation if you already have a labeled CSV dataset.
  • Can migrate prompts across different model versions or providers, and squeeze multiple rules into a single efficient prompt.
  • Integrates with Argilla for human-in-the-loop review, though it is pinned to Argilla V1.

Caveats

  • The Argilla integration is explicitly limited to V1; the README warns that V2 is not supported and suggests restarting the space if the server flakes.
  • Prompt accuracy can fluctuate during optimization, so you need to keep iterating rather than trusting the first seemingly good result.
  • Each step fires multiple long LLM calls, and the authors warn that generative tasks can take roughly a minute per iteration.

Verdict

Worth a look if you are shipping classification or generation prompts to production and want measured evidence that they handle edge cases. Skip it if you consider prompt engineering a one-and-done creative writing exercise.

Frequently asked

What is Eladlev/AutoPrompt?
It closes the gap between a prompt that works on your first three examples and one that survives real-world edge cases.
Is AutoPrompt open source?
Yes — Eladlev/AutoPrompt is open source, released under the Apache-2.0 license.
What language is AutoPrompt written in?
Eladlev/AutoPrompt is primarily written in Python.
How popular is AutoPrompt?
Eladlev/AutoPrompt has 3k stars on GitHub.
Where can I find AutoPrompt?
Eladlev/AutoPrompt is on GitHub at https://github.com/Eladlev/AutoPrompt.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.