deepset-ai/haystack · error

No inputs provided.

Error message

No inputs provided.

What it means

EvaluationRunResult.__init__ raises ValueError when the inputs dict is empty. An evaluation run needs at least one input column to align inputs with metric outputs; an empty run has nothing to score or report.

Source

Thrown at haystack/evaluation/eval_run_result.py:45

        :param run_name:
            Name of the evaluation run.

        :param inputs:
            Dictionary containing the inputs used for the run. Each key is the name of the input and its value is a list
            of input values. The length of the lists should be the same.

        :param results:
            Dictionary containing the results of the evaluators used in the evaluation pipeline. Each key is the name
            of the metric and its value is dictionary with the following keys:
                - 'score': The aggregated score for the metric.
                - 'individual_scores': A list of scores for each input sample.
        """
        self.run_name = run_name
        self.inputs = deepcopy(inputs)
        self.results = deepcopy(results)

        if len(inputs) == 0:
            raise ValueError("No inputs provided.")
        if len({len(lst) for lst in inputs.values()}) != 1:
            raise ValueError("Lengths of the inputs should be the same.")

        expected_len = len(next(iter(inputs.values())))

        for metric, outputs in results.items():
            if "score" not in outputs:
                raise ValueError(f"Aggregate score missing for {metric}.")
            if "individual_scores" not in outputs:
                raise ValueError(f"Individual scores missing for {metric}.")

            if len(outputs["individual_scores"]) != expected_len:
                raise ValueError(
                    f"Length of individual scores for '{metric}' should be the same as the inputs. "
                    f"Got {len(outputs['individual_scores'])} but expected {expected_len}."
                )

    @staticmethod

View on GitHub (pinned to e318778c9b)

Solutions

  1. Ensure the evaluation dataset has at least one row before constructing EvaluationRunResult
  2. Check that the pipeline run's EvaluationResult actually contains recorded inputs
  3. Verify argument order: EvaluationRunResult(run_name, inputs, results) — inputs must be the non-empty dict of input lists

Example fix

// before
run = EvaluationRunResult("run1", inputs={}, results=results)  # ValueError
// after
if not inputs:
    raise RuntimeError("Evaluation inputs are empty; nothing to evaluate")
run = EvaluationRunResult("run1", inputs=inputs, results=results)
Defensive patterns

Strategy: validation

Validate before calling

if not inputs or len(next(iter(inputs.values()), [])) == 0:
    raise RuntimeError("Evaluation aborted: no inputs to evaluate")
EvaluationRunResult(run_name, inputs=inputs, results=results)

Try / catch

try:
    run = EvaluationRunResult(run_name, inputs=inputs, results=results)
except ValueError as e:
    if "No inputs provided" in str(e):
        raise RuntimeError("Evaluation run had no inputs; check the pipeline run/inputs") from e
    raise

Prevention

When it happens

Trigger: Calling EvaluationRunResult(run_name, inputs={}, results={...}) — e.g. an EvaluationResult from a pipeline run where no inputs were recorded, or a filtered-out/empty evaluation dataset.

Common situations: Running evaluation over an empty dataset, a pipeline run whose inputs dict came back empty, accidentally passing results as the inputs argument.

Related errors


AI-assisted analysis of deepset-ai/haystack@e318778c9b (2026-08-30). Data as JSON: /api/errors/d81896b3bd926a28. Report an issue: GitHub.