Couple of minor fixes and tweaks to the table merger. #963
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I observed the LLM sometimes having issues distinguishing where one table ended and the next started, so I added headers - either ELEMENT 1/ELEMENT 2 or DOCUMENT 1/DOCUMENT 2 in the llm_query transform.
Added a default implementation for preprocess_element and postprocess_element in the ElementMerger base class. This just reduces code in some simple sub-classes.
Added code to update the table_continuation to be True or False. This is because I ended up getting better results when asking the LLM to explain its reasoning in some cases, but I didn't want all of the output carried along in the element.
Minor fix to address an invalid escape character warning in a comment.