Hacker News new | ask | show | jobs
by Janymos 1203 days ago
I wonder what the standard approach is when the LLM does not return valid JSON data? Do you skip the input data all together, or use the parsing error to generate a valid JSON?
1 comments

The general rule is: be minimally liberal in what I receive :)

A parse error kicks off a recovery process where, in theory, we could run any number of rules. In practice the only problems are unescaped quotes in strings, or mismatched quotes (start with `"` and terminate with `'`)