LLM Guardrails tailored to your Principles
Project description
LLM Guardrails tailored to your Principles
orbitals is an ecosystem of LLM guardrails, designed to provide a governance layer tailored to user-specific principles, requirements and use cases. Rather than enforcing generic notions of safety, correctness, etc., Orbitals evaluates inputs and outputs against user-defined specifications. This makes guardrails explicit, auditable, and aligned with the user's philosophy.
Orbitals guardrails fall into two typologies:
- Guards operate on the input of a guardrailed LLM, assessing whether a user request is legitimate under the provided specifications.
- Supervisors operate on the output of a guardrailed LLM, evaluating the assistant’s response before it is returned.
Guardrails may be released under different modality flavors:
- Open (open-source and open-weight), allowing users to run guardrails and underlying models on their own infrastructure.
- Hosted, accessible via simple HTTP calls (API key required).
Available Guardrails
| Name | Flavor | Description |
|---|---|---|
| ScopeGuard | Open / Hosted | Validates whether a user request falls within the intended use of an AI service. |
| RagSupervisor | Coming soon | Ensures LLM responses remain grounded in retrieved context for RAG setups. |
ScopeGuard
First, we need to install orbitals and scope-guard:
pip install orbitals[scope-guard-vllm]
Then:
from orbitals.scope_guard import ScopeGuard
scope_guard = ScopeGuard(
backend="vllm",
model="small"
)
ai_service_description = """
You are a virtual assistant for a parcel delivery service.
You can only answer questions about package tracking.
Never respond to requests for refunds.
"""
user_query = "If the package hasn't arrived by tomorrow, can I get my money back?"
result = scope_guard.validate(user_query, ai_service_description)
print(f"Scope: {result.scope_class.value}")
if result.evidences:
print("Evidences:")
for evidence in result.evidences:
print(f" - {evidence}")
# Scope: Restricted
# Evidences:
# - Never respond to requests for refunds.
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 orbitals-0.1.0.tar.gz.
File metadata
- Download URL: orbitals-0.1.0.tar.gz
- Upload date:
- Size: 392.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ea12ffb4afd8b209cf9ac72dfce3cc2cc96031882ffec5d406c3d70933e67ca
|
|
| MD5 |
2197c9b900dcc172758efce7f31e840f
|
|
| BLAKE2b-256 |
5d0a05981e16150612efb4cf8be78fe18e432714f9078e6f407a374ec58e066f
|
File details
Details for the file orbitals-0.1.0-py3-none-any.whl.
File metadata
- Download URL: orbitals-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff50f46436de7f8d33dec6cb766ff4c0131764f8e4085310687e177c4a4e5446
|
|
| MD5 |
b5ee16bdff170683d4fcd276a9d9917e
|
|
| BLAKE2b-256 |
1b7ce4aa54e87a71b55b345165075ba10b1f60d48d370e4fd7f40690ddb1600b
|