Skip to content

spike(docling): extraction template + root cause of docling-graph's 0 edges - #101

Merged
elasticdotventures merged 1 commit into
mainfrom
spike/kr0ki-docling-sidecar
Oct 15, 2026
Merged

elasticdotventures merged 1 commit into
mainfrom
spike/kr0ki-docling-sidecar

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

Draft spike on top of #98 (stacked: base is the research branch).

Why docling-graph produced no edges: GraphConverter._create_edges_pass returns an empty list immediately when the template's root class has is_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

…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
elasticdotventures changed the base branch from docs/research-document-knowledge-ingest to main October 15, 2026 11:27
@elasticdotventures
elasticdotventures marked this pull request as ready for review October 15, 2026 11:27
@elasticdotventures
elasticdotventures merged commit 7892a36 into main Oct 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant