Prompt Chain

Distinguish Test Errors from Assertion Failures

Example chain that shows how to differentiate between provider errors and failed assertions in LLM testing workflows.

Works with promptfoo

73
Spark score
out of 100
Updated 19 days ago
Version 0.121.18

Add to Favorites

Why it matters

Demonstrate and validate the difference between provider-level errors (system failures) and test-level failures (failed assertions) in LLM evaluation workflows, ensuring proper error handling and test result interpretation.

Outcomes

What it gets done

01

Trigger intentional provider errors using special prompt markers

02

Separate system-level failures from assertion-based test failures

03

Validate error handling behavior in evaluation pipelines

04

Demonstrate proper test failure classification patterns

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/pfoo-eval-errors-vs-failures | bash

Overview

Eval Errors Vs Failures

A promptfoo example that contains a custom provider which throws errors when prompts include `!ERROR!`, demonstrating the distinction between test errors (provider failures) and test failures (failed assertions). Use this example to see how promptfoo distinguishes between test errors and test failures. The custom provider throws errors when prompts contain `!ERROR!`, allowing you to observe the different failure types.

What it does

This promptfoo example demonstrates the distinction between test errors and test failures during evaluation. It contains a custom provider that throws errors when the prompt includes !ERROR!, showing how promptfoo distinguishes between test errors (provider failures) and test failures (failed assertions).

Inputs and outputs

You provide prompts to the custom provider. Test cases that contain the !ERROR! string will trigger error conditions from the provider.

How to use

Initialize and run the example with these commands:

npx promptfoo@latest init --example eval-errors-vs-failures
cd eval-errors-vs-failures

The example contains a custom provider that throws errors when the prompt includes !ERROR!.

Source README

eval-errors-vs-failures (Errors Vs Failures)

You can run this example with:

npx promptfoo@latest init --example eval-errors-vs-failures
cd eval-errors-vs-failures

Usage

This directory contains a custom provider that throws errors when the prompt includes !ERROR!, demonstrating how promptfoo distinguishes between test errors (provider failures) and test failures (failed assertions).

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.