Overview
CSV is a lightweight training format for datasets with one input, a reference context, and one or more outputs.
Use the single-output shape for one output, or the multi-output shape when each row has multiple independent output labels.
Download templates
Download single-output CSV template Download multi-output CSV templateCSV shapes
Single output
The single-output shape contains:
InputOutputReference
Column order does not change the required names. This shape is converted to a StateMachineInstruction.
For example:
| Input | Output | Reference |
|---|---|---|
| Hello | greeting | A greeting |
| What should I wear? | advice | A request for advice |
Multiple outputs
A multi-output CSV must contain:
InputReference- At least one additional output column, such as
OutputOne,OutputTwo, orIntent
For example:
| Input | OutputOne | OutputTwo | Reference |
|---|---|---|---|
| Hello | greeting | positive | A greeting |
| What should I wear? | advice | neutral | A request for advice |
The exact Input,Output,Reference shape is always treated as single output. A CSV with Input, Reference, and additional output columns is treated as multi-output and converted to a MultiClassifierInstruction.
Output-column order is preserved. Each output column gets its own state map containing its unique non-empty values.
Row rules
- The first data row must contain a non-empty value in every output column. Later empty output cells inherit the previous non-empty value; in multi-output CSVs, inheritance is tracked independently for each output column.
- Every data row must provide an output value directly or inherit it from the previous row.
- A multi-output row produces exactly one value for every declared output key.
InputandReferenceare required.- Headers must be unique.
- At least one output column must exist in addition to
InputandReference.
The converter removes rows with an empty Input before processing them.
Multi-output
Multi-output samples use a JSON object keyed by output column name:
{"OutputOne":"greeting","OutputTwo":"positive"}
This allows each output column to select from the labels discovered in that column.
Errors
Conversion fails when Input or Reference is missing, headers are duplicated, no output column is declared, or the first data row has an empty output cell.
Databiomes