Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Knowledge graph

Definition

A structured representation of entities and the relationships between them, sometimes used alongside vector search to improve retrieval.

In more detail

Graph-based RAG approaches extract entities and relations from documents so questions that span many documents, or ask about connections, can be answered. Building and maintaining the graph adds significant work.

A knowledge graph stores facts as nodes and edges: "Acme Ltd" (company) -> "supplies" -> "Widget X" (product). A question such as "which suppliers of Widget X also had late deliveries last quarter?" needs several hops across documents, which plain vector search handles poorly because no single chunk holds the answer.

Most teams should start with ordinary retrieval and add a graph only when evals show multi-hop questions failing. The graph has to be kept in sync with its sources, and entity extraction by a model makes mistakes that then look like facts.

  • GraphRAG

    Retrieval-augmented generation that uses a knowledge graph of entities and relationships to connect related facts across many documents.

  • Hybrid search

    Combining keyword search, such as BM25, with vector search and merging the results into one ranking, often with reciprocal rank fusion.

  • Retrieval-augmented generation (RAG)

    Retrieving relevant documents and adding them to the prompt before the model generates an answer from them.

  • Vector database

    A database designed to store embeddings and quickly find the nearest neighbours to a query vector, often with metadata filtering.