AI Briefing
KO

Indexing Knowledge Graphs with the GraphRAG Toolkit

·2026.05.07 10:04

Key point

The GraphRAG Toolkit builds a knowledge graph and vector index by extracting sentences, entities, and facts from documents.

1 / 2

Details

The GraphRAG Toolkit constructs a Lexical Graph to address the limitations of vector-similarity-centric retrieval in existing RAG. The core context unit is not the chunk but the Statement, and the focus is on more precisely gathering the set of relevant statements needed for a question.

The graph is divided into three layers: Lineage, Summarization, and Entity-relationship. Source and Chunk maintain traceability to the original document, Topic and Fact separate local and global connectivity, and Entity and Relation capture domain meaning. Since excessive connections blur context and insufficient connections miss important relationships, the key design goal is balancing connectivity and sophistication.

Indexing proceeds in two stages: Extract and Build.

  • Extract: Documents are loaded with LlamaIndex Reader, split into chunks using MarkdownNodeParser or SentenceSplitter, and for each chunk, two LLM calls extract Propositions and Topic·Entity·Fact.
  • Build: The extraction results are reflected in the graph store and vector store to create a searchable index.
  • Options: You can choose integrated execution, separate execution, or Amazon Bedrock batch inference for large-scale data.

Extraction results are stored as aws::graph::propositions and aws::graph::topics metadata, and the pipeline is composed by combining LexicalGraphIndex, GraphStoreFactory, VectorStoreFactory, and FileBasedDocs. Once the build is complete, Notebook visualization lets you check the relationships among Source, Chunk, Topic, Entity, Fact, and Statement, and even expand the inferred schema.

At the query stage, answers are found not through simple keyword matching but through Traversal-based search. In the example, differences between the r7i and r8g instance families are traced through connections in product specifications, generational differences, and performance metrics, and you can follow along hands-on with the Indexing notebook in the GitHub Workshop.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.