What is Loopr?
Loopr is an open-source prompt-optimization loop. Give it a task prompt and a handful of eval cases; it runs the prompt, scores every output with a deterministic scorer, reflects on the failures in plain language, rewrites the prompt, and repeats until it converges on the best-scoring version. It runs locally on Ollama, with OpenAI or Anthropic as an optional fallback.
How is Loopr different from MLflow, Opik or LangWatch?
Those are hosted evaluation platforms with accounts and dashboards. Loopr is a small local tool: a pip install, a YAML task file, and a loop that runs offline on Ollama. It does one job, evolving a prompt against eval cases, and it is not a platform you have to adopt.
Do I need an API key to run Loopr?
No. It runs on a local Ollama model by default. If you set an OpenAI or Anthropic key, it can use those as a fallback.
What does a Loopr task look like?
A YAML file with a seed prompt, a scorer, an iteration budget and a list of eval cases with inputs and expected outputs. You run it with `loopr optimize <task.yaml>` and get a trace of every iteration.
Can a bad rewrite break my prompt?
No. The best-scoring prompt is always kept, and if a rewrite cannot be parsed or loses the {input} placeholder, Loopr discards it and continues with the current prompt.