Prefer a preset? Classify text, label sentiment, or apply a scoring rubric. No API key required; full-file plans start at $15.
A safe batch pipeline
- Parse the CSV locally and keep the original row index.
- Validate the selected column and skip empty cells explicitly.
- Build one stable question configuration for the entire job.
- Process a small number of rows concurrently.
- Write each answer to durable local progress as it succeeds.
- Retry 429, timeout, and 5xx responses with bounded backoff.
- Export original rows plus normalized decision columns.
Why not send the whole CSV in one prompt?
A single prompt makes row-to-result mapping fragile, raises context usage, and forces the entire job to fail or retry together. Per-row calls preserve structured output, isolate failures, and make pause/resume straightforward.
Run a reproducible Python example
Download the Python script, 40 fictional feedback rows, and versioned five-category question into one folder. Python 3.10 or later is sufficient; no packages are required.
python3 decisions-csv-batch.py customer-feedback.csv
# Writes progress.json and results.csv without network calls.
# Every non-empty row is explicitly marked mock, not a model prediction.
# To process with your own OpenAI project, set OPENAI_API_KEY
# in your local environment, then explicitly enable paid API requests:
python3 decisions-csv-batch.py customer-feedback.csv --live \
--checkpoint live-progress.json --output live-results.csvThe script sends one request at a time (concurrency limit 1), makes at most three attempts per row with a 30-second request timeout, and retries only connection failures, timeouts, HTTP 429 and 5xx errors. It honors numeric Retry-After delays up to 60 seconds. Other HTTP errors stop the run. Re-run the same command to resume; successful answers, refusals and blank rows are preserved. Failed transient rows are attempted again on a later run.
Each zero-based row ID is bound to a fingerprint of the exact input file, column, question, model and offline/live mode. A different configuration requires a new checkpoint. Atomic checkpoint replacement protects completed local records; it does not guarantee exactly-once API billing if a request succeeds just before a crash. Run only one process per checkpoint.
Inspect and join the output
The output keeps all original columns and adds decidecsv_row_id, decidecsv_status, and decidecsv_answer_json. A successful live answer retains its selected choice, confidence and probability distribution; refusals and skipped empty cells remain explicit. For example, the offline fixture for row 0 is:
decidecsv_row_id: 0
decidecsv_status: mock
decidecsv_answer_json: {"status":"mock","answer":{"type":"choice","choice":"other","confidence":null,"probabilities":[],"note":"Offline fixture, not model output"}}Compare the exported row ID and original feedback_id before routing anything. Offline fixtures verify parsing, export and resume; they provide no accuracy evidence. The checkpoint and export contain your data and answers, so store them locally with appropriate access. The script requires your API key; the DecideCSV browser tool below includes model usage and requires no key.
Errors that should not be retried blindly
| Error | Action |
|---|---|
| Authentication or endpoint access denied | Stop the batch and verify the server-side project configuration. |
| Invalid question configuration | Fix the shared configuration before resuming. |
| Rate limit or timeout | Back off, then retry the affected row with the same local row record. |
| Server error | Retry a limited number of times and keep all completed rows. |
Use a script or a browser tool?
Write a script when the job is repeatable, belongs in a production pipeline, or needs custom storage. Use a browser runner when the file is small, the rule is one-off, and the value is avoiding setup, retry, and export code.
Sources and verification
Product facts on this page were checked against the following primary sources on October 20, 2026.