Langfuse v4: up to 165× faster · Read more
FaqHow to retrieve experiment scores via UI or API/SDK?

How to Retrieve Experiment Scores?

Terminology Note: "Experiment" and "dataset run" are used interchangeably throughout Langfuse. We are moving toward deprecating the term "dataset run" in favor of "experiment", but both terms currently refer to the same concept.

Langfuse supports two types of experiment scores:

  1. Experiment-level scores: Overall metrics for the entire experiment run (e.g., precision, recall, F1-scores). These scores are immutable and represent aggregate performance. Learn more about run-level scores.
  2. Experiment-item-level scores: Scores for individual items within an experiment (e.g., per-generated-output evaluations).

Via API/SDK

Use the Experiments API to retrieve both score levels. Use the API reference for endpoint parameters, filters, pagination, and response fields.

For full trace and observation details, use the Observations API v2. For score-centric queries across experiments, traces, or observations, use the Scores API v3.

When running a new experiment, the Experiment Runner SDK returns scores and results directly. Use the Experiments API when you need to retrieve results from a previous run.


Was this page helpful?

Last edited