Dataset import format
Prepare dashboard files and management import bodies.
Dashboard JSON
A JSON import file contains an array of case objects:
[
{
"input": "I was charged twice for my subscription.",
"expectedOutput": "billing",
"inputFormat": "text",
"referenceFormat": "text"
}
]| Field | Meaning |
|---|---|
| input | Required nonempty string, up to 100,000 characters |
| expectedOutput | Optional reference string, up to 100,000 characters |
| inputFormat | text or json; defaults to text for a new case |
| referenceFormat | text or json; defaults to text for a new case |
JSON-formatted content is still stored as a string inside the case object. For example:
[
{
"input": "{\"question\":\"Can I get a refund?\",\"policy\":\"Unused purchases within 30 days are eligible.\"}",
"inputFormat": "json"
}
]The inner string must parse as JSON. Scalars, arrays, and objects are valid JSON values; use an object for named input variables. Input and reference formats are independent. An edit that omits a format preserves the field's existing format.
TSV
Use one case per line with a tab between input and optional reference. You may omit a header, or use the exact header input and expectedOutput separated by a tab. Use JSON instead when a field needs embedded tabs or newlines, or explicit JSON formats.
I was charged twice. billing
The export button is broken. technicalThe dashboard accepts .json, .tsv, and .txt import files up to 5 MB. Use the preview to inspect invalid rows and duplicates before applying changes.
Management request body
API and CLI imports wrap the row array with the current dataset revision and an import mode:
{
"revision": 0,
"mode": "append",
"rows": [{ "input": "I was charged twice.", "expectedOutput": "billing" }]
}The revision here is illustrative. Read the dataset and use its actual revision. append retains current cases; replace replaces them. An import body may contain up to 1,000 rows, but the dataset capacity is 10 on Free and 500 on Pro. Exact duplicates are skipped and all-invalid imports are rejected.
Download complete tutorial arrays: ticket routing, bug reports, and support replies.