openspg/kag

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...

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 56 minutes ago
Added to GitGenius on September 7th, 2026
Created on September 21st, 2024
Open Issues & Pull Requests: 172 (+0)
GitHub issues: Enabled
Number of forks: 717
Total Stargazers: 9,041 (+0)
Total Subscribers: 80 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 16.2 hours
Mean response time: 12.1 days
90th percentile: 28.8 days
Tracked items: 409

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 98% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 5% of issues opened in the past year have been closed. Three people close 72% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 163
New in 7 days: 0
Closed in 7 days: 2
Avg open age: 418 days
Stale 30+ days: 153
Stale 90+ days: 153

Recent activity

Opened in 7 days: 0
Closed in 7 days: 2
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • FeatureRequest (2)

Detailed Description

KAG is a logical form-guided reasoning and retrieval framework that combines knowledge graphs with large language models to build question-answering and reasoning systems for professional domain knowledge bases.

The framework addresses limitations in traditional retrieval-augmented generation by moving beyond vector similarity matching to incorporate logical reasoning over structured knowledge. It uses the OpenSPG engine to construct domain-specific knowledge graphs from unstructured text, structured data, and expert knowledge, then applies logical form-guided retrieval to answer multi-hop questions and perform factual reasoning. This approach reduces noise from open information extraction and ambiguity from pure vector similarity by grounding retrieval in explicit logical relationships and schema constraints.

Developers should adopt this tool when building question-answering systems for specialized domains where factual accuracy and multi-step reasoning matter more than broad coverage. It suits organizations with existing domain knowledge bases or the capacity to construct them, particularly those dealing with professional or technical content where logical consistency is important. The README positions the tool against traditional RAG systems, which it claims suffer from vector similarity ambiguity, and against GraphRAG, which it argues introduces noise through open information extraction.

The project maintains active development with regular updates and comprehensive documentation including user guides and research papers. The codebase shows ongoing refinement of core features around knowledge representation, semantic alignment, and hybrid reasoning strategies. Community engagement is supported through multiple communication channels and multilingual documentation.