← Back to repo search

Evaluation & security

Promptfoo

promptfoo/promptfoo

Promptfoo is a testing and red-teaming framework for prompts, models, RAG systems and agents. It lets teams define cases and assertions, compare providers and run regression or security checks in development and CI.

THE PRACTICAL EXPLANATION

What this repository is

Promptfoo is a testing and red-teaming framework for prompts, models, RAG systems and agents. It lets teams define cases and assertions, compare providers and run regression or security checks in development and CI.

WHERE TO USE IT

The work it fits

Use it before releases, during model changes and when testing prompt injection, unsafe behaviour or task-specific quality across a repeatable set of cases.

WHO MAY USE IT

The people it suits

AI engineers, security teams and quality owners who want evaluation expressed as version-controlled test configuration.

HOW TO USE IT

A sensible adoption path

Start with real examples of success and failure, define assertions that reflect the business requirement and compare the current system with the proposed change. Add red-team cases relevant to the connected tools and data, then gate releases on reviewed thresholds.

  1. 01Create a small versioned test suite.
  2. 02Define task-specific assertions and expected sources.
  3. 03Run a baseline across candidate models or prompts.
  4. 04Add relevant adversarial and regression cases.

GETTING THE BEST RESULTS

Use the repository with discipline

  • Maintain tests as the system and threats change.
  • Inspect failures rather than chasing one aggregate score.
  • Keep human review for subjective or high-stakes criteria.

WHY IT MAY BE USEFUL

The shortest useful assessment

Test prompts, agents and RAG systems, including red-team and vulnerability checks.

Best considered for: Regression testing, model comparison and AI security testing in CI.

READ BEFORE YOU ADOPT IT

The practical caution

Test suites only protect scenarios you actually define and maintain.

Confirm the current licence, maintenance status, dependency risk, data path, model access, tool permissions and human approval points at the source. A public repository is inspectable raw material—not proof that a system is secure, supported or suitable for your production environment.