Common Core Ontologies
Home/Blog/AWS Labs open-sources graphrag-toolkit for graph-enhanced RAG
NEWS

AWS Labs open-sources graphrag-toolkit for graph-enhanced RAG

AWS Labs open-sources graphrag-toolkit for graph-enhanced RAG

AWS Labs has open-sourced graphrag-toolkit, an Apache-2.0 licensed Python toolkit for building graph-enhanced generative AI applications, with coverage of the release published by KDnuggets on November 12, 2026. The toolkit targets a specific failure mode of plain retrieval-augmented generation: questions that require connecting facts spread across multiple documents, which a flat vector index cannot reliably surface because it only finds text that sounds similar to the query.

A hierarchical graph, not a flat index

The toolkit's core component, lexical-graph, automatically builds a hierarchical knowledge graph from unstructured documents across six connected levels: source, chunk, topic, statement, fact, and entity, according to the project's GitHub repository. Retrieval then works by traversal rather than lookup: a query is anchored through vector similarity first, and the system follows graph connections outward from that anchor to pull in thematically related content a single similarity search would miss. The extraction pipeline runs two separate LLM calls per chunk, first cleaning propositions and then extracting entities and relationships, a split intended to improve the quality of what ends up in the graph.

BYOKG-RAG for teams with an existing graph

Organizations that already maintain a knowledge graph do not need to extract and rebuild one from scratch to use the toolkit. A second component, BYOKG-RAG, provides a question-answering layer that combines large language models with a graph a team brings in as-is, aimed at complex question answering over structured data that already exists inside the organization. The toolkit supports Neo4j and FalkorDB as graph stores, and PostgreSQL with pgvector, Amazon OpenSearch Serverless, and Amazon Neptune as vector stores, so the graph layer can sit on infrastructure a company has already standardized on rather than forcing a new stack. Deloitte is reported to run a production deployment on Neptune-based infrastructure.

Discovered structure versus a specified ontology

Lexical-graph's six-level structure is discovered automatically from each document set, which means two different corpora processed through the same pipeline will produce graphs with different internal vocabularies for the same real-world concept. That is a reasonable trade-off for a single retrieval pipeline working inside one project, where consistency only needs to hold within that graph. It becomes a harder problem the moment two independently built graph-RAG deployments, or a graph-RAG layer and an existing structured database, need to agree that "customer," "incident," or "shipment" refers to the same committed thing. A mid-level ontology like CCO takes the opposite approach: categories and relations are specified and logically axiomatized in advance, and extend a shared top-level ontology (BFO) precisely so that systems built independently, at different times, by different teams, stay interoperable by construction rather than by post-hoc reconciliation.

Where this intersects enterprise data integration

Standing up a tool like graphrag-toolkit against a real, bounded document set is usually the easy part; the harder part is wiring that retrieval layer into the systems of record the organization already runs, so an agent's answers can be checked against current data rather than a point-in-time export. That connective work, mapping a new retrieval layer onto existing databases, APIs, and access controls without breaking what already runs in production, is exactly the kind of problem a focused custom software development engagement is built to solve: scoping the integration narrowly, proving it against one real workflow, and only then extending it across the rest of the organization's data estate.

What to watch

The project's release notes show active iteration on the extraction pipeline and dependency updates through late October, with KDnuggets' write-up following in the days after. The detail worth tracking as adoption grows is whether a graph whose structure is rediscovered per corpus stays consistent enough, across many documents ingested over time, for an organization to trust it the way it trusts a database with an explicit schema.