list-negative-json-parser-tolerates-prose-preamble
IN premise
The `list_negative` LLM classification response parser uses `re.finditer` to extract JSON objects from responses that include prose preamble, handling the common LLM pattern of prefacing structured output with natural language rather than requiring clean JSON.
Summary
The classification parser is designed to be forgiving about how LLMs format their responses. Instead of failing when the model wraps its JSON output in conversational text like "Here are the results:", it scans through the entire response to find and extract JSON objects wherever they appear, making the pipeline more robust against common LLM output quirks.
Dependents
These beliefs depend on this one:
- list-negative-parser-is-fully-resilient — The list-negative LLM response parser handles all degradation levels: regex extraction recovers JSON objects from prose-laden responses, and completely unparseable output returns zero results gracefully rather than raising exceptions.
Details
| Source | entries/2026/04/29/session-summary.md |