xVector · Open source · arXiv:2609.00387

The ties no sentence states.

A language model asked to build a knowledge graph asserts only what a sentence says. Three paragraphs about one family can produce two disconnected components, because no single sentence names the tie between them. xVector adds a purely additive second pass that recovers those ties without touching what the extractor found.

How the second pass works

For a chunk pair with cosine similarity cos, the distance is d = 1 − cos. An entity pair's weight sums over all the chunk pairs it appears in:

w = 1 / (ε + d),   v = (1 + cos) / 2,   ε = 10⁻⁶

weight = Σ w·v / Σ w   ∈ (0, 1]

Because only the two sums Σ w·v and Σ w are stored per pair, a new batch of documents just adds to them. The final weight is the same whatever order the documents arrive in.

Two layers of edges

The graph is a multigraph with two kinds of edges, because something stated and something inferred are different facts:

LayerWhere it comes fromWeight
Relation edgesRelations the LLM extracts and folds to a closed vocabulary: WORKS_AT, FOUNDED, LEADS, MEMBER_OF, LOCATED_IN, OWNS, and others.1.0, since the text asserts them
Similarity edges (EMBEDDED)The kNN and inverse-distance pass above. These connect entities that no sentence relates.The inverse-distance score, in (0, 1]

The same pair of entities can carry both. Entities are typed as People, Business, Organization, Facility or Location, and merged across documents by their name variants. People merge on surname and given initial, and businesses on their core name without suffixes like "Inc.", so each real entity becomes one node with its variants kept as aliases.

Building a graph over time

Recreate builds a graph from a first batch of documents. Append adds new batches later: new entities merge with existing ones by blocking key, and edge weights keep accumulating. Before anything is written, the app shows the generated DDL and upsert SQL so every statement can be reviewed and edited.

Extraction runs on Claude or Gemini, or offline with a deterministic built-in embedder and a heuristic extractor. Embeddings can come from any OpenAI-compatible endpoint or from a local Ollama model.

Run it yourself

The code is on GitHub: github.com/karametebkaan/xVector. The app is one HTML file plus a small Python server that uses only the standard library, so there is nothing to install.

git clone https://github.com/karametebkaan/xVector && cd xVector
python3 scripts/serve.py          # then open http://localhost:8181
  1. Set Instance URL to /kinetica. The server proxies it to a Kinetica instance on http://localhost:9191; point it elsewhere with --kinetica http://host:9191, or serve on another port with --port.
  2. Paste paragraphs (blank lines separate documents). samples/kinetica-notes.txt is a good first run.
  3. Generate embeddings, then Store them and build the graph. In Append mode, later batches merge into the same graph.

What you need: Python 3. Kinetica is needed for the Store and Search steps; without it, Copy SQL gives you the whole script to run elsewhere. Optional: Ollama for local embeddings, and Google Cloud credentials (Vertex AI) for Claude or Gemini extraction. The built-in embedder and extractor also work fully offline. Setup details are in SETUP.md.

Companion module: xMatch

The repository also includes xmatch/, a separate identity-resolution module. It merges sparse name, email and phone records into golden records: DuckDB blocks the candidate pairs, fuzzy similarity scores them, and FalkorDB (GraphBLAS) resolves identities with connected components and multi-layer PageRank.

cd xmatch
docker run -p 6379:6379 falkordb/falkordb:latest   # FalkorDB for the graph steps
./setup.sh                                        # Python environment + UI packages
./run.sh                                          # end-to-end demo in the terminal
./start_ui.sh                                     # interactive UI on http://localhost:5173

Read more

B. K. Karamete, H. Casten. Hidden relationships in a document-derived property graph: top-k chunk embeddings and inverse-distance weighting over a dynamically evolving ontology. arXiv:2609.00387, 2026.

The full setup, the table schemas and the developer notes are in the README on GitHub.