ChatGPT allows specifying output formats like JSON or CSV. Test at the OpenAI Playground.
Classify the following items as fruit or vegetable: apple, banana, cucumber.
Output the data as JSON in the format [{"name": "Apple", "type": "Fruit/Vegetable"}]
[{"name": "Apple", "type": "Fruit"}, {"name": "Banana", "type": "Fruit"}, {"name": "Cucumber", "type": "Vegetable"}]
Classify the following items as fruit or vegetable: apple, banana, cucumber. Output the data as CSV in the format "name", "type"
"apple", "fruit"
"banana", "fruit"
"cucumber", "vegetable"