[Feature Request]: Robust block parsing in LLMExtractionStrategy.extract #1363
Closed
NiklasLue
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What needs to be done?
When LLMs return only one block of information, they do not put it in a list, i.e. they return a dictionary.
Once this block is parsed, the blocks are not a list as expected and an error is raised. One approach to make parsing more robust is to check if the blocks object is a dictionary (with the right structure). If so, put the single block into a list and continue.
What problem does this solve?
Errors raised due to faulty parsing.
Target users/beneficiaries
Developers
Current alternatives/workarounds
Patch the function manually
Proposed approach
In the response parsing of the extract method of the LLMExtractionStrategy add a check for dictionaries, e.g. like this (MVP)
Beta Was this translation helpful? Give feedback.
All reactions