Skip to main content
Where this fits: Part of Refine. Editing rows lets you curate a dataset after it is built — most commonly to add expected output to rows imported from traces.
Every dataset row is made of cells: the four built-in fields — Input, Output, Expected output, and Metadata — plus any custom columns you have added. You can edit those cells by hand in the UI, or programmatically over the API, the SDKs, or an MCP agent.

Edit a row in the UI

Open a dataset and open any row to edit its cells inline. Built-in fields and active custom columns each show their own editable field; the values you enter are saved with the row. See Add expected output for the most common case.

Edit a row programmatically

Updates are partial: you send only the cells you want to change, and every cell you omit keeps its current value. This makes it safe to, for example, set expectedOutput on a row without resending its input or output. How cells are addressed:
  • Built-in cells use their field name: input, output, expectedOutput, metadata.
  • Custom columns are set through a custom map keyed by the column’s stable identifier (not its display name). Custom values are merged onto the row’s existing ones, so columns you omit are left untouched. Unknown or removed columns are rejected.
A successful edit creates a new dataset version and returns its id.
You need the row’s id and, for custom columns, the column identifiers. List rows to get their ids, and list the dataset’s columns to get identifiers — both built-in (input, output, …) and custom. These are available in the API, every SDK, and over MCP.

HTTP API

PATCH /v1/projects/{projectSlug}/datasets/{datasetSlug}/rows/{rowId}
FieldTypeRequiredDescription
inputany JSONNoNew input cell. Omit to leave unchanged.
outputany JSONNoNew output cell. Omit to leave unchanged.
expectedOutputany JSONNoNew correct answer for the row. Omit to leave unchanged.
metadataany JSONNoNew metadata cell. Omit to leave unchanged.
customobjectNoCustom column values keyed by column identifier. Merged onto existing values.
curl -X PATCH \
  https://api.latitude.so/v1/projects/my-project/datasets/my-dataset/rows/ROW_ID \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "expectedOutput": "The correct answer",
    "custom": { "COLUMN_IDENTIFIER": "high" }
  }'
The response carries the new dataset version:
{ "versionId": "os4gxr0mhcocrydibwupq4jk", "version": 10 }

SDKs

import { LatitudeApiClient } from "@latitude-data/sdk";

const client = new LatitudeApiClient({ token: process.env.LATITUDE_API_KEY! });

const { version } = await client.datasets.updateRow(
  "my-project",
  "my-dataset",
  "ROW_ID",
  {
    expectedOutput: "The correct answer",
    custom: { COLUMN_IDENTIFIER: "high" },
  },
);

From your coding agent (MCP)

Through the MCP server, an agent like Claude or Cursor can edit a row for you — for example, “in my dataset From Traces Drawer, set the expected output of the failing row to …”. The agent lists the dataset’s rows and columns to resolve the ids, then applies the same partial update described above. For the live tool list and full schemas, see the API reference.

Next step