Evaluations: Langfuse datasets as a source for the Evaluation Trigger, and export of executions / eval results to Langfuse experiments

The idea is:

Let the Evaluation Trigger read its test cases from a Langfuse dataset, alongside Google Sheets and Data Tables, and let n8n write back to Langfuse:

  1. Langfuse as a dataset source. Add a third source option to the Evaluation Trigger, next to dataTable and googleSheets. The user picks a Langfuse credential and a dataset name, and each dataset item (input, expectedOutput, metadata) becomes one row. Optional filters: item status, metadata keys, max items. A field mapping would help too, since many teams store expectedOutput as grading criteria rather than as a literal answer.
  2. Eval results reported as a Langfuse experiment. When the evaluation finishes, create an experiment on that dataset (name = n8n test run id or a user-defined label). Each experiment item is linked to its dataset item and to the trace of its execution, and the metrics from “Set Metrics” are attached as scores. This should use Langfuse’s current experiments model rather than the legacy dataset-run-items API.
  3. Export executions to a dataset. n8n’s backend already seems able to add a row to a Data Table dataset (EvaluationDatasetService.addRow). Extend that to Langfuse: an “Add to Langfuse dataset” action on past executions, from the executions list (bulk) or as an operation of the Langfuse node. It would copy the trigger input and the final output into input / expectedOutput, with the execution and workflow ids kept in metadata.

My use case:

We run AI agents both as n8n workflows and as code-first agents. Langfuse is our shared place for prompts, datasets and experiments. Today an n8n evaluation needs its own copy of the dataset in a Sheet or Data Table, and its results stay in n8n. That makes it impossible to compare, in one place, the same dataset run against an n8n agent and against a code-first agent, or against two models.

A typical flow we want: take real past executions of a workflow, turn them into a regression dataset, then re-run that dataset against a version of the workflow that uses a different model (the judge model stays fixed), and compare the experiments side by side in Langfuse.

I think it would be beneficial to add this because:

  • Teams that already use Langfuse would not have to keep two copies of every dataset in sync.
  • Evaluation results would show up next to the traces and prompt versions they relate to.
  • Building a dataset from production executions is the cheapest source of realistic test cases, and today it requires a hand-built export workflow (n8n API + Code node + HTTP calls to the Langfuse API).

Any resources to support this?

Are you willing to work on this?

Happy to test and give feedback.