Skip to content
Discussion options

You must be logged in to vote

Yes, you can run evaluations on aggregated observation outputs within a trace using custom evaluators in the Experiments SDK.(1)

When using the Experiments SDK, you can create custom evaluators that access multiple observations through the trace context. The evaluator function receives the full trace data, allowing you to aggregate outputs from multiple observations.(1)

Here's how to implement this:

Python SDK:

from langfuse import Evaluation

def aggregated_evaluator(*, item, trace, **kwargs):
    """Evaluate aggregated outputs from multiple observations"""
    # Access all observations in the trace
    observations = trace.observations
    
    # Filter and aggregate outputs as needed
    

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@gadirajupavantiwari
Comment options

Answer selected by jannikmaierhoefer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant