# dataset.addItems() **Added in:** `@mastra/core@1.4.0` Adds multiple items to the dataset in a single bulk operation. ## Usage example ```typescript import { Mastra } from "@mastra/core"; const mastra = new Mastra({ /* storage config */ }); const dataset = await mastra.datasets.get({ id: "dataset-id" }); const items = await dataset.addItems({ items: [ { input: { question: "What is AI?" }, groundTruth: { answer: "Artificial Intelligence" } }, { input: { question: "What is ML?" }, groundTruth: { answer: "Machine Learning" } }, { input: { question: "What is DL?" }, metadata: { category: "deep-learning" } }, ], }); console.log(`Added ${items.length} items`); ``` ## Parameters **items:** (`Array`): DatasetIteminput:unknownInput data for the item.groundTruth?:unknownExpected output or ground truth.metadata?:Record\Arbitrary metadata. ## Returns **result:** (`Promise`): Array of created dataset items. See dataset.addItem() for the item shape.