Skip to main content

The Python SDK for API of Root Signals

Project description

root-sdk

Robust AI Skill Management

GitHub release Build License

Note: We're working with few select organisations, leveraging what we learned building root signals, to improve the reliability of their LLM systems in production. Due to our small team size, we can only work with a few clients, so do write to us at info@rootsignals.com, and we will get back to you 🙂 Feel free to also open an issue if you find a bug, or create a pull request if you come up with a fix or something new.

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

Uploaded Source

Built Distribution

root_signals-0.1.1-py3-none-any.whl (175.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for root_signals-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3a5d04984b858d3c805c1f6457bbb1f10f4dc7e98b7e69a781472e64e75897c6
MD5 f684244a38df2c58d914b3c73a562d4d
BLAKE2b-256 5d900a1af329eaae7f6b29450bf7e3d82419c3e3fcbac7997da0d2576611e4ad

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for root_signals-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 74d36302d09a7225d938aeb7c1becbc7bcc7b59903d8b9f2cd70e5a919c77d19
MD5 6888065709d91b7d7a62f2e8650903d1
BLAKE2b-256 8efcb8169c47b151cbdbed229de9ae651c8c9333c9ef3c12c2f9b38dc105900d

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