Neuro‑symbolic Tool Composition via Spherical Embeddings
Project description
NTEP – Expanded Exposition
Neuro‑symbolic Tool Composition via Spherical Embeddings
Author: J. Roberto Jiménez ✉️ tijuanapaint@gmail.com
DOI: https://doi.org/10.5281/zenodo.18398188
NTEP: Neural Tool Embeddings Protocol
What if your AI agent tried to email a file before encrypting it? NTEP builds a mathematical guarantee to prevent that.
As AI agents take on more complex tasks, tool chaining becomes critical. But how do you ensure an AI doesn't execute a sequence of tools in a disastrously wrong order? Traditional methods rely on post-hoc checks, which can fail.
NTEP (Neural Tool Embeddings Protocol) is a framework that builds safety directly into the AI's "thinking." It embeds tools in a vector space where their geometric relationships encode their operational dependencies.
🔑 Key Features
- Soundness-by-Construction: Any valid chain decoded from the embeddings is automatically correct. No more guessing.
- Monotonicity Guarantee: Our central theorem proves the AI is always geometrically "nudged" toward the correct next step.
- Risk Awareness: A quantum-inspired "consciousness" measure quantifies uncertainty and flags risky chains before execution.
- Built for Scale: Proven generalization bounds and efficient retrieval make it viable for enterprise applications.
🚀 Quick Start
pip install ntep
from ntep import NTEPDecoder, Tool, DependencyGraph
# 1. Define your tools and their dependencies
tools = [
Tool(id="resize", name="Resize Image"),
Tool(id="encrypt", name="Encrypt File"),
Tool(id="package", name="Package for Delivery"),
Tool(id="email", name="Send via Email")
]
dependencies = {
"resize": ["package"],
"encrypt": ["package"],
"package": ["email"]
}
dep_graph = DependencyGraph(dependencies)
# 2. Load a pre-trained decoder (or train your own)
# This loads the tool embeddings and dependency graph
decoder = NTEPDecoder.from_pretrained("ntep/base-document-pipeline")
# 3. Decode a valid chain from a prompt
prompt_embedding = decoder.encode_prompt("prepare the confidential image for delivery")
chain = decoder.decode(prompt_embedding)
print(f"Valid tool chain: {' -> '.join(chain)}")
# > Valid tool chain: resize -> encrypt -> package -> email
📖 Documentation
The core technical narrative lives in docs/axioms.pdf. It expands on:
Symbolic definitions (𝒯, ℰ, ≤, γ, δ…)
Category‑theoretic construction (𝒫, metric enrichment, embedding functor)
Monotonicity Theorem with full proof sketch
Consciousness measure built from density‑matrix entropy
Generalization bounds, geometric properties, and generalization guarantees
Contributing
Feel free to open issues or pull requests if you spot a typo, need a visualisation, or want to extend the framework (e.g., stochastic composition, higher‑order interactions).
📜 Citation
If you use NTEP in research, please cite the Zenodo record:
@misc{jimenez2023ntep,
author = {Jiménez, J. Roberto},
title = {{NTEP}: Expanded Exposition},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.18398188},
url = {https://doi.org/10.5281/zenodo.18398188}
}
📧 Contact
For questions or collaboration proposals, reach out to J. Roberto Jiménez at tijuanapaint@gmail.com.
If you would like to support the development of these resources, consider contributing towards helping me get some gear for continued improvement or simply treating me to a coffee. Your support means a lot!" buy me a coffee
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ntep-0.1.0.tar.gz.
File metadata
- Download URL: ntep-0.1.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5b4123b6eda42c91ddb964c8b9ee0ef78f36ed133d717fce3f30e3cb36debc9
|
|
| MD5 |
90f71fdd405082220e4c1b11f57a6956
|
|
| BLAKE2b-256 |
c3e883d566c1134e5fa01cfabc58d42defbc6ff65b4ca26893f276bcb235c540
|
File details
Details for the file ntep-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ntep-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80bbee30b093f26e92d29a2554039d76cd2d5bac2b81905b7ea631ea9276bf3e
|
|
| MD5 |
9a1766afd906bb8f216344d48bcb09a1
|
|
| BLAKE2b-256 |
a2cd5482ce697f64e3b5b708999a345f0693ccc959065c1ebf6f4c1842ae635b
|