Repository navigation
fix: list tables and text items in the editor outline - #58
Merged
Merged
Conversation
Contributor
|
✅ DCO Check Passed Thanks @dolfim-ibm, all your commits are properly signed off. 🎉 |
Contributor
Merge Protections🟢 All 2 merge protections satisfied — ready to merge. Show 2 satisfied protections🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 Require two reviewer for test updatesWhen test data is updated, we require two reviewers
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The editing agent planned its operation from the table-of-contents outline, which only lists headings. The model could not see the refs of tables and text items, so update_content on a table guessed refs such as "#/table/1". Use the full outline, which lists every item with its ref. Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
dolfim-ibm
force-pushed
the
fix/editor-outline-and-lazy-extractor
branch
from
October 20, 2026 18:37
7fd26d1 to
8fdf16f
Compare
PeterStaar-IBM
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Found while running
DoclingEditingAgentagainst a remote LLM (watsonx.ai) to fill a form table._identify_document_itemsbuilt the outline with the defaultOutlineMode.TABLE_OF_CONTENTS, which only lists headings. The model never saw the refs of tables or text items, whichupdate_contentandrewrite_contentneed. Asked to fill a form table, granite-4-h-small answered"ref": "#/table/1"and the run failed while resolving it.The editor now uses
OutlineMode.OUTLINE, which lists every item with its ref. With this change the same task fills the table without naming its ref in the prompt.Note: the prompt grows with the number of items in the document, which matters for long documents (the existing TODO about the outline format is still relevant).
Tests
tests/test_editor_validation.py::TestIdentifyDocumentItemschecks that the planning prompt contains the table ref. It fails onmainand passes with this change.ruff,mypyandpytest -m "not slow"pass.The lazy
DocumentExtractorimport that was first part of this PR moves to a separate PR, together with running ondocling-slim.