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-q",    # for the Qwen-family model
    # model="scope-guard-g",  # for the Gemma-family model
)

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.2.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.2-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: orbitals-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5610ea52a0767a3af171cb55f00e7adf1efec243952c0243a2ca90046a5a1a54
MD5 3ec44b67a9b1c6f49908d989b1833819
BLAKE2b-256 561f345e643512baa1046b3322b3fdad1b5626e13ff849aad9e1ee748bbf0215

See more details on using hashes here.

File details

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

File metadata

  • Download URL: orbitals-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for orbitals-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 caef3bc1e9e725488c4ed69106ad14bd814672179c98497f6c7875a13fe29979
MD5 5218af0618974f67e8bc94fa87d35f92
BLAKE2b-256 18094bab78e294b118c0b4dee5e4f725388c464cf3517966b941d0f77e4fffc1

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