n8n-io/n8n · error · Error

No examples found in dataset "${datasetName}"

Error message

No examples found in dataset "${datasetName}"

What it means

No filters were applied but the loaded dataset yielded zero examples and `maxExamples` is set. This is the 'dataset is empty' twin of the filtered-no-match case: the harness cannot run because there is nothing to evaluate. The dataset name is included in the message.

Source

Thrown at packages/@n8n/ai-workflow-builder.ee/evaluations/harness/runner.ts:396

	}

	if (filters && matches.length === 0) {
		const filterSummary = [
			filters.notionId ? `id:${filters.notionId}` : undefined,
			filters.technique ? `technique:${filters.technique}` : undefined,
			filters.doSearch ? `do:${filters.doSearch}` : undefined,
			filters.dontSearch ? `dont:${filters.dontSearch}` : undefined,
		]
			.filter((v): v is string => v !== undefined)
			.join(', ');

		throw new Error(
			`No examples matched filters (${filterSummary}) in dataset "${datasetName}" (scanned ${scanned})`,
		);
	}

	if (!filters && maxExamples && matches.length === 0) {
		throw new Error(`No examples found in dataset "${datasetName}"`);
	}

	return matches;
}

async function resolveLangsmithData(params: {
	dataset: string;
	langsmithOptions: LangsmithRunConfig['langsmithOptions'];
	lsClient: {
		readDataset: (args: { datasetName: string }) => Promise<{ id: string }>;
		listExamples: (args: { datasetId: string; limit?: number }) => AsyncIterable<Example>;
	};
	logger: EvalLogger;
}): Promise<string | Example[]> {
	const { dataset, langsmithOptions, lsClient, logger } = params;

	const datasetName = dataset;
	const maxExamples = langsmithOptions.maxExamples;

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Confirm the dataset path/name is correct and that the file is present and non-empty.
  2. Re-generate the dataset from its source and re-run.
  3. Check that `maxExamples` is unset or `> 0`.

Example fix

// before
run --dataset empty-dataset --max-examples 10
// after
run --dataset real-dataset --max-examples 10
Defensive patterns

Strategy: validation

Validate before calling

function assertDatasetUsable(examples: unknown[], maxExamples?: number): void {
  if (examples.length === 0) throw new Error('dataset is empty; cannot run evaluation');
  if (typeof maxExamples === 'number' && maxExamples <= 0) throw new Error('maxExamples must be > 0');
}
assertDatasetUsable(loadedExamples, args.maxExamples);

Prevention

When it happens

Trigger: Dataset file/object resolves to an empty array, or a directory dataset has no valid entries. The `!filters && maxExamples && matches.length === 0` branch.

Common situations: Pointing `--dataset` at the wrong (empty) file; dataset generation script produced no rows due to an upstream error; a gitignored/missing dataset path; `maxExamples=0` passed explicitly.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/15e66d5f57635b9a. Report an issue: GitHub.