# openspg/kag

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/openspg-kag).**

8,548 stars · 659 forks · Python · apache-2.0

## Links

- GitHub: https://github.com/OpenSPG/KAG
- Homepage: https://spg.openkg.cn/en-US
- awesome-repositories: https://awesome-repositories.com/repository/openspg-kag.md

## Topics

`knowledge-graph` `large-language-model` `logical-reasoning` `multi-hop-question-answering` `trustfulness`

## Description

KAG is a graph-augmented retrieval augmented generation system and knowledge graph engine. It functions as a framework that integrates large language models with graph retrieval and numerical calculation to resolve natural language queries.

The system creates unified knowledge representations by aligning unstructured data and expert rules through semantic mapping. It maintains mutual indexing between graph structures and original text blocks to ensure that reasoning processes remain linked to verifiable source data.

The project provides capabilities for semantic information integration, graph-based data retrieval, and hybrid logical reasoning. It employs a pipeline that combines semantic graph search with numerical calculations and symbolic logic.

## Tags

### Artificial Intelligence & ML

- [Graph-Based Retrieval Augmentation](https://awesome-repositories.com/f/artificial-intelligence-ml/graph-based-retrieval-augmentation.md) — Uses graph-based retrieval augmentation to connect structured representations to source text for verifiable AI generation.
- [Graph Reasoning Systems](https://awesome-repositories.com/f/artificial-intelligence-ml/graph-reasoning-systems.md) — Combines LLMs with graph retrieval and numerical calculation to facilitate complex information synthesis.
- [Graph Retrieval Augmented Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/graph-retrieval-augmented-generation.md) — Implements a graph-augmented RAG architecture that links graph structures to source text for verifiable reasoning.
- [Hybrid Reasoning Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/reasoning-models/hybrid-reasoning-engines.md) — Combines semantic reasoning with numerical calculations and graph retrieval to resolve complex natural language queries. ([source](https://cdn.jsdelivr.net/gh/openspg/kag@master/README.md))
- [Reasoning Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/reasoning-models/reasoning-pipelines.md) — Implements a hybrid reasoning pipeline that chains semantic graph retrieval with numerical calculations and symbolic logic.

### Data & Databases

- [Hybrid Logical Reasoning](https://awesome-repositories.com/f/data-databases/hybrid-logical-reasoning.md) — Combines semantic graph search with numerical calculations to solve complex natural language queries.
- [Knowledge Graph Construction Tools](https://awesome-repositories.com/f/data-databases/knowledge-graph-construction-tools.md) — Integrates unstructured data and expert rules via semantic alignment to build comprehensive knowledge bases.
- [Bidirectional Text-Graph Indexes](https://awesome-repositories.com/f/data-databases/knowledge-graph-indexers/bidirectional-text-graph-indexes.md) — Maintains mutual indexing between graph structures and original text blocks to ensure reasoning is linked to verifiable source data.
- [Knowledge Graph Builders](https://awesome-repositories.com/f/data-databases/knowledge-graph-indexers/knowledge-graph-builders.md) — Combines unstructured data and expert rules through semantic alignment to build comprehensive knowledge graphs. ([source](https://cdn.jsdelivr.net/gh/openspg/kag@master/README.md))
- [Standardized Knowledge Abstractions](https://awesome-repositories.com/f/data-databases/knowledge-graph-indexers/knowledge-graph-builders/standardized-knowledge-abstractions.md) — Provides a standardized knowledge graph abstraction to represent diverse data sources for uniform processing.
- [Source Text Linkers](https://awesome-repositories.com/f/data-databases/knowledge-graph-indexers/source-text-linkers.md) — Links graph structures to original text blocks to enable fast retrieval of source data during reasoning. ([source](https://cdn.jsdelivr.net/gh/openspg/kag@master/README.md))
- [Knowledge Graph Indexing Engines](https://awesome-repositories.com/f/data-databases/knowledge-graph-indexing-engines.md) — Provides a knowledge graph engine that integrates unstructured data and expert rules into semantic graphs.
- [Semantic Mapping Tools](https://awesome-repositories.com/f/data-databases/semantic-mapping-tools.md) — Maps unstructured data and expert rules into a unified graph structure using semantic alignment.
- [Natural Language Querying](https://awesome-repositories.com/f/data-databases/graph-querying/natural-language-querying.md) — Translates natural language requests into a structured sequence of retrieval and reasoning operations via graph queries.
- [Logical Rule Expansion](https://awesome-repositories.com/f/data-databases/knowledge-graph-indexers/knowledge-graph-builders/logical-rule-expansion.md) — Uses expert-defined logical rules to derive new relationships and facts within the knowledge graph.
- [Semantic Information Integration](https://awesome-repositories.com/f/data-databases/semantic-information-integration.md) — Merges diverse data sources into a single unified format to improve the accuracy of information retrieval.
