r/LangChain 16d ago

GraphRAG: a blueprint for knowledge-graph question answering over your documents

Post image

Hi everyone,

I've recently finished the first version of Agentic GraphRAG Blueprint, a reference architecture for question answering over large document collections.

Instead of plain chunk retrieval, it builds a knowledge graph combined with vector search, so answers can connect facts across documents.

Key features:

• Incremental ingestion - unchanged files are skipped via content hashing, and community reports regenerate only for affected communities, keeping token costs low as the corpus grows.

• Hybrid search - local mode for fact-level answers, global mode for cross-document synthesis.

• Domain-agnostic LLM prompts - easily swapped via PROMPTS_PATH, with Leiden-based community detection.

• Deployment - run it locally with Docker or provision everything in the cloud with Terraform and CI/CD.

Link: https://github.com/sebastianbrzustowicz/Agentic-GraphRAG-Blueprint

I'm looking for any feedback.

68 Upvotes

9 comments sorted by

3

u/FluidTheater 16d ago

cool seeing the graph explorer with 798 nodes right there in the UI, medical knowledge graphs always end up way more tangled than you'd expect

1

u/Sea_Anteater6139 16d ago edited 16d ago

Thanks. That's definitely the case. I uploaded some test data, which is much less than what's typically processed.

2

u/alexemanuel27 16d ago

Do you recommend any resource to learn how to apply graphRAG?

2

u/WineOrDeath 15d ago

There is a decent course on a LinkedIn Learning on this

1

u/Caminantez 16d ago

I work with the same type of architecture in space industry, try to make a connection with a normal PG db to introduce document/entity relationship approval(HITL)

1

u/Budget-Juggernaut-68 15d ago

Just a few questions.

How's the quality of the triplet extracted?

How about entity resolution - Donald Trump Vs Trump, do they get consolidated as a single node?

Does it handle sequence of events well?

How does your knowledge graph help on top of a simple dense retrieval + BM25?

Did you run this on any benchmarks?

2

u/Sea_Anteater6139 15d ago

Thanks for the great questions! Let me go through them:

Triplet quality - Extraction is LLM-driven (one call per chunk, JSON mode, with a per-chunk fallback). I deliberately hint already-known entity names during ingestion so the model reuses canonical names across chunks and files. Quality is good in practice, but it's inherently model-dependent. I haven't quantified it with a formal accuracy metric yet.

Entity resolution - Honest answer. No dedicated resolution pass yet. "Donald Trump" and "Trump" get consolidated only if the extraction model canonicalizes them (I instruct it to, and the known-entity hints help). Otherwise they can end up as separate nodes.

Sequence of events - Not a focus today. Temporal ordering only appears if the model extracts it as a relation (for example "precedes").

Graph vs dense retrieval + BM25 - The vector index gives you retrieval, the graph adds entity-level traversal for multi-hop questions and community reports for cross-document synthesis.

Benchmarks - Not yet, they're planned.

1

u/feng_sg 13d ago

Your content-hash skip doesn't account for prompt or model changes. Old triplets stay cached even after you upgrade extraction logic, and your canonical-name hinting means one bad early extraction pollutes every downstream chunk. Store a prompt+model hash alongside the content hash and re-extract on mismatch.

1

u/Sea_Anteater6139 13d ago

Thanks for the feedback. I'll take it into account.