Using CSV in a beginner AI workflow

Define what one row means, preserve identifiers, and check fields with punctuation before sharing an export.

Give the assistant a row definition

A CSV export is useful when the next step expects tabular data. Tell the assistant what each row represents, the exact header names, and whether output order matters. For a reading list, one row might represent one physical copy even when several copies share a title. Keep the copy identifier separate from the title, so deduplication does not remove valid records. The IETF’s common CSV format description documents conventions for fields, quoting, headers, and line breaks. 1

Use a fixture that includes punctuation

Copy one title with a comma and another with quotation marks into your test. A correct exporter needs to preserve those characters inside fields. Add a missing value and decide how it should appear. Then open the output using the same importer that will receive it. Reading the raw text alone is useful for inspection, but importing the fixture catches mismatches such as a spreadsheet interpreting an identifier as a number.

Put explanations outside the data

A prompt can specify that the file contains only rows and that comments about missing inputs go in a separate note. Anthropic’s prompting guidance recommends clear instructions about what the result should look like. Verify both the row count and one multiline or quoted field after export. Record whether the receiving application expects a particular delimiter or encoding, since ordinary references to CSV may leave real import settings unspecified. 2

Sources

  1. IETF's common CSV format
  2. Anthropic prompting best practices