Run a Braintrust experiment to benchmark prompt variants and compare scores

domain: www.braintrust.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install the Braintrust SDK (Python or Node.js) and set the BRAINTRUST_API_KEY environment variable
  2. Create or reference an existing project in Braintrust; the SDK auto-creates a project if the name is new
  3. Wrap your LLM call inside braintrust.init_experiment() or use the evaluate() helper, passing project name and experiment name
  4. Log each input, output, and expected value as a span, and attach scores from your scoring functions
  5. Use the Braintrust UI to compare the current experiment against a baseline experiment on the same dataset
  6. Promote the best-performing experiment variant to be the new baseline for future regression comparisons

Known gotchas

Related routes

Run evals with Braintrust
braintrust.dev · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans