feat: trace judge calls in Braintrust - #369
Draft
mattrossman wants to merge 4 commits into
Draft
mattrossman wants to merge 4 commits into
mattrossman wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This reverts commit 9f97812.
This branch was successfully deployed
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.
Scorers now ask for verdicts through
ctx.judge(), which records each judge call's model, full prompt, output, tokens and timing inresult.json. The uploader logs each call as an LLM span under the score span:purpose: "scorer"is how Braintrust keeps judge cost out of preset cost charts. Core no longer exportsjudge()so folks are encouraged to usectx.judgeas the preferred way to access the judge in scorers similarctx.query.As an incidental fix, the root eval span no longer logs agent tokens, since its LLM spans carry them. Braintrust sums metrics across every span in a trace, so with the initial approach in #351 the experiment table double counts tokens (example). Note
aiSdkAgenthas no per-request usage so its rows now show no tokens, but it's unused and slated for removal anyway.Ran the regression suite with
codex-gpt-6-lunathrough the refresh workflow (snapshot, trace with 3 judge calls).Closes AI-1271