{"full_name":"OpenSPG/KAG","owner":"OpenSPG","name":"KAG","shard":"1","url":"https://github.com/OpenSPG/KAG","description":"KAG is a logical form-guided reasoning and retrieval framework based on OpenSPG engine and LLMs.  It is used to build logical reasoning and factual Q&A solutions for professional domain knowledge bases. It can effectively overcome the shortcomings of the traditional RAG vector similarity calculation model.","homepage":"https://spg.openkg.cn/en-US","topics":["knowledge-graph","large-language-model","logical-reasoning","multi-hop-question-answering","trustfulness"],"tag_pages":["knowledge-graph","large-language-model"],"language":"Python","license":"Apache-2.0","avatar":"https://avatars.githubusercontent.com/u/148738724?v=4","created_at":"2024-09-21T13:56:44Z","pushed_at":"2026-01-28T13:30:54Z","metrics":{"stars":9173,"forks":722,"watchers":75,"issues":456,"prs":275,"releases":6,"issues_open":164,"issues_closed":292,"prs_open":10,"prs_closed":34,"prs_merged":231,"discussions":24},"growth":{"day":{"stars":0,"forks":0,"base_day":"2026-11-15"}},"history":{"dates":["2026-11-10","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[9163,9164,9167,9169,9170,9173,9173],"forks":[719,719,720,720,721,722,722],"watchers":[null,75,75,75,75,75,75],"issues_open":[null,164,164,164,164,164,164],"prs_open":[null,10,10,10,10,10,10]},"boards":{},"same_owner":[],"issues":[{"number":493,"title":"感觉更新到0.7版本抽取的效果变差很多，有没有大佬也碰到这个问题呀","comments":27,"created_at":"2025-04-25T02:30:47Z"},{"number":572,"title":"ollama","comments":18,"created_at":"2025-06-07T00:02:43Z"},{"number":634,"title":"开发者模式新建知识库，再产品模型应用里，用这个知识库没效果","comments":14,"created_at":"2025-07-07T07:09:32Z"},{"number":627,"title":"[Bug] [Module Name] 在前端配置嵌入模型时报错","comments":14,"created_at":"2025-07-02T07:56:31Z"},{"number":523,"title":"unknown error <class 'RuntimeError'>:invalid vectorizer config:object of type 'NoneType' has no len()","comments":14,"created_at":"2025-05-07T10:02:10Z"},{"number":565,"title":"0.7.1版本构建完知识库，使用自己部署的vllm Qwen3模型进行问答，检索知识库检索不出来chunk","comments":12,"created_at":"2025-05-29T09:09:52Z"},{"number":614,"title":"[Bug] [Module Name] 项目创建失败","comments":10,"created_at":"2025-06-29T09:27:05Z"},{"number":513,"title":"Current UI and Documentation is not matching","comments":9,"created_at":"2025-05-04T11:44:23Z"}],"discussions":[{"number":744,"title":"图谱抽取","comments":0,"category":"General","created_at":"2026-04-09T08:03:55Z"},{"number":697,"title":"How to start the MCPServer in KAG","comments":0,"category":"Q&A","created_at":"2025-09-09T04:58:11Z"},{"number":672,"title":"0.8.0版本，无法配置ollama模型","comments":1,"category":"Q&A","created_at":"2025-08-03T12:51:47Z"},{"number":671,"title":"无法配置LLM模型","comments":1,"category":"General","created_at":"2025-08-02T11:02:20Z"},{"number":649,"title":"昇腾适配","comments":0,"category":"Q&A","created_at":"2025-07-16T12:52:24Z"},{"number":576,"title":"无法连接到no4j，新安装的，no4j正常启动了，但是生成答案的时候提示无法连接到no4j","comments":1,"category":"Q&A","created_at":"2025-06-09T18:00:44Z"},{"number":474,"title":"not support ollama chat model  can  and api llm reach the spg","comments":0,"category":"Q&A","created_at":"2025-04-22T10:15:51Z"},{"number":466,"title":"not support ollama local  embedding model ?","comments":0,"category":"Q&A","created_at":"2025-04-21T03:20:10Z"}],"latest_release":{"name":"Version 0.8.0","tag":"v0.8.0","published_at":"2025-06-28T04:45:59Z","body":"# Version 0.8.0 (2025-06-27)\r\n##  1、Overview\r\nWe are excited to announce the official release of KAG version 0.8. This update focuses on continuously enhancing the consistency, rigor, and accuracy of large model knowledge base-driven reasoning and question-answering. It also introduces several significant new features and capabilities.\r\nFirst, we have upgraded the capabilities of the KAG knowledge base. We have expanded support for two modes: private domain knowledge bases (including structured and unstructured data) and public domain knowledge bases. This includes the ability to integrate public web data sources such as LBS and WebSearch via the MCP protocol. Additionally, we have improved the management of private domain knowledge base indexing, incorporating multiple foundational index types such as Outline, Summary, KnowledgeUnit, AtomicQuery, Chunk, and Table. This supports developers in customizing indexes and synchronizing them with product interfaces. Users can select the most appropriate index type based on their specific scenarios, achieving a balance between construction costs and business outcomes.\r\nSecond, we have optimized the product experience and refined the system integration interfaces. On the product front, we have decoupled the knowledge base from applications. The knowledge base now manages private domain data (both structured and unstructured) and public domain data, while applications can link to multiple knowledge bases. Based on the index types used during knowledge base construction, the system automatically adapts the corresponding retrieval engine to recall data. Both applications and knowledge bases independently manage model dependencies and task scheduling, enhancing flexibility.\r\nIn terms of system integration, we have refined the KAG recall and Q&A interfaces, adding support for embedding reasoning and Q&A pages within business applications. We have fully embraced the MCP protocol, enabling seamless integration of KAG reasoning and Q&A into agent workflows (based on the MCP protocol).\r\nThird, KAG has successfully adapted to the KAG-Thinker model. Through optimizations such as broad decomposition and deep solving of complex problems, knowledge boundary determination, and noise-resistant retrieval results, the stability of the KAG framework's reasoning paradigm and the rigor of its reasoning logic have been significantly improved under the guidance of iterative thinking paradigms. Further details on the release and usage of the KAG-Thinker model will be provided in our upcoming announcements.\r\nIn addition to the aforementioned framework and product optimizations, we have also enhanced Q&A efficiency and the stability of streaming outputs. This update is based on the Qwen2.5-72B foundation model and has achieved performance alignment across various RAG frameworks and selected KG datasets. The overall benchmark results of this release are illustrated in Figures 1~3, with detailed metrics available in the open_benchmark section.\r\n## 2、Framework Enhancements\r\n### 2.1、Configurable Index Management\r\nIndex extraction and retrieval are core capabilities of knowledge base applications. KAG v0.8 has upgraded its architecture to support configurable management of index construction and retrieval. Each index type is equipped with its own extractor (Extractor) and retriever (Retriever), managed through the IndexManager.\r\nKAG comes with built-in foundational index types such as KnowledgeUnit (an enhanced version of graph triples), Outline, Summary, Chunk, AtomicQuery, and Table, along with their corresponding extractors and retrievers. During the knowledge base construction phase, the platform invokes the appropriate extractor based on the index types selected by the user to perform index extraction. In the application phase, based on the knowledge bases associated with the application, the platform automatically calls the corresponding retriever to complete the recall of graph/chunk/doc data and integrates w","is_prerelease":false},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}