Skip to main content

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 template

CSV shapes​

Single output​

The single-output shape contains:

  • Input
  • Output
  • Reference

Column order does not change the required names. This shape is converted to a StateMachineInstruction.

For example:

InputOutputReference
HellogreetingA greeting
What should I wear?adviceA request for advice

Multiple outputs​

A multi-output CSV must contain:

  • Input
  • Reference
  • At least one additional output column, such as OutputOne, OutputTwo, or Intent

For example:

InputOutputOneOutputTwoReference
HellogreetingpositiveA greeting
What should I wear?adviceneutralA 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.
  • Input and Reference are required.
  • Headers must be unique.
  • At least one output column must exist in addition to Input and Reference.

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.

Where to go next​

  • Review the Columns section for column-by-column details.
  • Use the Examples page to store full example CSVs.