3 ms·
It seems ollama only supports JSON Schema. Interestingly, JSON Schema has much less of this problem than say CSV - when the model is forced to produce `{"first
by mmoskal 2y ago
It seems ollama only supports JSON Schema.
Interestingly, JSON Schema has much less of this problem than say CSV - when the model is forced to produce `{"first_key":` it will generally understand it's supposed to continue in JSON. It still helps to tell it the schema though, especially due to weird tokenization issues you can get otherwise.
- diggan 2y ago> It seems ollama only supports JSON Schema. "Encoding" CSV as JSON is trivial though, so make it output JSON then parse the array-of-arrays into CSV :)