{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "promptfoo-promptfoo--compare-prompts-and-models-with-evals",
 "repo": "promptfoo/promptfoo",
 "repo_url": "https://github.com/promptfoo/promptfoo",
 "repo_slug": "promptfoo-promptfoo",
 "title": "Compare prompts and models with automated evals",
 "page_title": "How to compare prompts and models with automated evals with Promptfoo",
 "summary": "Install Promptfoo, start from the example and run an eval with a results viewer.",
 "who": "A developer choosing between two prompts or two models for a feature.",
 "problem": "Picking a prompt by eyeballing a few outputs is slow and misses regressions.",
 "outcome": "A side-by-side table of outputs and pass or fail results for each prompt and model.",
 "steps": [
  "Install with `npm install -g promptfoo`, or `brew install promptfoo`, or use `npx promptfoo@latest`",
  "Create a starter project with `promptfoo init --example getting-started`",
  "Set your provider key, for example `export OPENAI_API_KEY=sk-abc123` with your real key",
  "Run `cd getting-started` then `promptfoo eval`",
  "Open the results with `promptfoo view`"
 ],
 "agent_prompt": "Install promptfoo/promptfoo, set up an eval comparing <prompt A> and <prompt B> on <model A> and <model B> with <test cases>, run it and open the viewer. Tell me which combination passes the most tests.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Beginner",
 "time": "20 minutes",
 "basis": "readme",
 "caveat": "Evals run locally, but each test still calls the model provider you configure, which may cost money.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Node.js for npm, or Homebrew, or pip; npx works without installing",
  "API keys for the LLM providers you test, set as environment variables",
  "Only run red teaming against apps you own or are authorised to test"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "Keep provider API keys in environment variables and out of committed config files."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/promptfoo-promptfoo/compare-prompts-and-models-with-evals/",
 "md": "https://dedupedai.com/use-cases/promptfoo-promptfoo/compare-prompts-and-models-with-evals/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/promptfoo-promptfoo--compare-prompts-and-models-with-evals.json",
 "api_version": "v1"
}
