Skip to main content
Applies to:
  • Plan -
  • Deployment -

Summary

Goal: Aggregate scores across multiple experiments in a single BTQL query. Features: BTQL experiment() multi-ID source, SQL UNPIVOT, GET /v1/experiment API.

Configuration steps

Step 1: Retrieve experiment IDs

Get experiment IDs from the project using the experiments list endpoint:
Extract the id field from each experiment object in the objects array.

Step 2: Query scores across experiments in a single BTQL call

Pass the collected IDs to experiment(). The source accepts multiple IDs in one call.
Use standard SQL syntax (no colons on keywords). Braintrust is moving toward SQL style; the colon-prefixed BTQL keyword syntax (FROM:, UNPIVOT:) is not preferred.

Step 3: Use per-experiment summarize as an alternative

If you need the summary shape per experiment rather than raw aggregation:
Loop this call over each experiment ID collected in Step 1.

Limitations

  • No project-scoped BTQL source (e.g., project_experiments()) exists. Explicit experiment IDs are always required.
  • No single public endpoint returns the project-level experiment summary shown in the UI. That view is composed from per-experiment summaries internally.