Skip to main content

Neuro-symbolic guardrails for LLMs: rules + repair loops + (optional) SMT.

Project description

NeuroSym-AI

Python License Type%20Checked Linting Formatting Status

Neuro-symbolic guardrails for arbitrary information

Validate, sanitize, and enforce policies on text, JSON, and LLM outputs using symbolic rules with optional language-model-based repair loops.


Overview

NeuroSym is an information-first guardrail engine designed to enforce explicit, auditable constraints on unstructured and semi-structured data.

Unlike LLM-specific guardrail tools, NeuroSym operates independently of model providers and treats language models as optional adapters, not core dependencies.

It is suitable for:

  • AI agents and tool pipelines
  • Structured LLM extraction
  • Compliance-sensitive systems
  • Research in neuro-symbolic AI and AI safety

Key Capabilities

Input (Text / JSON / Tool Output) ↓ Deterministic Repairs (Offline) ↓ Symbolic Rule Evaluation ↓ Optional LLM Repair Loop ↓ Validated, Audited Output

Highlights

  • Provider-agnostic (no model lock-in)
  • Deterministic by default (no API keys required)
  • Symbolic core (rules, schemas, constraints)
  • Optional neuro-symbolic repair loops
  • Full traceability with structured audit logs

Design Philosophy

Principle 1 — Information First

NeuroSym guards information, not prompts.
Inputs may originate from humans, tools, databases, or language models.

Principle 2 — Determinism by Default

Validation and repair operate fully offline.
Language models are invoked only when explicitly configured.

Principle 3 — Symbolic Core

Rules are explicit, testable, inspectable, and explainable.

Principle 4 — Auditability

Every decision produces a structured execution trace suitable for compliance, debugging, and research.


Installation

pip install neurosym-ai
pip install neurosym-ai[z3]          # SMT / formal constraints
pip install neurosym-ai[providers]   # Gemini / OpenAI adapters

Project details


Download files

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

Source Distribution

neurosym_ai-0.1.2.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

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

neurosym_ai-0.1.2-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file neurosym_ai-0.1.2.tar.gz.

File metadata

  • Download URL: neurosym_ai-0.1.2.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for neurosym_ai-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5f1da81274495980777e6608a9116dbc069da770dcb045c20007f6ae3011bda3
MD5 21aff05854aea15a053ea2a61eaa2d57
BLAKE2b-256 193e2979461cfe56aa62a66d85d55e3e5c37d0c50e599d05d1b6dc1c0f0cc60e

See more details on using hashes here.

File details

Details for the file neurosym_ai-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: neurosym_ai-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for neurosym_ai-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0220eac4c2f611389930b23991143bd03f8bfa6430a02d17ee67e0d5c0b23231
MD5 48b4bc236ace984f80624c02fcfee17b
BLAKE2b-256 f8fb901d75eb6dbbeabe63fe26599cccf0b8f946782d5b36c5a666fabb3d75fd

See more details on using hashes here.

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