graphlife Docs graphlife.app

Graph data

9. Semantic (vector) search

There is no HTTP route for vector search and none for managing the index. When enabled, the vector index works behind the context and ask operations: passages and nodes that are semantically close to the question are added to the retrieved context, alongside the label search.

The index is off by default. It is built for a graph only when both of the following are true:

  1. The operator has configured an embedding provider through environment variables.
  2. The graph's owner has turned server-side AI on for the graph (serverAi).
Environment variable Default Description
EMBED_PROVIDER unset (off) voyage or openai. Any other value leaves vectors off.
EMBED_API_KEY — Required unless EMBED_BASE_URL points at the local machine.
EMBED_BASE_URL the provider's public API Use to point at a compatible endpoint, including one on the same host.
EMBED_MODEL the provider's default text model Embedding model.
EMBED_DIM 1024 Vector dimension.
EMBED_MIN_SCORE 0.35 Minimum similarity for a hit to be used.
VECTOR_CACHE_MB 512 Memory allowed for loaded indexes.
RERANK_PROVIDER unset (off) voyage or cohere. Turns on a reranking model that reorders what the index found. Used only together with an embedding provider.
RERANK_API_KEY — Required unless RERANK_BASE_URL points at the local machine.
RERANK_BASE_URL the provider's public API Use to point at a compatible endpoint, including one on the same host.
RERANK_MODEL the provider's default reranking model Reranking model.
RERANK_CANDIDATES 50 How many index hits are passed to the reranking model (1 to 1,000).

Enabling it sends the text of the graph (node labels, properties and prose) to the embedding provider, and the question and candidate passages to the reranking provider when one is set, unless the base URLs point at endpoints you run yourself. The index is updated in the background a few seconds after each write, is rebuilt as needed when the server starts, and is deleted when server-side AI is turned off for the graph or the graph is removed. GET /health reports whether semantic search is on under vectors: false, or an object describing the configuration (including its provider and vector dimension dim), with a rerank object when a reranking model is configured.

There is no route that reports whether a graph's index is up to date, and none that returns similarity scores or raw vector matches.