Graph index

Compass

An index of entities and the relationships between them, held alongside the vector index for questions that depend on how things connect.

What is a graph index?

A graph index stores the entities found in a body of material, such as people, products, policies and teams, together with the relationships that link them. It is usually held alongside a vector index over the same content. The vector index finds passages that resemble a question, while the graph index answers questions about how named things relate to each other across many documents.

Also called: Knowledge graph index

Why similarity alone misses questions about relationships

A question such as who owns the policy that governs a given process has no single passage that answers it. The ownership is recorded on one page and the process on another, with the link between them held somewhere else again. Vector retrieval returns whichever passage reads most like the question, and the model fills the remaining gap by guessing. A graph index makes the connection explicit, so the system can follow it and cite each link it relied on.

  • Relationship questions are common in enterprise work and rare in public benchmarks.
  • The answer often depends on documents that share no wording with the question.
  • An explicit edge can be cited, where an inferred connection cannot.
  • Access permissions can be applied to entities and edges as well as to passages.

How a graph index works

  • Entities and relationships are extracted from each document during ingestion.
  • Duplicate entities are resolved into a single node with every source recorded.
  • Each edge carries the document and passage it was drawn from.
  • Nodes and edges inherit the access permissions of their source documents.
  • At query time, entities named in the question become starting points in the graph.
  • Connected passages are returned to the answer step together with the path taken.

How a graph index is evaluated

A graph index is evaluated on whether it supplies connections the vector index alone would miss. Compare the two on a set of relationship questions:

  • share of relationship questions answered correctly with and without the graph
  • precision of extracted relationships against a manually checked sample
  • rate of duplicate entities left unresolved
  • proportion of edges that cite a valid source passage
  • latency added by graph lookups per question

Limitations, risks and common failure modes

  • Extraction errors create confident edges between things that are unrelated.
  • Entities are duplicated under different names and the graph splits in two.
  • The graph is updated less often than the documents it was drawn from.
  • Permissions are applied to passages but not to the edges derived from them.

All 315 terms