feat: upload eval-results.json to Braintrust (AI-921) - #89
Closed
Rodriguespn wants to merge 3 commits into
Closed
Conversation
Adds a pnpm upload:braintrust command that mirrors the exported eval-results.json snapshot into Braintrust experiments (one experiment per Configuration, one event per eval; passed/checkPassRate as scores, everything else as metadata/tags) to trial Braintrust's comparison UI. Wires a best-effort, secret-gated upload into the eval-refresh workflow, limited to manual workflow_dispatch refreshes so the committed JSON stays authoritative and PR-preview runs don't pollute the shared project. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AI-921 Store eval results in Braintrust instead of eval-results.json
Leverage Braintrust Experiments to store our eval results instead of the committed This changes how we run CI today: the First step: upload the existing |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Rodriguespn
marked this pull request as draft
July 14, 2026 16:40
Extract the pure snapshot→Braintrust mapping (scoresFor, tagsFor, metadataFor, experimentMetadata, groupByExperiment, isResultRow) into lib/braintrust-mapping.ts and cover it with vitest. Runs credential-free as part of `pnpm check`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Closing this in favor of #101 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
pnpm upload:braintrust, a script that reads the existingeval-results.jsonsnapshot and mirrors it into Braintrust experiments so we can trial their built-in comparison/leaderboard UI. No eval runs, no schema changes — just the upload.Mapping (one Braintrust experiment per result-file experiment / Configuration, one event per eval):
id← eval id (stable, so--updatere-logs the same row)input←{ eval, prompt }output←{ passed, checks }scores←{ passed: 0|1, checkPassRate: 0..1 }(numeric + comparable across evals)metadata← everything else, withexperimentDisplayflattened to top-level keys (agent,modelProvider,modelId,reasoningEffort) so they're usable as Braintrust grouping axestags← product + topic + interface + experimentSuiteThe
eval-refreshworkflow gains a best-effort Upload results to Braintrust step. It:workflow_dispatchrefreshes (so label-triggered PR runs don't push preview data into the shared project),BRAINTRUST_API_KEYsecret is configured,continue-on-error: true, so the existing JSON-commit path stays authoritative.New commands
Follow-up: add the
BRAINTRUST_API_KEYrepo secret to actually enable the CI step.Closes AI-921.