KAG is an open-source framework for knowledge-augmented generation: it upgrades retrieval-augmented generation with logical-form-guided reasoning over a knowledge graph, so LLM applications can answer professional-domain questions more faithfully. Built on the OpenSPG engine from Ant Group’s knowledge-graph team, it has earned more than 9,100 stars on GitHub under the Apache-2.0 license.
Classic RAG retrieves text chunks by vector similarity, which often misses multi-hop facts and produces plausible but wrong answers in expert domains. KAG combines a knowledge-graph index with text chunks, translates questions into logical forms that execute against the graph, and lets the LLM reason over verified intermediate results. The framework targets domains such as government services, healthcare and finance, where answers must be both factual and explainable, and it ships with pipelines for building the underlying knowledge base from raw documents. In benchmarks published by the project, this knowledge-driven approach answers professional questions noticeably more accurately than conventional vector RAG baselines, because the logical form forces the system to fetch the precise facts a question depends on instead of the passages that merely sound similar to it.
KAG is free and open source under the Apache-2.0 license. You provide your own LLM access and infrastructure for the knowledge base.
KAG is part of the broader OpenSPG ecosystem from Ant Group, whose knowledge-graph engine also underpins enterprise knowledge-base work, so the framework benefits from โ and feeds back into โ production knowledge-graph practice rather than being a one-off research prototype.
It is for teams building domain-expert Q&A systems โ in government, medicine, finance and similar fields โ where vector-only RAG is not accurate or auditable enough.