About this project

KAG (Knowledge Augmented Generation) is a framework built on the OpenSPG engine and large language models, aimed at logical reasoning and factual question answering over vertical-domain knowledge bases. It is positioned as an alternative to conventional vector-similarity RAG and to OpenIE-based GraphRAG, addressing ambiguity in similarity retrieval and noise introduced by open information extraction. Core ideas described in the README: - Knowledge representation: references the DIKW hierarchy to upgrade SPG representation for LLM friendliness. It handles unstructured data (news, events, logs, books), structured data (transactions, statistics, approvals) and expert rules, using layout analysis, knowledge extraction, property normalization and semantic alignment to build a unified business knowledge graph. It supports both schema-free extraction and schema-constrained expert construction on the same knowledge types, plus mutual indexing between graph structure and original text chunks. - Logical-form-guided hybrid reasoning: a solver with planning, reasoning and retrieval operators converts natural-language questions into combined language-and-symbol solving processes. Steps can use exact-match retrieval, text retrieval, numerical calculation or semantic reasoning, integrating retrieval, KG reasoning, language reasoning and numerical computation. Architecture: kg-builder (knowledge representation and construction) and kg-solver (hybrid solving/reasoning engine); a kag-model component is stated as planned for future open-source release. Recent release notes mention version 0.8.0 (2025.06.27) with private and public-network knowledge base modes, MCP protocol integration for LBS/WebSearch data sources and agent workflows, built-in index types (Outline, Summary, KnowledgeUnit, AtomicQuery, Chunk, Table), decoupling of knowledge bases from applications, and KAG-Thinker model adaptation. Version 0.7 (2025.04.17) refactored the KAG-Solver with static and iterative planning modes, added simple and deep-reasoning modes, streaming output, graph index rendering, an open_benchmark directory, and a lightweight build mode. Earlier updates added domain schema customization, QFS tasks, visual query analysis, Word document upload and concurrency settings; initial release was 2024.10.25. Deployment: a product mode uses Docker Compose with a provided compose file and a web UI at port 8887 with default credentials; a toolkit mode installs via pip from the cloned repository for Python 3.10+ on macOS, Linux or Windows. Documentation is hosted on Yuque, with community support via Discord and WeChat. The project is Apache-2.0 licensed and cites an arXiv paper (2409.13731).