Skip to main content

LLM Guardrails tailored to your Principles

Project description

LLM Guardrails tailored to your Principles


Type Checked with ty PyPI Version GitHub License Python Versions Required Python Version

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="scope-guard"
)

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


Download files

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

Source Distribution

orbitals-0.0.1.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

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

orbitals-0.0.1-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file orbitals-0.0.1.tar.gz.

File metadata

  • Download URL: orbitals-0.0.1.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for orbitals-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fa3ed2d39dcd5044673f1e45052788ac1580210da4034a7d6253d47bf49f053d
MD5 53dc0fccb82eb0a39a9d85f54956fa53
BLAKE2b-256 1359eda772ff54065bae956894a7f55aaa604bfa582250094ce83447ba68d31e

See more details on using hashes here.

File details

Details for the file orbitals-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: orbitals-0.0.1-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

Hashes for orbitals-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 477d385d3d529120395c7d553b6ab9784221d4a77b3354b22e2652f77d2c3227
MD5 98674fdc1a0f30660cab63c8af86a22f
BLAKE2b-256 8a9d760bdcf88d48fcd480b4322f51451d0ea52aa4eaab5dd23b8dd1040eb953

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