Skip to content

docs(experiment): label runs via tags.experiment, drop top-level experiment - #1590

Merged
christso merged 1 commit into
mainfrom
av-4hzh-docs-tags-experiment
Jul 1, 2026
Merged

docs(experiment): label runs via tags.experiment, drop top-level experiment#1590
christso merged 1 commit into
mainfrom
av-4hzh-docs-tags-experiment

Conversation

@christso

@christso christso commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1589. A top-level experiment: key does not set a run's experiment namespace — it falls through to the suite name / eval filename (verified live: ns_source: eval_filename). The docs presented it as the grouping label, which was misleading. This makes tags.experiment the single documented way to label a run.

  • README — eval YAML examples and prose use tags.experiment; the defineEval example uses tags: { experiment: ... }; removed the misplaced max_budget_usd from the target example (budget belongs under evaluate_options).
  • Docsexperiments.mdx + eval-files.mdx describe tags.experiment as the grouping label and state there is no top-level experiment field; corrected the namespace precedence wording to --experiment > tags.experiment > default.
  • SDKdefineEval tags now accepts the promptfoo map form (Record<string,string>) alongside the selection list, and experiment is @deprecated in favor of tags.experiment. Verified live that defineEval({ tags: { experiment } }) resolves the namespace via tags (ns_source: tags).

Dashboard verification

Confirmed (via investigation) that the Dashboard Experiments tab groups on the per-row experiment field (serve.ts handleExperimentsmanifest.ts:337). Because the resolver keeps experiment equal to tags.experiment, setting tags.experiment makes runs appear under that experiment in the Experiments tab end to end. (The Dashboard does not yet read the promptfoo tags map directly — grouping is via the lockstep experiment field.)

Note

evaluate({ experiment }) (programmatic run-label param) still works and is kept as-is — it is the run-label argument, not an eval-file top-level field.

Tests

SDK: defineEval preserves the map form and the list form of tags (toEvalYamlObject). Full SDK suite (92) green; core + CLI typecheck green.

🤖 Generated with Claude Code

…riment

A top-level `experiment:` key does not set the run's experiment namespace (it
falls through to the suite name / eval filename), so the docs were misleading.
Present `tags.experiment` as the single way to label a run/experiment, matching
the merged promptfoo-shaped tags support.

- README: eval examples and prose use `tags.experiment`; `defineEval` example
  uses `tags: { experiment: ... }`; remove the misplaced `max_budget_usd` from
  the target example (budget belongs under `evaluate_options`).
- docs: experiments.mdx + eval-files.mdx now describe `tags.experiment` as the
  grouping label and state there is no top-level `experiment` field; fixed the
  namespace precedence wording (`--experiment` > `tags.experiment` > default).
- sdk: `defineEval` `tags` accepts the promptfoo map form
  (`Record<string,string>`) in addition to the selection list; `experiment` is
  marked deprecated in favor of `tags.experiment`. Verified live that
  `defineEval({ tags: { experiment } })` resolves the namespace via tags.

Confirmed via subagent that the Dashboard Experiments tab groups on the row
`experiment` field, which the resolver keeps equal to `tags.experiment`, so
`tags.experiment` drives the experiments view end to end.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 98943df
Status: ✅  Deploy successful!
Preview URL: https://88472810.agentv.pages.dev
Branch Preview URL: https://av-4hzh-docs-tags-experiment.agentv.pages.dev

View logs

@christso
christso merged commit 0c9aebd into main Jul 1, 2026
8 checks passed
@christso
christso deleted the av-4hzh-docs-tags-experiment branch July 1, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant