Graph RAG Implementation

Aim here is to show how RAG (Retreival Augmented Generation) works. I have enhanced RAG further by implementing Graph RAG .

RAG = Retrieval-Augmented Generation
You ask a question → it searches documents → finds the most relevant chunks → feeds them into the LLM → LLM gives you an answer.

But RAG is flat — it treats chunks like a list. There’s no understanding of how ideas connect.

Graph RAG adds structure and relationships to the mix.

Think of it like this:

  • Instead of just having a bunch of pages (like in regular RAG),
  • You build a map ?️ where concepts are connected like cities with roads.
  • This map is called a knowledge graph.

Now when you ask a question, Graph RAG:

  1. Finds nodes (concepts) in the graph that relate to your question.
  2. Gathers context-rich information from the graph.
  3. Follows edges (connections) to explore related ideas.
  4. Sends that to the LLM to generate a deeper, smarter answer.

Knowledge Graph Generated by LLM for Abraham Lincoln Resume

Scroll to Top