Skip to content

feat: initial Braintrust upload support for eval results - #320

Merged
mattrossman merged 13 commits into
mainfrom
feat/ai-1239-braintrust-upload
Sep 23, 2026
Merged

mattrossman merged 13 commits into
mainfrom
feat/ai-1239-braintrust-upload

Conversation

@mattrossman

@mattrossman mattrossman commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator
ℹ️ Notes on diff size
  • ~500 LOC added are pnpm-lock.yaml from the new braintrust SDK dependency.
  • ~200 LOC changed are refactoring export-results.ts into shared logic
  • ~550 LOC added are the uploader itself, of which ~70 are tests

Adds an upload-braintrust script, carved out of #101, that turns results/ into Braintrust experiments. Similar to the earlier #89, but it uploads raw per-run results including transcripts and omits CI changes.

The initial win we get from this is being able to inspect the transcript what the agent said at each step in Braintrust's "Thread" view:

CleanShot 2026-09-22 at 9 17 09 AM@2x

I'm starting with a single scorer "passed" for the binary pass/fail score. Note Braintrust's SDK has precedent for an "assertions" scorer however it behaves differently since it produces a fractional score. Eventually we want to support partial credit too, however I think we have different requirements since we might want to assign different weights to each check, and we may want a concept of extra-credit checks, not just equal slices of a whole.

Local usage maps to the Metrics uploaded to Braintrust:

results/ Braintrust
CleanShot 2026-09-22 at 9 13 14 AM@2x CleanShot 2026-09-22 at 9 13 27 AM@2x

Experiments are named <experiment>@<sha7>-<timestamp> (UTC) so runs are identifiable from the experiment list, where the Source and Updated columns aren't always visible.

Follow-ups planned

This PR intentionally leaves rough edges. The goal of this step was to provide a starting point for our existing data to get into Braintrust.

From here, I plan to add:

  • CI plumbing to run this automatically
  • Improved nesting and metadata so the traces look prettier
  • A de-facto "Project" on Braintrust for this data to live for everyone

For example fixing the per-LLM step durations, making sure the "Timeline" view in Braintrust reflects the timing of each tool call, cross-linking between a PR, Run, and trace, showing tool calls in the "Thread" view.

Sample output for review

See a sample trace I've uploaded to a dev project on Braintrust: gpt-5.6-luna.

How to run manually

On Braintrust:

  • Create a dev Project
  • Go to Settings / General and copy its Project ID.
  • Go to Settings / API keys and create one an API Key

Add these to .env as BRAINTRUST_PROJECT_ID and BRAINTRUST_API_KEY.

Then run:

pnpm eval:upload -- --eval resolve-dataapi-001-empty-results --experiment codex-gpt-5.6-luna  

It'll produce output like

1 experiment(s), 1 eval(s), runs=1, timeout=720s, concurrency=1
⏳ RUN  codex-gpt-5.6-luna x resolve-dataapi-001-empty-results run 1
✅ PASS codex-gpt-5.6-luna x resolve-dataapi-001-empty-results run 1 (checks 7/7, 63s)
   → results/codex-gpt-5.6-luna/resolve-dataapi-001-empty-results/run-1/result.json
✅ codex-gpt-5.6-luna@f50e9e3-20260923T1748Z → https://www.braintrust.dev/app/supabase.io/p/Dev%20(mattrossman%2Fevals)/experiments/codex-gpt-5.6-luna%40f50e9e3-20260923T1748Z

Closes AI-1239

@vercel

vercel Bot commented Sep 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
evals Ignored Ignored Preview Sep 23, 2026 7:56pm UTC

Request Review

@mattrossman
mattrossman marked this pull request as ready for review September 22, 2026 21:42
@mattrossman
mattrossman requested a review from a team as a code owner September 22, 2026 21:42
@mattrossman mattrossman changed the title feat: upload eval results to Braintrust as navigable traces feat: initial Braintrust upload for eval results Sep 22, 2026
@mattrossman mattrossman changed the title feat: initial Braintrust upload for eval results feat: initial Braintrust upload support for eval results Sep 22, 2026

@Rodriguespn Rodriguespn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together. Approving to unblock you. Only one suggestion regarding the experiment names here

…st-upload

# Conflicts:
#	apps/framework/package.json
#	apps/framework/scripts/export-results.ts
@mattrossman

Copy link
Copy Markdown
Collaborator Author

Experiment names updated

CleanShot 2026-09-23 at 1 50 17 PM@2x

Tracking raw transcript uploads in AI-1248.

@mattrossman
mattrossman merged commit 661a785 into main Sep 23, 2026
7 checks passed
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.

2 participants