Repository navigation
spike(docling): extraction template + root cause of docling-graph's 0 edges - #101
Merged
Merged
Conversation
…root cause of docling-graph's 0 edges docling-graph drops every edge when the template root has is_entity=False (the edge walk returns at the root). Verified offline on a saved Qwen3.8 output (36 nodes/0 edges vs 37 nodes/67 edges) and live (28 nodes/53 edges). The template root is now an entity; tests/test_template_edges.py pins both the working template and the failure mode. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X
elasticdotventures
changed the base branch from
docs/research-document-knowledge-ingest
to
main
October 15, 2026 11:27
elasticdotventures
marked this pull request as ready for review
October 15, 2026 11:27
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.
Draft spike on top of #98 (stacked: base is the research branch).
Why docling-graph produced no edges:
GraphConverter._create_edges_passreturns an empty list immediately when the template's root class hasis_entity=False, so every edge below the root is dropped even though the model output contains the relations. The converter's warning ("extraction was salvaged and list entities were dropped") is misleading.Evidence (same saved Qwen3.8 output, converter only): root
is_entity=False→ 36 nodes / 0 edges; root as an entity → 37 nodes / 67 edges (HAS_CLAIM 7, HAS_ENTITY 12, HAS_CONCEPT 14, MENTIONS 7, ABOUT 7, RELATED_TO 20). Live end-to-end against Qwen3.8 on :8002, dense contract: 28 nodes / 53 edges, e.g. the claim "Rust is much faster than Java" MENTIONS Rust and Java.Contents:
kr0ki_docling/templates/core.py(Entity/Concept/Claim, root is an entity),tests/test_template_edges.py(offline; pins the working template and the failure mode), README with findings.Not here: HTTP wrapper, Containerfile, docling-mcp entrypoint, PROV-O mapping, server integration.
Tests: 2 pass (venv with docling + docling-graph).
🤖 Generated with Claude Code
https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X