Expand description
Helpers for extracting structured content embedded in free-form LLM prose.
LLMs are prompted to return JSON but often wrap it in prose or markdown fences. This module provides the bracket-matching extraction step shared by callers that parse a JSON array out of a raw LLM response; each caller keeps its own policy for what to do when extraction fails (empty-result fallback vs. hard error).
Functionsยง
- extract_
json_ array_ slice - Extract the substring spanning the first
[and the last]inraw.