Skip to content

Graph-Enhanced Vector Search

Alternative Names

  • Graph + Vector
  • Augmented Vector Search

Required Graph Shape

Lexical Graph with Extracted Entities

Description

The user question is embedded using the same embedder that has been used before to create embeddings. A vector similarity search is executed on the Chunk embeddings to find k (number previously configured by developer / user) most similar Chunks. A traversal starting at the found chunks is executed to retrieve more context.

Usage

This pattern is useful for retrieving more enriched context than the results of executing only a vector search as in e.g. Basic Retrievers or Parent-Child Retrievers. The additional traversal retrieves the interaction of entities within the provided data which reveals much richer information than the retrieval of specific text chunks. Naturally, the preprocessing for this GraphRAG pattern is much more tedious and expensive. Furthermore, the amount of context that is returned by the Graph Traversal might be too much to handle for an LLM.

Further reading

Existing Implementations

Example Implementations