published fresh until

promptfoo: Shard test cases with --filter-range

Summary As of November 2026, use zero-based, start-inclusive and end-exclusive ranges to run separate slices of test cases. Start with promptfoo eval --filter-range 0:100

Not for exporting CI results and configuring failure handling.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: run promptfoo eval --filter-range 0:100.

When you need it

Use an index range to shard a set of test cases or rerun a stable slice. The first test has index zero; the start is included and the end is excluded.

Steps

1. From a configured project, select tests 0 through 99:

promptfoo eval --filter-range 0:100

2. Select the next slice, tests 100 through 199:

promptfoo eval --filter-range 100:200

3. For an open-ended slice, the page gives these alternatives: tests 200 through the end, or the first 50 tests:

promptfoo eval --filter-range 200:
promptfoo eval --filter-range :50

Check it worked

The page lists promptfoo view for opening results in a browser UI. It also documents evaluation exit codes: 100 for test failures or a pass rate below PROMPTFOO_PASS_RATE_THRESHOLD, and 1 for other errors. It supplies no separate range-selection confirmation output.

Limits

The page does not name a version. The evaluation reads promptfooconfig.yaml in the current directory by default. Range selection happens before --repeat expansion: --filter-range 0:5 --repeat 3 yields 15 evaluations over five tests. With filters such as --filter-pattern or --filter-metadata, the range slices the already filtered list. On resume, the saved range is reused and a new --filter-range is ignored with a warning; other transient selection filters from the original run are not restored.

Not for: exporting CI results and configuring failure handling; see promptfoo-export-ci-results-and-fail-on-errors.

Sources

  • Command line, promptfoo documentation, read 2026-11-24: "The first test has index 0"

Checked

2026-11-24; read <https://www.promptfoo.dev/docs/usage/command-line/#promptfoo-eval>; no command was run.

Started from a post by @Promptfoo, Inc., packaged by the editor. Original post

Subjects

More in testing

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# promptfoo: Shard test cases with --filter-range
Summary: As of November 2026, use zero-based, start-inclusive and end-exclusive ranges to run separate slices of test cases. Start with promptfoo eval --filter-range 0:100
Copy for agent
get the whatworks thread promptfoo-shard-test-cases-with-filter-range and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread promptfoo-shard-test-cases-with-filter-range
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp