ALLMAcademy

D3

Semantic RAG, Hybrid Retrieval, and GraphRAG

15 min2 optional deep dives

Choose a retrieval structure from the question you need to answer, not from whichever RAG label is fashionable.

  1. 01Distinguish semantic vector retrieval, hybrid retrieval, and GraphRAG
  2. 02Choose local or global graph search based on the question shape
  3. 03Account for GraphRAG indexing, freshness, and query cost before adopting it

Three retrieval shapes

RAG
  • Semantic RAG embeds the query and text chunks, then retrieves nearby vectors. It is good at paraphrase and topical similarity.
  • Hybrid RAG combines semantic retrieval with lexical search such as BM25, then fuses and reranks the candidates. It is the strongest general default.
  • GraphRAG extracts entities and relationships, then builds communities and summaries before query time. Tuned claim extraction is optional and off by default. It is useful when the answer depends on connections or corpus-wide structure.

Start with the question shape

Question shapeBest starting point
Paraphrased fact lookupSemantic vector retrieval
IDs, names, and natural language togetherHybrid retrieval
How is entity A connected to entity B?GraphRAG local search
What themes span the whole corpus?GraphRAG global search

Common MisconceptionGraphRAG is a better vector database.

CorrectionGraphRAG is an indexing and query pipeline that creates a knowledge graph, community hierarchy, and summaries. It may still use vectors, but the graph structure is the point.

What GraphRAG builds

Baseline RAG chunks text and embeds the chunks. GraphRAG adds an offline pipeline:

  1. extract entities and relationships from the text units, with optional tuned claim extraction,
  2. cluster the graph into communities,
  3. summarize those communities at several levels,
  4. keep links back to source text for evidence,
  5. retrieve graph and text context using the query mode that fits the question.

That extra structure is not free. Indexing uses model calls, graph processing, storage, and a freshness strategy. If documents change frequently, update cost can dominate the value.

Deep dive: Local, global, DRIFT, and basic search
  • Local search starts from entities related to the query, expands through neighbors, and mixes graph facts with source chunks.
  • Global search map-reduces community reports to answer questions about themes across the whole dataset.
  • DRIFT search begins broadly with community information, then follows local questions for more detail.
  • Basic search is ordinary top-k vector retrieval and remains the cheaper answer for ordinary fact lookup.

Production failure modes

  • Using pure semantic search for exact IDs and silently missing the literal match.
  • Building GraphRAG before proving that relationship-heavy or corpus-wide questions matter.
  • Letting entity extraction errors become confident graph edges with no source trace.
  • Rebuilding an expensive graph index on every small document update.
  • Returning a graph summary without preserving citations to the original text units.
References & deeper reading (4)

Retrieval Practice

Check one idea at a time

Question 1 of 3

A support query contains an exact error code plus a natural-language description. Which first-stage retrieval is the strongest default?