Applies to:
- Plan - Enterprise
- Deployment - Braintrust-hosted or self-hosted AWS
- Data plane - Rewind requires v2.1+ with cloud storage export enabled for self-hosted deployments
- Use case - How to export scorer explanations/rationales to S3: when to use Logs (spans) vs Custom SQL, sample SQL to select output.metadata.rationale, IAM trust-policy wildcard guidance, Rewind/backfill behavior, and downstream implications
Summary
Use Logs (spans) or a Custom SQL export to include scorer explanations in S3.What is happening
Trace-level exports write one summary row per trace. Scorer explanations live on individual scorer spans atoutput.metadata.rationale. A Logs (traces) export does not include that scorer metadata.
Fix or suggestion
Option 1: Switch the automation to Logs (spans)
- Edit the export automation in the UI.
- Change the data type to Logs (spans).
- Save the automation.
Option 2: Use a Custom SQL export (select scorer spans)
- Edit the export automation and choose Custom SQL.
-
Use a query that reads spans and selects the scorer fields. Replace the placeholder
'<project_id>'with your project ID.The query already includes the full scorer metadata to help locate rationales stored under another key. - Click Update automation to save the query.
How to confirm it worked
- Choose a scorer span that contains an explanation in Logs and find its exported row in S3.
- Compare the span’s explanation with
output.metadata.rationalefor Logs (spans) orexplanationfor the Custom SQL query above.
Notes
- To allow multiple automations in one project without updating the IAM trust policy for each automation, use a trust condition with
StringLikeand the external ID patternbt:<org-id>:<project-id>:*. - Changing an existing export keeps its checkpoint. To export historical spans, use Rewind. Rewind keeps existing files and can produce overlapping rows.
- If exports stall or show pending segments, contact Braintrust support for assistance.
- See Export to S3.