The Python SDK for API of Root Signals
Project description
root-sdk
Robust AI Skill Management
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file root_signals-0.1.0.tar.gz
.
File metadata
- Download URL: root_signals-0.1.0.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e825f3ce903d3c65d2449072a373a5c61fea9e6a6b9e14eae45985876933828 |
|
MD5 | f630e80dbf2edbd9b39fbc43352bbba8 |
|
BLAKE2b-256 | a9a72dbbae96b7d446358fdbd6dd66c0e7a663f434ba0825ba659a669aab2963 |
File details
Details for the file root_signals-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: root_signals-0.1.0-py3-none-any.whl
- Upload date:
- Size: 175.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab9032980b9b2ee749159797fdc9f88686ce8a2b18ca75a27db4b2a7bdab5bd9 |
|
MD5 | 9f5a7bf515cba73e9a9304fad4ba18d3 |
|
BLAKE2b-256 | 9bf0b3bc82c895d0fe5a52434653a86e0fe07e2fc1d6cd33e8afb53908e998fa |