arXiv:2609.00387cs.CEAug 2026

Manuscript Offprint

arXiv:2609.00387

Hidden relationships in a document-derived property graph: top-k chunk embeddings and inverse-distance weighting over a dynamically evolving ontology

Bilge Kaan Karamete, Hunter Casten

Abstract

A large language model asked to build a knowledge graph from text will assert only what a sentence states. Over a corpus, that faithfulness is also the method's ceiling: three paragraphs about one family can produce two disconnected components, because no single sentence ever names the tie between them. This article describes a purely additive second pass that recovers those ties without touching what the extractor found. Each document is split into paragraph chunks and embedded once. A top-kk nearest-neighbour query — originating only in the new document's chunks, but searching every chunk in the graph — yields chunk pairs, which expand through a chunk-to-entity membership map into candidate node pairs. Each pair is then scored by Shepard inverse-distance weighting over every chunk pair its endpoints co-occur in. Because the vectors are L2L_2-normalised at write, ∥a−b∥2=2(1−cos⁡)\|a-b\|^2 = 2(1-\cos), which makes the weight w=1/(ε+1−cos⁡)w = 1/(\varepsilon + 1 - \cos) exactly Shepard's inverse-squared distance and the value term a rescaled chord distance, v=1−∥a−b∥/2v = 1 - \|a-b\|/2. We show that the affine alternative v=(1+cos⁡)/2v = (1+\cos)/2 is unusable behind a kk-NN gate — the gate alone confines it to a band of width β/2\beta/2, silently disabling the write threshold — and we derive the resulting constraint θ>1−β/2\theta > 1 - \sqrt{\beta/2}. The per-pair accumulators (∑wv,∑w\sum wv, \sum w, support) form a commutative monoid and are persisted un-gated, so the pass is order-independent, needs no recomputation as the corpus grows, and lets a node pair that misses the threshold today cross it after the next document arrives. The implementation is engine-neutral: the same weighted EMBEDDED edges go into FalkorDB, Kinetica, ArangoDB or Neo4j through one adapter contract. We report the measurements that shaped the design — 768-dimensional embeddings agreeing with a 3072-dimensional reference on 92% of edges and 240-dimensional on 72% at under a thirteenth of the storage, and a top-kk formulation 25×25\times faster than the window-function form — and we are explicit about what is not measured: precision and recall against a labelled set of hidden relationships, for which no ground truth exists in this corpus.

Keywords: knowledge graph construction; property graph; link prediction; inverse distance weighting; text embeddings; kk-nearest neighbours; incremental ontology; large language models.

1 Introduction

Building a property graph from unstructured text is now a routine application of large language models: a document is split into passages, each passage is handed to a model under a constrained output schema, and the entities and relations it returns are folded into a canonical ontology and written into a graph engine. The method's great virtue is that it is faithful — every edge it

*Corresponding author: bkaramete@babelstreet.com

Figure

Figure 1: The running example. Three paragraphs, embedded at 240 dimensions and extracted independently, yield a correct but disconnected graph: four stated edges, two components. Nothing in the text ties Gulgun to Tan or FSI to BabelStreet. The colour strips below each paragraph are its embedding, mean-pooled to 64 buckets for display (Section 7).

produces corresponds to something a sentence actually said, and a well-prompted extractor will refuse to invent the rest.

That virtue is also its ceiling. Consider the three short paragraphs in Figure 1, drawn from the running example used throughout this article. They concern one family. A structural extractor reads them correctly and produces four edges — Gulgun → FSI, Kaan → BabelStreet, Tan → Bloomberg, Tan → Kaan — and every one of them is a sentence someone wrote. It nonetheless leaves two disconnected components, because no sentence in the corpus ever states the tie between Gulgun and Tan, or between FSI and BabelStreet. The information that these paragraphs belong together is present in the corpus; it is simply not present in any one sentence, and so it is invisible to a method that only transcribes sentences.

The obvious repair is to add edges the text did not state, and the obvious danger is that such edges are no longer facts. Our position is that the two can be reconciled by keeping the derived layer strictly separate and strictly additive: it writes exactly one new edge label, EMBEDDED, carrying a numeric weight and a support count; it can never modify or delete anything extraction produced; and it is hidden from the natural-language query path, so that a cosine artefact is never reported to a user as an extracted fact.

References (34)