Skip to main content

The Official Elluminate SDK

Project description

Elluminate SDK

Elluminate SDK is a Software Development Kit that provides a convenient way to interact with the Elluminate platform programmatically. It enables developers to evaluate and optimize prompts, manage experiments, and integrate Elluminate's powerful evaluation capabilities directly into their applications.

Installation

Install the Elluminate SDK using pip:

pip install elluminate

📚 Full Documentation

The full documentation of Elluminate including the SDK can be found at: https://docs.elluminate.de/

Quick Start

Prerequisites

Before you begin, you'll need to set up your API key:

  1. Visit your project's "Keys" dashboard to create a new API key
  2. Export your API key and service address as environment variables:
export ELLUMINATE_API_KEY=<your_api_key>
export ELLUMINATE_BASE_URL=<your_elluminate_service_address>

Never commit your API key to version control. For detailed information about API key management and security best practices, see our API Key Management Guide.

Basic Usage

Here's a simple example to evaluate your first prompt:

from elluminate import Client
from elluminate.schemas import RatingMode

# Initialize the client
client = Client()

# Create a prompt template
template, _ = client.prompt_templates.get_or_create(
    "Explain the concept of {{concept}} in simple terms.",
    name="Concept Explanation"
)

# Generate evaluation criteria for the template
client.criteria.get_or_generate_many(template)

# Create a collection for our variables
collection, _ = client.collections.get_or_create(
    name="Concept Variables",
    description="Template variables for concept explanations"
)

# Add template variables to the collection
variables = client.template_variables.add_to_collection(
    template_variables={"concept": "recursion"},
    collection=collection
)

# Create an experiment with response generation and rating
experiment = client.experiments.create(
    "Concept Evaluation Test",
    prompt_template=template,
    collection=collection,
    description="Evaluating concept explanation responses",
    rating_mode=RatingMode.FAST,
    generate=True,
    block=True,
)

# Print results
print(f"Response: {experiment.rated_responses[0].messages[-1].content}")
for rating in experiment.rated_responses[0].ratings:
    print(f"Criterion: {rating.criterion.criterion_str}")
    print(f"Rating: {rating.rating}")

Alternative Client Initialization

You can also initialize the client by directly passing the API key and/or base url:

client = Client(api_key="your-api-key", base_url="your-base-url")

Advanced Features

Batch Evaluation with Experiments

For evaluating prompts across multiple test cases, you can use experiments with collections:

from elluminate import Client
from elluminate.schemas import RatingMode

client = Client()

# Create a collection of template variables
collection, _ = client.collections.get_or_create(
    name="Math Teaching Test Cases",
    description="Various math concepts and grade levels"
)

# Add test cases to the collection
test_cases = [
    {"math_concept": "fractions", "grade_level": "5th grade"},
    {"math_concept": "algebra", "grade_level": "8th grade"},
    {"math_concept": "geometry", "grade_level": "6th grade"}
]

for test_case in test_cases:
    client.template_variables.add_to_collection(
        template_variables=test_case,
        collection=collection
    )

# Create a prompt template
template, _ = client.prompt_templates.get_or_create(
    "Explain {{math_concept}} to a {{grade_level}} student using simple examples.",
    name="Math Teaching Prompt"
)

# Generate evaluation criteria
client.criteria.get_or_generate_many(template)

# Create an experiment for this evaluation
experiment, _ = client.experiments.get_or_create(
    "Math Teaching Evaluation",
    prompt_template=template,
    collection=collection,
    description="Evaluating math explanations across different concepts and grade levels"
)

# Generate responses for all test cases
responses = client.responses.generate_many(
    prompt_template=template,
    experiment=experiment,
    collection=collection
)

# Rate all responses
for response in responses:
    ratings = client.ratings.rate(response, rating_mode=RatingMode.DETAILED)

    # Print results for each response
    variables = response.prompt.template_variables.input_values
    print(f"\nConcept: {variables['math_concept']}, Grade: {variables['grade_level']}")
    print(f"Response: {response.messages[-1].content[:100]}...")

    for rating in ratings:
        print(f"  • {rating.criterion.criterion_str}: {rating.rating}")

Additional Resources

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

elluminate-0.5.7.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elluminate-0.5.7-py3-none-any.whl (43.3 kB view details)

Uploaded Python 3

File details

Details for the file elluminate-0.5.7.tar.gz.

File metadata

  • Download URL: elluminate-0.5.7.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for elluminate-0.5.7.tar.gz
Algorithm Hash digest
SHA256 5425a45c47c19271c68e8003edcf9705a2b1fc7e2e30e825cb9899d09e4c4dc8
MD5 41ae39b327f82ab6b65f8f09dc1d0741
BLAKE2b-256 1207f3161fbaaa3833c2da32c6a5d88ea3dc6feb691b5ac7363cc825c019b59b

See more details on using hashes here.

File details

Details for the file elluminate-0.5.7-py3-none-any.whl.

File metadata

  • Download URL: elluminate-0.5.7-py3-none-any.whl
  • Upload date:
  • Size: 43.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for elluminate-0.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 21dcfa312d8601c8be1d9af331a1682ce709fd87a4d7473685f5591de1ddd8a5
MD5 9933f7467d4e3a06d5ad0f70a28a0d64
BLAKE2b-256 90b3eefcf7ae2877b966990336b26df8dc899a7bd2b0ff7a209fac76a54e6acd

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