Skip to content
yadidiah.k
← Selected work

spec · graphrag-hierarchical-chat · prototype · 2026

GraphRAG Hierarchical Chat

Graph-structured retrieval over long, cross-referenced document sets

Role
Sole engineer
Domain
RAG / Retrieval
Year
2026
Status
prototype
stack →PythonLangGraphNeo4j / graph storeEmbeddingsFastAPI

no interface capture on record

Source ↗

A retrieval layer that builds a hierarchy of entity and summary nodes over a corpus, so a query can walk from broad context down to specific passages instead of relying on flat top-k similarity.

01 · Problem

Flat vector search collapses on long documents that cross-reference each other: the chunks that answer a question are often not the chunks most similar to it, and top-k retrieval has no notion of 'zoom level'.

02 · Approach

  1. 01Extract entities and relationships per chunk, then cluster into a multi-level graph — leaf chunks, mid-level summaries, corpus-level themes.
  2. 02Route a query first against summary nodes to pick a subgraph, then expand along edges to gather the leaf chunks that actually ground the answer.
  3. 03Validate every generated claim against its cited node before returning; unsupported spans are dropped.
  4. 04Provider-agnostic interfaces for the embedding model and graph store so the pipeline is not tied to one vendor.

03 · Outcome

  • Answers on multi-hop questions stay grounded where flat RAG hallucinated the connective tissue.
  • Retrieval traces are inspectable — you can see which node the model walked to and why.
NextPneumoScan AI →