Skip to main content

The Python SDK for API of Root Signals

Project description

root-sdk

Robust AI Skill Management

GitHub release Build License

This SDK provides a way to use Root Signals cloud service, which helps you evaluate your LLM pipelines. There are existing tools and frameworks that help you build these pipelines but evaluating it and quantifying your pipeline performance can be hard. This is where this comes in.

Root Signals provides you with the tools based on the latest research for evaluating LLM-generated text to give you insights about your LLM pipeline. It can be integrated with your CI/CD to provide continuous checks to ensure performance stays within acceptable limits.

Install

From pypi

The preferrable way of installing the SDK is from PyPI, using pip or other package installation of tool of choice. If using pip, this should be enough:

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=somethingreallysecretyougotfromtheweb

or, if you prefer using .env file:

echo ROOTSIGNALS_API_KEY=somethingreallysecretyougotfromtheweb >> .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(
    "Find me good recipes for {{food_type}} food that are {{cuisine}}."
)

# Run it
response = skill.run({"food_type": "spicy", "cuisine": "Korean"})

print(response)

# llm_output="1. Kimchi Jjigae (Kimchi Stew): This spicy and flavorful
# stew is made with fermented kimchi, pork, tofu, and vegetables. ..."
# validation={'validator_results': [], 'is_valid': True}
# model='gpt-3.5-turbo' engine='gpt-3.5-turbo'
# execution_log_id='181eb95b-b972-4e96-8e30-ca7d3447d4fe'
# rendered_prompt='Find me good recipes for spicy food that are
# Korean.'

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.0.0.tar.gz (87.9 kB view details)

Uploaded Source

Built Distribution

root_signals-1.0.0-py3-none-any.whl (179.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: root_signals-1.0.0.tar.gz
  • Upload date:
  • Size: 87.9 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.0.0.tar.gz
Algorithm Hash digest
SHA256 6d19eabd7012f328298b3b7460925d31758fcf3bfb383164a822919fed4204cc
MD5 f506aee7b2bdbd8a95b83fcfc1e675f8
BLAKE2b-256 2bec6e00af7ed36fd743da3e2e3c80f6f2501da53f4f0c152e357ecc0d82e236

See more details on using hashes here.

File details

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

File metadata

  • Download URL: root_signals-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 179.3 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bdf2c0a9e366739b3f51e5eba17eb50e2696126afa8de14b8a59eb39c27760e
MD5 7eeafb3e326c489be699ac23d2c5f713
BLAKE2b-256 19b72bd70b9f5389e445063c3cdc684821cc802e7313ae3fd3486eeba64fc75a

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