Skip to main content
ell logo that inverts based on color scheme

Documentation Status Install Discord X (formerly Twitter) Follow

pip install -U "ell-ai[all]"

ell is a lightweight, functional prompt engineering framework built on a few core principles:

1. Prompts are programs, not strings.

Prompts aren't just strings; they are all the code that leads to strings being sent to a language model. In ell we think of one particular way of using a language model as a discrete subroutine called a language model program.

import ell

@ell.simple(model="gpt-4o")
def hello(world : str):
    """You are a helpful assistant that writes in lower case.""" # System Message
    return f"Say hello to {world[::-1]} with a poem."    # User Message

hello("sama")

alt text

2. Prompts are actually parameters of a machine learning model.

The process of prompt engineering involves many iterations, similar to the optimization processes in machine learning. Because LMPs are just functions, ell provides rich tooling for this process.

ell demonstration

ell provides automatic versioning and serialization of prompts through static and dynamic analysis and gpt-4o-mini autogenerated commit messages directly to a local store. This process is similar to checkpointing in a machine learning training loop, but it doesn't require any special IDE or editor - it's all done with regular Python code.

3. Tools for monitoring, versioning, and visualization

Prompt engineering goes from a dark art to a science with the right tools. Ell Studio is a local, open source tool for prompt version control, monitoring, visualization. With Ell Studio you can empiricize your prompt optimization process over time and catch regressions before it's too late.

ell studio demonstration
ell-studio --storage ./logdir 

4. Multimodality should be first class

LLMs can process and generate various types of content, including text, images, audio, and video. Prompt engineering with these data types should be as easy as it is with text.

from PIL import Image
import ell


@ell.simple(model="gpt-4o", temperature=0.1)
def describe_activity(image: Image.Image):
    return [
        ell.system("You are VisionGPT. Answer <5 words all lower case."),
        ell.user(["Describe what the person in the image is doing:", image])
    ]

# Capture an image from the webcam
describe_activity(capture_webcam_image()) # "they are holding a book"

ell demonstration

ell supports rich type coercion for multimodal inputs and outputs. You can use PIL images, audio, and other multimodal inputs inline in Message objects returned by LMPs.

...and much more!

Read more in the docs!

Installation

To install ell and ell studio, you can use pip. Follow these steps:

  1. Open your terminal or command prompt.

  2. Run the following command to install the ell-ai package from PyPI:

    pip install ell-ai[all]
    
  3. Verify the installation by checking the version of ell:

    python -c "import ell; print(ell.__version__)"
    

This will install both ell and ell studio on your system, allowing you to start using the tools for prompt engineering and visualization.

Next Steps

Explore the documentation to learn more about ell and its features. Follow the Getting Started guide to create your first Language Model Program. Join our Discord community to connect with other users and get support.

Metadata

Release files for ell-ai 0.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ell-ai 0.0.17
File Size Uploaded Provenance Actions
ell_ai-0.0.17.tar.gz 3.6 MB Without provenance Details for ell_ai-0.0.17.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ell-ai 0.0.17
File Interpreter ABI Platform Actions
ell_ai-0.0.17-py3-none-any.whl Python 3 none any Details for ell_ai-0.0.17-py3-none-any.whl

Total release size: 7.2 MB

Release files / ell_ai-0.0.17.tar.gz

Download URL ell_ai-0.0.17.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
2295853147add9a7094078e6f7201666dbe53bf5e509baac06fcecb0b173b1ac
BLAKE2b-256 checksum
How to use checksums
ed45320e115a552dd47de8a795970b012aafe7498273d5aa69d70aee7a017eb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.12.4 Darwin/24.3.0

Release files / ell_ai-0.0.17-py3-none-any.whl

Download URL ell_ai-0.0.17-py3-none-any.whl
Size 3.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7dc15658ea7d642d1a46691ac289aacfc95b120e2456f667ddc6a84afe5d2070
BLAKE2b-256 checksum
How to use checksums
03524b307105fe0e87580cbad53519c0fb79b21008fe978fd8884ae1d57ca73b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.12.4 Darwin/24.3.0

Security for ell-ai 0.0.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page