LangExtract failing with ResolverParsingError: Content must contain an 'extractions' key (worked before) Body: #292
Replies: 2 comments 3 replies
-
|
Looks like setting |
Beta Was this translation helpful? Give feedback.
-
|
This looks like a model instruction-following issue. A few things to check: 1. Model compatibility
2. Prompt conflict These can override the schema. Remove any output format instructions from your prompt. 3. Schema enforcement extractor = LangExtract(
model="llama3.3",
use_schema_constraints=True,
fence_output=True, # Wrap in ```json
max_char_buffer=1000 # Smaller chunks
)4. Debug the raw output # Patch temporarily to inspect
import langextract
original_parse = langextract.resolver._parse_response
def debug_parse(response):
print(f"Raw response: {response[:500]}")
return original_parse(response)
langextract.resolver._parse_response = debug_parseFor |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I’m running into a persistent issue with Google’s langextract that started recently.
The same code and prompts worked before, but now consistently fail.
This indicates that the model output does not match the schema expected by LangExtract (i.e. the response JSON does not contain an extractions key).
What I observe
LangExtract runs, the LLM responds, but
Models tested
Same behavior on all models.
Hass anyone run into the same issues, and how can it be solved?
Cheers,
Karen
Beta Was this translation helpful? Give feedback.
All reactions