{"record":{"id":"15e66d5f57635b9a","repo":"n8n-io/n8n","slug":"no-examples-found-in-dataset-datasetname","errorCode":null,"errorMessage":"No examples found in dataset \"${datasetName}\"","messagePattern":"No examples found in dataset \"(.+?)\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/ai-workflow-builder.ee/evaluations/harness/runner.ts","lineNumber":396,"sourceCode":"\t}\n\n\tif (filters && matches.length === 0) {\n\t\tconst filterSummary = [\n\t\t\tfilters.notionId ? `id:${filters.notionId}` : undefined,\n\t\t\tfilters.technique ? `technique:${filters.technique}` : undefined,\n\t\t\tfilters.doSearch ? `do:${filters.doSearch}` : undefined,\n\t\t\tfilters.dontSearch ? `dont:${filters.dontSearch}` : undefined,\n\t\t]\n\t\t\t.filter((v): v is string => v !== undefined)\n\t\t\t.join(', ');\n\n\t\tthrow new Error(\n\t\t\t`No examples matched filters (${filterSummary}) in dataset \"${datasetName}\" (scanned ${scanned})`,\n\t\t);\n\t}\n\n\tif (!filters && maxExamples && matches.length === 0) {\n\t\tthrow new Error(`No examples found in dataset \"${datasetName}\"`);\n\t}\n\n\treturn matches;\n}\n\nasync function resolveLangsmithData(params: {\n\tdataset: string;\n\tlangsmithOptions: LangsmithRunConfig['langsmithOptions'];\n\tlsClient: {\n\t\treadDataset: (args: { datasetName: string }) => Promise<{ id: string }>;\n\t\tlistExamples: (args: { datasetId: string; limit?: number }) => AsyncIterable<Example>;\n\t};\n\tlogger: EvalLogger;\n}): Promise<string | Example[]> {\n\tconst { dataset, langsmithOptions, lsClient, logger } = params;\n\n\tconst datasetName = dataset;\n\tconst maxExamples = langsmithOptions.maxExamples;","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/ai-workflow-builder.ee/evaluations/harness/runner.ts#L378-L414","documentation":"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.","triggerScenarios":"Dataset file/object resolves to an empty array, or a directory dataset has no valid entries. The `!filters && maxExamples && matches.length === 0` branch.","commonSituations":"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.","solutions":["Confirm the dataset path/name is correct and that the file is present and non-empty.","Re-generate the dataset from its source and re-run.","Check that `maxExamples` is unset or `> 0`."],"exampleFix":"// before\nrun --dataset empty-dataset --max-examples 10\n// after\nrun --dataset real-dataset --max-examples 10","handlingStrategy":"validation","validationCode":"function assertDatasetUsable(examples: unknown[], maxExamples?: number): void {\n  if (examples.length === 0) throw new Error('dataset is empty; cannot run evaluation');\n  if (typeof maxExamples === 'number' && maxExamples <= 0) throw new Error('maxExamples must be > 0');\n}\nassertDatasetUsable(loadedExamples, args.maxExamples);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the dataset is non-empty before invoking the runner, with a clearer message than the runner's.","Wire dataset generation into CI so an empty dataset fails the build, not the eval run.","Default `maxExamples` to `undefined` (run all) unless you explicitly want a slice."],"tags":["evaluations","dataset","validation","configuration"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}