Skip to main content

The Python SDK for API of Root Signals

Project description

root-sdk

Control and Measurement for LLM automations

GitHub release Build License

Root Signals SDK streamlines the evaluation of your LLM pipelines, to yield insights about their effectiveness. While many tools exist for building the pipelines themselves, quantifying their performance can be challenging.

Root Signals addresses this gap with carefully crafted universal evaluators based on cutting edge LLM research, as well as a framework for systematically adding your own.

Easily integrate with your CI/CD process for continuous monitoring to ensure the performance stays within acceptable limits.

Install

From pypi

The preferrable way of installing the SDK is from PyPI. With pip:

pip install root-signals

Quickstart

Please set your API key to environment variable ROOTSIGNALS_API_KEY, or to local .env file.

Retrieve an API key from https://app.rootsignals.ai/settings/api-keys

For example:

export ROOTSIGNALS_API_KEY=your-Root-API-key

or, if you prefer using .env file:

echo ROOTSIGNALS_API_KEY=your-Root-API-key >> .env

Minimal skill

{::comment}examples/minimal.py{:/comment}

from root import RootSignals

# Connect to the Root Signals API
client = RootSignals()

# Create a skill
skill = client.skills.create(
    """
    Classify this text into one of the following: {{categories}}
    Text: {{text}}
    """
)

# Execute it
response = skill.run(
    {
        "text": "The expectation for rate cuts has been steadily declining.",
        "categories": "Finance, Sports, Politics",
    }
)

print(response)

# "llm_output": "Finance",
# "validation": Validation(is_valid=True, validator_results=[]),
# "model": "gpt-3.5-turbo",
# "execution_log_id": "9b3c713d-7bdc-4f7d-a85c-ed7d92ff4a56",
# "rendered_prompt": "Classify this text into ...",
# "cost": 5.6e-05,

Documentation

For more details, please see the main SDK documentation.

Miscellaneous notes

Versioning policy

We follow semantic versioning; to point, major versions are not guaranteed to be backwards compatible, minor versions are, and patch versions only fix bugs.

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

root_signals-1.1.0.tar.gz (91.7 kB view details)

Uploaded Source

Built Distribution

root_signals-1.1.0-py3-none-any.whl (187.0 kB view details)

Uploaded Python 3

File details

Details for the file root_signals-1.1.0.tar.gz.

File metadata

  • Download URL: root_signals-1.1.0.tar.gz
  • Upload date:
  • Size: 91.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for root_signals-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5b14ecd8c3c28f151d52543c9c0f4cdbe1c3be055bf7875b6002b486041aafb6
MD5 a65e5a1ee4b5352467372bc1d215356a
BLAKE2b-256 e455b4e087544c62940a1529dd9bd5599b7b7deefa12a3f48b8f045101b9b5c1

See more details on using hashes here.

File details

Details for the file root_signals-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: root_signals-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 187.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for root_signals-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 860607c2521d15de448aae089f977cfb53a8035c64e4bb00eb63477a3399b054
MD5 bc00b8d3f516b6de02b4fd6156e2dee8
BLAKE2b-256 09ae2603a0beb80dd31754d870057a5b8efebe4ab3d6620649d9df35a6119777

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page