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

🏗️ 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.1-cp313-cp313-win_amd64.whl (140.9 kB view details)

Uploaded CPython 3.13Windows x86-64

auroragraph-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

auroragraph-0.1.1-cp313-cp313-macosx_11_0_arm64.whl (244.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

auroragraph-0.1.1-cp312-cp312-win_amd64.whl (140.6 kB view details)

Uploaded CPython 3.12Windows x86-64

auroragraph-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

auroragraph-0.1.1-cp311-cp311-win_amd64.whl (140.8 kB view details)

Uploaded CPython 3.11Windows x86-64

auroragraph-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

auroragraph-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (246.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for auroragraph-0.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7a5fba17e3cdd185a31331a71c9ef355bf7344cd3835867112f4e5df3e23bc83
MD5 19458de403475cc736cbbb81511f1890
BLAKE2b-256 14daf7f83b5f34df7982f451ebfe90991b58af8532d911e3d5a51b31bc6f1944

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.1-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.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0a4768d4592788b98344e584995e7b7c0287f7e9a173a4ba329c36a09db35935
MD5 f95a79d548232807b567dbc6286656ea
BLAKE2b-256 8c1df23162d76ed0979b0c1e67bd97347a53f4b6e61f00b82c9dc92432f58acf

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.1-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.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2cd61143c15f5ffe4e517fa6757a16c520eb83cc040a0d0ba3e6766c8d87e6b6
MD5 4b21683d2731a8d83f9008efb08ee094
BLAKE2b-256 4ad26ac87ec0737f54269f3c9919f79834c20e19e9f22eb928634730b4c5d037

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.1-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.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 352a8ac1b158af7570cf28ca8d09a4e89b95cea9f871eae7092c63d244f22b22
MD5 7898d7ea42bb0e5210d064299cc7a0f6
BLAKE2b-256 fe3f36e25fa8527ffb83d3a366571fdb3dcf5be9c9116efd23c0ae88c7965d82

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.1-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.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 68c99a33de3979f7cd38a98fe1bb4fca94a2e59627e611f94cd1a866bcb9aa90
MD5 7c06560b5e42b0206dae71e030052491
BLAKE2b-256 938b274441f9b53a30b653a0d183a783d40551e62368ef879680a2905d570850

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.1-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.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d395e44f437dabb2fc7bd7dacec5e46e0332ebfc0f45b16f5fe825d9af85875f
MD5 dc7fdcf2ff8779a58794889d12ca47f1
BLAKE2b-256 1a6c1806a7c7aff8bd6b2c8c93d24f17a86a388c5d29616c793db2c5a6af3e90

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.1-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.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 15c4bc29d583dc2c2d7c740ee8ae3add33d3a346e4f69356fa605d011b4c40f8
MD5 412ad6022ea0bb7f63564a50d3b41c67
BLAKE2b-256 51ee3224f82f2c960f0c1a51739b18a9389780b77c576374558edff2b35ef3da

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.1-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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 341e3b24960281911a1b5aeca1ab398888b33e8170e9a9d9f96d8ab2b89f3dac
MD5 b0adba75a21304ea357253717359f996
BLAKE2b-256 d5150d564568369e503dfa7d092fa4439319f9878b800542a911462de601c1b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.1-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.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for auroragraph-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3f19da19231b9c7cd73f50de88cbf19c78213b68e95123499382b323951adda1
MD5 8756e2b55d08635f230d3270aa50ae37
BLAKE2b-256 00e4c9af05c5a1deced5a03cdb48ebcbe5df040411b5f450102bd67b7a20cf6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for auroragraph-0.1.1-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