Skip to main content

Python

For an example of using promptfoo in a Google Colab/Jupyter Notebook, see this notebook.

This notebook shows how to

  1. Set up & configure Promptfoo
  2. Set up secrets (such as an OpenAI or Anthropic API key)
  3. Run an eval of LLM models, prompts and outputs
  4. Run another eval that includes Python code