Metadata-Version: 2.4
Name: knwl
Version: 0.4.0
Summary: Graph RAG
Author-email: Swa <swa@orbifold.net>
Requires-Python: <3.13,>=3.10
Requires-Dist: chromadb>=0.5.16
Requires-Dist: graspologic>=3.4.1
Requires-Dist: networkx>=3.4.2
Requires-Dist: ollama>=0.4.7
Requires-Dist: openai>=1.53.0
Requires-Dist: pyvis>=0.3.2
Requires-Dist: tenacity>=9.0.0
Requires-Dist: tiktoken>=0.8.0
Requires-Dist: torch>=2.5.1
Requires-Dist: transformers>=4.46.1
Provides-Extra: dev
Requires-Dist: faker>=30.8.2; extra == 'dev'
Requires-Dist: jupyter>=1.1.1; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
Requires-Dist: pytest>=8.3.3; extra == 'dev'
Description-Content-Type: text/markdown

# Knwl

A clean Graph RAG implementation.

**The current implementation is rather old and there is a major effort ongoing in the v2 branch.**

# Query modes

## Local
- 

- **low-level keywords** are matched against nodes, called the primary nodes
- **relationship neighborhood**  around these primary nodes is considered

The context consists of:

- **primary node** records/table consisting of name, type, and description
- **relationship** records/table consisting of source, target, type, and description
- **chunks** taken from the primary nodes

## Global

- **high-level keywords** are matched against edges

The context consists of:

- **node endpoints** of the edges
- **edge** records/table consisting of source, target, type, and description
- **chunks** taken from the edges

## Naive

The simply gives the question to the chunks and is added as context.

## Hybrid

The hybrid mode is a combination of the local and global modes.
It takes the local and global contexts, combines it as augmentation.
