Add rows
Five ways to add new examples to a dataset you've already created.
Adding rows brings more examples into a dataset that already exists. If you don’t have a dataset yet, start with Create a dataset. Columns stay put unless imported data brings a name the dataset doesn’t already have. Whichever path you pick, new rows always land after whatever’s already in the dataset, appended in the order you add them.
Add rows using the SDK
Use this when you’re scripting the setup or pushing rows from your own pipeline.
# pip install futureagi
import os
from fi.datasets import Dataset
from fi.datasets.types import Cell, Row
os.environ["FI_API_KEY"] = "<fi_api_key>"
os.environ["FI_SECRET_KEY"] = "<fi_secret_key>"
dataset = Dataset.get_dataset_config("support-agent-eval")
rows = [
Row(cells=[
Cell(column_name="user_query", value="How do I reset my password?"),
Cell(column_name="response_quality", value=7),
Cell(column_name="is_helpful", value=True),
]),
Row(cells=[
Cell(column_name="user_query", value="What's your refund policy?"),
Cell(column_name="response_quality", value=9),
Cell(column_name="is_helpful", value=True),
]),
]
dataset = dataset.add_rows(rows=rows)import { Dataset, createRow, createCell } from "@future-agi/sdk";
process.env["FI_API_KEY"] = "<fi_api_key>";
process.env["FI_SECRET_KEY"] = "<fi_secret_key>";
async function main() {
const dataset = await Dataset.open("support-agent-eval", { createIfMissing: false });
const rows = [
createRow({
cells: [
createCell({ columnName: "user_query", value: "How do I reset my password?" }),
createCell({ columnName: "response_quality", value: 7 }),
createCell({ columnName: "is_helpful", value: true }),
],
}),
createRow({
cells: [
createCell({ columnName: "user_query", value: "What's your refund policy?" }),
createCell({ columnName: "response_quality", value: 9 }),
createCell({ columnName: "is_helpful", value: true }),
],
}),
];
await dataset.addRows(rows);
}
main();curl --request POST \
--url https://api.futureagi.com/model-hub/develops/<dataset_id>/add_rows/ \
--header 'content-type: application/json' \
--header 'X-Api-Key: <fi_api_key>' \
--header 'X-Secret-Key: <fi_secret_key>' \
--data '{
"rows": [
{
"cells": [
{ "column_name": "user_query", "value": "How do I reset my password?" },
{ "column_name": "response_quality", "value": 7 },
{ "column_name": "is_helpful", "value": true }
]
},
{
"cells": [
{ "column_name": "user_query", "value": "What'\''s your refund policy?" },
{ "column_name": "response_quality", "value": 9 },
{ "column_name": "is_helpful", "value": true }
]
}
]
}' A Row accepts an order, but new rows are always appended after the last existing one, whatever order you pass, so it isn’t how you control placement. See the Datasets SDK page for the full Dataset class.
Tip
Every drawer path below starts the same way: on the dataset’s Data tab, click Add Row to open the drawer, which has a tile for each way to add rows.
Add a row from the grid
Use this for typing in one or two examples by hand.
Add empty rows
Pick Add empty row and choose how many to add.
Fill in the cells
New rows appear at the bottom of the table with empty cells. Double-click a cell to enter a value, and repeat for each row.
Instead of starting blank, you can also duplicate rows you already have: select them in the grid, click Duplicate in the toolbar, then set the number of copies.
Copy rows from another dataset or experiment
Use this when the rows you need already exist somewhere else.
Pick the source
In the Add Row drawer, select Add from existing model dataset or experiment, then pick the source: another dataset, or an experiment snapshot.
Map the columns
Map each source column to a column in this dataset. Only mapped columns copy over; anything left unmapped in the source is skipped.
Import rows from Hugging Face
Use this to pull in a public dataset instead of typing examples by hand.
Pick a dataset and split
In the Add Row drawer, select Import from Hugging Face, then search for the dataset and pick the subset next to the split. Set how many rows to import.
Import
Start the import. Each Hugging Face feature is matched to a column by name; a name that doesn’t exist yet becomes a new column, backfilled with empty cells on the rows that already existed.
Add rows from a file
Use this for a CSV, Excel, JSON or JSONL export you already have.
Upload the file
In the Add Row drawer, select Upload a file (JSONl/ JSON/ CSV), then upload it.
Rows land in the dataset
Column names in the file are matched to existing columns by name. A name that isn’t already a column gets created, backfilled with empty cells on the rows that already existed.
Caps you’ll hit
- Adding empty rows from the grid: the picker tops out at 10 at a time, up to 100 per request via the API
- Duplicating a row: at most 100 copies
- Uploading a file: 25 MB, restricted to
.csv,.xls,.xlsx,.json,.jsonl
The full set of dataset and column limits is in Limits & Data Types.
Dive deeper
Questions & Discussion