Class ScorerBrainstoreImpl<INPUT,OUTPUT>

java.lang.Object
dev.braintrust.eval.ScorerBrainstoreImpl<INPUT,OUTPUT>
All Implemented Interfaces:
Scorer<INPUT,OUTPUT>

public class ScorerBrainstoreImpl<INPUT,OUTPUT> extends Object implements Scorer<INPUT,OUTPUT>
A scorer that invokes a remote Braintrust function to compute scores.

This implementation fetches a scorer function from Braintrust and invokes it via the API for each task result. The remote function receives the input, output, expected, and metadata as arguments.

Supports distributed tracing: if an object ID is available in OTEL baggage and a valid span context exists, the scorer will pass parent span information to the remote function, enabling the remote function's spans to appear as children of the local scorer span.