Magnetic Outlier Agent: Patent-pending outlier detection for RAG systems and telehealth compliance
Project description
Magnetic Outlier Agent (MOA)
Patent Pending • U.S. Provisional Serial No. 63/926,578 filed November 27, 2025
License • Business Source License 1.1 (Change Date: November 27, 2029)
Trademarks Pending • "Magnetic Outlier Agent" and "MOA"
Overview
MOA is a geometric multi-metric outlier detection system for embedding vectors in Retrieval-Augmented Generation (RAG) pipelines. It uses a patented triple-metric approach combining centroid distance, local density, and graph curvature to identify low-quality or non-compliant documents before they reach your LLM.
Use cases:
- RAG quality filtering (remove hallucination-prone chunks)
- Telehealth compliance auditing (detect missing consent/risks language)
- Regulatory integration via MCP (ICD-10, CPT billing, state bills)
Quick Start
pip install moa-telehealth
Basic Usage
from moa.filters import MOAOutlierFilter
# Initialize filter
moa = MOAOutlierFilter(threshold=1.5)
# Score documents
embeddings = [[0.1, 0.2, ...], ...] # Your doc embeddings
scores, outliers = moa.score(embeddings)
# Filter out outliers
clean_docs = [doc for i, doc in enumerate(docs) if i not in outliers]
LangChain Integration
from langchain.chains import RetrievalQA
from moa.integrations.langchain_moa_filter import MOAFilterRunnable
qa_chain = RetrievalQA.from_chain_type(
llm=llm,
retriever=vectorstore.as_retriever() | MOAFilterRunnable(MOAOutlierFilter())
)
IP & Security Status
- Patent: U.S. Provisional 63/926,578 (filed Nov 27, 2025) – See PATENT_PENDING.md
- License: BUSL 1.1 (change date: 2029-11-27) – See LICENSE
- PyPI: moa-telehealth 1.0.0 live
- MCP Layer 3: Regulatory integration complete – See docs/REGULATORY_MCP_INTEGRATION.md
- Security: PHI handling & key management policies – See SECURITY.md
- Trademarks: Filing in progress (deadline: Dec 4, 2025)
Documentation
- Regulatory MCP Integration - Free gov/insurance API integration
- Deployment Summary - Production deployment guide
- Patent Pending - Algorithm claims and scope
- Security - Vulnerability reporting and responsible use
Features
Core Algorithm (Patent Pending)
- Triple-metric scorer: Combines centroid distance (d), local density (δ), and graph curvature (κ)
- Bridge-path detection: Identifies weak links in k-NN graphs
- Spectral degradation: Fourier analysis for time-ordered corpora
Integrations
- ✅ LangChain - Drop-in RAG filter
- ✅ MCP - Claude Desktop tools for regulatory lookups
- ✅ FastAPI - RESTful endpoints for web/n8n
- ✅ Streamlit - Interactive compliance editor
Regulatory Layer (MCP)
- ICD-10 lookup (NLM Clinical Tables) - Free, 1000/day
- CPT billing (eCFR §410.78) - Free, unlimited
- State bills (OpenStates) - Free, 5000/day (API key required)
- PHI guard - Automatic blocking of SSN/phone/names
License
Business Source License 1.1
© 2025 Michael Ordon. Patent Pending U.S. Provisional 63/926,578. All Rights Reserved.
- Permitted: Evaluation, research, internal use (≤100 visits/month)
- Restricted: Commercial SaaS offerings before change date (2029-11-27)
- Change License: Apache 2.0 (after Nov 27, 2029)
For commercial licensing: grzywajk@gmail.com
Citation
If you use MOA in research, please cite:
@misc{ordon2025moa,
title={Magnetic Outlier Agent: Geometric Multi-Metric Outlier Detection for RAG Systems},
author={Ordon, Michael},
year={2025},
note={U.S. Provisional Patent Application Serial No. 63/926,578}
}
Contact
Inventor: Michael Ordon (Culver City, CA)
Email: grzywajk@gmail.com
Patent: U.S. Provisional 63/926,578
License: BUSL 1.1
Links: PyPI | Patent Center
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 moa_telehealth-1.0.1.tar.gz.
File metadata
- Download URL: moa_telehealth-1.0.1.tar.gz
- Upload date:
- Size: 36.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4135ab951376edef37d06da6dab6c436375d9cc48bae6aff1ad09c0b80ba8a33
|
|
| MD5 |
492ac385ef02e25a233808421101b01e
|
|
| BLAKE2b-256 |
82d124e67c7963812145d21aa0610e3d6c96d5264e7b9c4dff8d6094225f9cfc
|
File details
Details for the file moa_telehealth-1.0.1-py3-none-any.whl.
File metadata
- Download URL: moa_telehealth-1.0.1-py3-none-any.whl
- Upload date:
- Size: 40.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c0332746c37973757ff4f946c6b9245185890c5f77900668ae8b1defeb70323
|
|
| MD5 |
93ef8d4683451033e59d5cd1963a0546
|
|
| BLAKE2b-256 |
7654ae555e8f46701a70aa9a3fb95de02760332b4883f6c5b023a5be4fbaefff
|