# dataset.update()

**Added in:** `@mastra/core@1.4.0`

Updates dataset metadata, name, description, and/or schemas. Zod schemas are automatically converted to JSON Schema.

## Usage example

```typescript
import { Mastra } from '@mastra/core'
import { z } from 'zod'

const mastra = new Mastra({
  /* storage config */
})

const dataset = await mastra.datasets.get({ id: 'dataset-id' })

// Update with plain metadata
const updated = await dataset.update({
  name: 'Updated QA pairs',
  description: 'Revised evaluation set',
})

// Update with Zod schema (auto-converted to JSON Schema)
const updated2 = await dataset.update({
  inputSchema: z.object({
    question: z.string(),
    context: z.string().optional(),
  }),
})
```

## Parameters

**name** (`string`): New display name.

**description** (`string`): New description.

**metadata** (`Record<string, unknown>`): Updated metadata.

**inputSchema** (`unknown`): JSON Schema or Zod schema for item inputs.

**groundTruthSchema** (`unknown`): JSON Schema or Zod schema for item ground truths.

## Returns

**result** (`Promise<DatasetRecord>`): The updated dataset record. See dataset.getDetails() for the full shape.