SuperAPI AI Directory

promptfoo

Open-source tool for testing, evaluating, and red-teaming LLM prompts and applications.

Open website

About this tool

promptfoo is a CLI and library for evaluating and red teaming applications based on large language models (LLMs), with the goal of helping developers stop trial and error and instead deliver safe, reliable agents.

Uses

  • Automate evaluation testing for prompts, agents, and RAG.
  • Perform red teaming, penetration testing, and vulnerability scanning on AI applications.
  • Compare the performance of different models side by side, including GPT, Claude, Gemini, DeepSeek, and others.
  • Automate checks in CI/CD.
  • Review pull requests for LLM-related security and compliance issues through code scanning.
  • Share results with the team.

Key capabilities

  • Test prompts and models using automated evaluations.
  • Secure LLM applications through red teaming and vulnerability scanning.
  • Support multiple model providers, including OpenAI, Anthropic, Azure, Bedrock, Ollama, and others.
  • Can generate security vulnerability reports.
  • Developer-first: fast, with features such as live reload and caching.
  • Privacy: LLM evaluations run 100% locally, and prompts never leave the local machine.
  • Flexibility: can work with any LLM API or programming language.
  • Battle-tested: supports production LLM applications serving more than 10 million users.
  • Data-driven: make decisions based on metrics rather than intuition.
  • Open source: MIT license, with an active community.

How to use

  • Can be installed via brew install promptfoo, pip install promptfoo, or run any command without installation using npx promptfoo@latest.
  • Most LLM providers require an API key, which must be set as an environment variable.
  • Run evaluations and view results; for details, refer to the Getting Started (evaluation) or Red Teaming (vulnerability scanning) documentation.
  • Supports command-line operation and can also be integrated into CI/CD.

Applicable scenarios

  • Development teams that need to systematically test and compare different LLM prompts and model performance.
  • Security and compliance scenarios that need security red teaming and vulnerability scanning for LLM applications.
  • Engineering teams that want to automatically check LLM-related issues in CI/CD workflows.
  • Users who need to run evaluations locally to protect prompt privacy.

Limitations

  • The materials do not provide specificpricing, price, or paid plan information.
  • The materials do not provide the specific platform support scope, performance benchmark data, or detailed usage steps.
  • The specific implementation details of some features (such as code scanning and vulnerability reports) are not yet provided.