Promptfoo Promptfoo Versions Save

Test your prompts, models, and RAGs. Catch regressions and improve prompt quality. LLM evals for OpenAI, Azure, Anthropic, Gemini, Mistral, Llama, Bedrock, Ollama, and other local & private models with CI/CD integration.

0.55.0

2 weeks ago

What's Changed

New Contributors

Full Changelog: https://github.com/promptfoo/promptfoo/compare/0.54.1...0.55.0

0.54.1

2 weeks ago

What's Changed

Full Changelog: https://github.com/promptfoo/promptfoo/compare/0.54.0...0.54.1

0.54.0

3 weeks ago

What's Changed

Full Changelog: https://github.com/promptfoo/promptfoo/compare/0.53.0...0.54.0

0.53.0

3 weeks ago

Breaking

When using promptfoo as a node library, Assertion value functions are now invoked with the same args as when using the CLI. See AssertionValueFunction for type details.

In practice, this change means that instead of:

function assertValue(output, testCase, assertion) { ... }

You can do:

function assertValue(output, { prompt, vars, test }) { ... }

The reason for this change is that it's confusing that the CLI and library accept different functions, and only the CLI function signature was documented.

What's Changed

New Contributors

Full Changelog: https://github.com/promptfoo/promptfoo/compare/0.52.0...0.53.0

0.52.0

3 weeks ago

What's Changed

New Contributors

Full Changelog: https://github.com/promptfoo/promptfoo/compare/0.51.0...0.52.0

0.51.0

1 month ago

Breaking update to python custom assertions

Python assertions now expect a get_assert function which returns a native value, rather than parsing stdout (#594). This means instead of:

print(json.dumps((result))

You should just return the assertion result:

return result

Here's a full example of a custom_assert.py:

def get_assert(output, context) -> Union[bool, float, Dict[str, Any]]
    print('Prompt:', context['prompt'])
    print('Vars', context['vars']['topic']

    # Determine the result...
    result = test_output(output)

    # Here's an example GradingResult dict
    result = {
      'pass': True,
      'score': 0.6,
      'reason': 'Looks good to me',
    }
    return result

See documentation

What's Changed

New Contributors

Full Changelog: https://github.com/promptfoo/promptfoo/compare/0.50.1...0.51.0

0.50.1

1 month ago

What's Changed

Full Changelog: https://github.com/promptfoo/promptfoo/compare/0.50.0...0.50.1

0.50.0

1 month ago

What's Changed

Full Changelog: https://github.com/promptfoo/promptfoo/compare/0.49.3...0.50.0

0.49.2

1 month ago

What's Changed

Full Changelog: https://github.com/promptfoo/promptfoo/compare/0.49.1...0.49.2