Skip to main content

High-Performance Knowledge Graph & Deterministic Reasoning Engine with Rust Core

Project description

AuroraGraph 🌌

PyPI version Python versions License: MIT Tests Publish to PyPI Ruff PRs Welcome

Disclaimer: This is a personal learning project created for educational purposes and to explore different code concepts with AI concepts.

  • Status: Personal sandbox / Portfolio piece.
  • License: This project is open-source and available for public educational use under the MIT License.
  • Purpose: Academic research and technical skill development.

High-Performance Knowledge Graph & Deterministic Reasoning Engine with a Rust Core.

AuroraGraph combines a Rust-Powered Parser, Multi-Dimensional Synaptic Links, and Hybrid Search (BM25 + HNSW vector) to build a hallucination-free RAG pipeline on top of pluggable graph databases — SQLite, Kùzu, or Neo4j.


🗺️ Roadmap

What's Next:

  • Interactive Web UI: Build a webpage with an interactive 3D view of the knowledge graph, featuring animations when information is retrieved during a query.
  • Neo4j Validation: Conduct comprehensive user testing for the Neo4j database integration (currently implemented but pending user validation).
  • MCP Server Testing: Implement comprehensive unit and integration tests for the Model Context Protocol (MCP) server implementation to ensure stable tooling for AI Agents.

🏗️ Architecture

Raw Documents → Rust Parser + Metabolic Filter → Graph DB (Kùzu / SQLite / Neo4j)
                                                          ↓
User Query → AuroraGraph Engine → Hybrid Search (BM25 + Vector HNSW) → Ollama LLM → Answer

📦 Quick Install (from PyPI)

# CPU (recommended starting point)
pip install auragraph[fastembed]

# With Kùzu embedded graph (no Docker, recommended for production)
pip install "auragraph[kuzu,fastembed]"

# With Neo4j cluster
pip install "auragraph[neo4j,fastembed]"

# NVIDIA GPU — see GPU Setup below
pip install "auragraph[cuda]"

For full library usage docs, see README_LIBRARY.md.


🛠️ Development Setup (from source)

Requires: uv · Rust toolchain (rustup.rs)

git clone https://github.com/serguei9090/AuroraGraph.git
cd AuroraGraph
cp .env.example .env   # edit as needed

🗄️ Database Backend

Set AURA_DB_PROVIDER in .env:

Value Extra Description
sqlite (built-in) Dev / testing, no extras
kuzu --extra kuzu Embedded graph, zero Docker, recommended
neo4j --extra neo4j Enterprise cluster

🖥️ Setup — Windows (CUDA 12 · Python 3.13)

1 · Prerequisites

Requirement Version Download
NVIDIA Driver ≥ 580 nvidia.com/drivers
CUDA Toolkit 12.x developer.nvidia.com/cuda-downloads
Rust toolchain stable winget install Rustlang.Rustup
uv latest winget install astral-sh.uv

Verify CUDA is on PATH:

nvcc --version   # should show 12.x
nvidia-smi       # should show your GPU

2 · Install dependencies

# Core deps + Kùzu graph + fastembed-gpu package
uv sync --extra cuda --extra kuzu

# Replace standard onnxruntime-gpu with the CUDA 12 nightly build
# (required because the stable PyPI wheel targets CUDA 11;
#  the nightly feed is the only source with Python 3.13 + CUDA 12 wheels)
uv pip install onnxruntime-gpu `
  --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ `
  --index-strategy unsafe-best-match `
  --prerelease=allow

# Install cuDNN 9 as a Python wheel
# (CUDA Toolkit does NOT include cuDNN on Windows; this wheel puts the DLLs
#  where onnxruntime.preload_dlls() can find them automatically)
uv pip install "nvidia-cudnn-cu12>=9.1.0"

3 · Configure .env

AURA_DB_PROVIDER=kuzu
AURA_DEVICE=cuda
AURA_MODEL=llama3.1:8b

4 · Run ingestion

4 · Run ingestion

uv run python code_examples/ingest_knowledge.py --device cuda
uv run python code_examples/chat_test.py

Expected output:

Initializing AuroraGraph (Kuzu + FastEmbed)...
[FastEmbed] ✅ CUDA available via fastembed-gpu (ONNX Runtime).
[FastEmbed] Loading model: BAAI/bge-small-en-v1.5
[FastEmbed] Device: CUDA (requested: 'cuda')

Note: You may see harmless warnings about cufft64_11.dll or cudart64_12.dll not found during the DLL search sweep — these do not affect functionality.


🐧 Setup — Linux (CUDA 12 · Python 3.13)

1 · Prerequisites

Install NVIDIA drivers + CUDA 12 Toolkit using your distro's package manager, or the official runfile.

Ubuntu / Debian:

# CUDA Toolkit
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt update && sudo apt install cuda-toolkit-12-6

# cuDNN 9
sudo apt install cudnn9-cuda-12

Verify:

nvcc --version   # 12.x
nvidia-smi

Install uv and Rust:

curl -LsSf https://astral.sh/uv/install.sh | sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

2 · Install dependencies

# Core deps + Kùzu + fastembed-gpu
uv sync --extra cuda --extra kuzu

# Replace with CUDA 12 onnxruntime-gpu nightly (Python 3.13 compatible)
uv pip install onnxruntime-gpu \
  --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ \
  --index-strategy unsafe-best-match \
  --prerelease=allow

# cuDNN 9 wheel (alternative to system install if preferred)
# Skip this if you installed cudnn9-cuda-12 via apt above
uv pip install "nvidia-cudnn-cu12>=9.1.0"

3 · Configure .env

AURA_DB_PROVIDER=kuzu
AURA_DEVICE=cuda
AURA_MODEL=llama3.1:8b

4 · Run ingestion

uv run python code_examples/ingest_knowledge.py --device cuda
uv run python code_examples/chat_test.py

🍎 Setup — macOS (Apple Silicon MPS)

# Install uv + Rust
brew install uv
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Sync with MPS-optimised fastembed
uv sync --extra mps --extra kuzu

.env:

AURA_DB_PROVIDER=kuzu
AURA_DEVICE=mps

Run:

uv run python code_examples/ingest_knowledge.py --device mps
uv run python code_examples/chat_test.py

💡 CPU-Only Setup (any OS)

No GPU needed — FastEmbed on CPU is still fast (~100 MB install).

uv sync --extra fastembed --extra kuzu
uv run python code_examples/ingest_knowledge.py --device cpu
uv run python code_examples/chat_test.py

🔤 NLP Model Requirement

AuroraGraph uses SpaCy for high-accuracy triple extraction. Because PyPI does not allow direct URL dependencies, you must download the NLP model manually after installing the library:

python -m spacy download en_core_web_sm

If you skip this, AuroraGraph will still function but will use fallback logic for triple extraction.


🌍 Environment Reference

Copy .env.example.env and set:

Variable Default Description
AURA_MODEL llama3.1:8b Ollama model name
AURA_DB_PROVIDER sqlite sqlite / kuzu / neo4j
AURA_DEVICE auto auto / cpu / cuda / mps
AURA_CONCURRENCY 4 Parallel ingestion workers (0 = all cores)
KUZU_DB_PATH ./auragraph_graph Kùzu database folder
NEO4J_URI bolt://localhost:7687 Neo4j URI
NEO4J_USER neo4j Neo4j username
NEO4J_PASSWORD password Neo4j password
FTS5_MATCH_LIMIT 25 Max chunks returned per search
FTS5_SNIPPET_WORDS 200 Snippet size in words

🚀 Docker (Full Stack)

cp .env.example .env
docker compose up --build -d
# API:        http://localhost:8000
# Prometheus: http://localhost:9090
# Grafana:    http://localhost:3000

📊 Benchmarks vs Traditional RAG (LangChain + FAISS)

AuroraGraph trades raw indexing speed for deterministic accuracy and zero hallucinations. While traditional setups simply chunk and dump files into an index, AuroraGraph parses Multi-Dimensional Synapses and enforces a strict Audit formatting pipeline.

Metric LangChain + FAISS AuroraGraph (Audit Mode) AuroraGraph (Fast Mode)
Answer Quality High Hallucination Risk (No citations) Zero Hallucinations (Page-level citations) High Accuracy
Generation Speed ~18s ~94s ~19s
Indexing Speed ~69s ~203s (Runs Once)
Retrieval Latency ~0.05s ~0.12s ~0.12s

Pros & Cons

Why AuroraGraph is better:

  • Zero Hallucination Guarantee: By forcing the LLM into a two-task Audit Mode, it must prove where it found every fact.
  • Enterprise Traceability: AuroraGraph provides the exact filename and page number so humans can verify the source in seconds.
  • Dynamic Speed: You can toggle from the heavy Audit Mode to a hyper-fast traditional RAG prompt instantly by using engine.query(custom_prompt="..."). See Custom Prompts Docs.

Cons:

  • Upfront calculation of 10D Synaptic Edges and Nodes takes roughly 3x longer during the initial ingestion phase compared to simple text chunking arrays.
  • Default Generation takes longer due to outputting structured, deterministic logs instead of simple paragraphs.

Read the full Performance Benchmark Report.


⚖️ License

MIT — High Performance, Zero Hallucination.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

auroragraph-0.1.2-cp313-cp313-win_amd64.whl (141.0 kB view details)

Uploaded CPython 3.13Windows x86-64

auroragraph-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

auroragraph-0.1.2-cp313-cp313-macosx_11_0_arm64.whl (244.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

auroragraph-0.1.2-cp312-cp312-win_amd64.whl (140.7 kB view details)

Uploaded CPython 3.12Windows x86-64

auroragraph-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

auroragraph-0.1.2-cp312-cp312-macosx_11_0_arm64.whl (244.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

auroragraph-0.1.2-cp311-cp311-win_amd64.whl (140.9 kB view details)

Uploaded CPython 3.11Windows x86-64

auroragraph-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

auroragraph-0.1.2-cp311-cp311-macosx_11_0_arm64.whl (246.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file auroragraph-0.1.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c87d94ae9151b7fc1fd740e915f40c159a810d5774a442f83d864727988f9344
MD5 20718c0ce74b9696ce70a53b56ed4fd1
BLAKE2b-256 b799d65b92c498efa1755fac7cf7aa8591eb5fdf8976cdd7c5c9487c291b2aec

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.2-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on serguei9090/AuroraGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file auroragraph-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4f6f5d2a0bb4d070d0b5252294fa7f1b1a83bde12a8d81d1a64322425454e369
MD5 4084755ff7b1c27cee42496a382cffd2
BLAKE2b-256 e7adb7e6265330861bd1e26d9f8d8071e7f86c3b156664c3e9988e3f2944482d

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on serguei9090/AuroraGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file auroragraph-0.1.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 044e545cc65e566207a5755aed93dbd08fc10b03156853fa5824d2c6bdf5886e
MD5 80d40d48a8882b9ed446cf0adcb863ff
BLAKE2b-256 a07d8949344bbf726304799620005fb67b8ed6e35fa225a1f871d54febc4f154

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.2-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on serguei9090/AuroraGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file auroragraph-0.1.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4e472ae2ea863469bf76d49dc64e2e4b5edc84c10502b87e09ab331fa2866591
MD5 53a98bc268f832ff5ab9e9dca7e3f561
BLAKE2b-256 65ba66bec65933e25c49dd63320cfa4735df40c1b4927c2445d99d688de3f5a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.2-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on serguei9090/AuroraGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file auroragraph-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 322c0fc2cccda68e5c6f1fd24ad9a875e845d4d83772fb3df44a24c6430453b6
MD5 b59c9faa94b97d6346e8107c8be0439d
BLAKE2b-256 d41c4501f4ed1f83517d9da296424c0458b9d789f636b9ed2aa621d28ece5342

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on serguei9090/AuroraGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file auroragraph-0.1.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b99494d04df3c0aa2c8aec7540f59f66adbce1ac9b46d069a883d323be2093c5
MD5 6dcf98cc4d9d1e97c0d4b68794e047d9
BLAKE2b-256 a25e40801e98d5ffa013aa39e40f53749cdc5257f2927f153cc3bac88bfb246e

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.2-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on serguei9090/AuroraGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file auroragraph-0.1.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d8e4ed58f0f6b53ec6f34cc620f9a800095ed04c1b46509ac8f238772fc0145a
MD5 ec2a54a7423100ef81e175e04701c8d5
BLAKE2b-256 7ef3dda0b5fb50f426b09aa73d4db1a3e2fbe55c05811d91c8afb1334dd5b9aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.2-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on serguei9090/AuroraGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file auroragraph-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 11f6b4784e6651e896d3cdb89d5a5c7ad659b5f25094cc783017cb5c7cfe7608
MD5 ed3f73b95cfbbc288c8caf514868447f
BLAKE2b-256 9e6b329545e029d4e79dd539d12dc5a1e42a36371f9bf17cd4e25f6a1bb684a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on serguei9090/AuroraGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file auroragraph-0.1.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa8ee4bf89241d7ad3c1ffa5dcd8e305b5ad21b7b990a582ca7c9f14a1d8635a
MD5 ace76b820d7f89452c3ec231a02c6345
BLAKE2b-256 bae1be7358c4b6e9914b46c5ed8e245155b735b8f004783ca0a95712c4bff086

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.2-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on serguei9090/AuroraGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page