Skip to main content

Add your description here

Project description

Twelve Angry LLMs

An extensible Python library for creating and using LLMs as judges. This library provides a framework for defining different types of judges, from those that return a simple score to those that provide a detailed, descriptive evaluation. It's designed to be modular, allowing you to easily connect or use different LLM providers like OpenAI, Hugging Face, or your own local models.

License: MIT Code style: ruff

Installation

pip install twelve-angry-llms

Usage

Here's how to use the DescriptiveJudge with the OpenAIProvider:

from twelve_angry_llms.providers.openai import OpenAIProvider
from twelve_angry_llms.judges.descriptive import DescriptiveJudge

# Make sure to set the OPENAI_API_KEY environment variable
openai_provider = OpenAIProvider()
descriptive_judge = DescriptiveJudge(llm_provider=openai_provider)

result = descriptive_judge.evaluate(
    generation="This is a test generation.",
    reference="This is a test reference.",
    context="This is a test context."
)

print(result.evaluation)

Contributing

Contributions are welcome! Please see the Contributing Guide for more information.

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

twelve_angry_llms-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

twelve_angry_llms-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file twelve_angry_llms-0.1.0.tar.gz.

File metadata

  • Download URL: twelve_angry_llms-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.10

File hashes

Hashes for twelve_angry_llms-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9185d3b6a5acccae55242d68523a3a815fa072446b15010147a503a2a94136b3
MD5 8f42367c7582a8c1076fc83fe37e27e3
BLAKE2b-256 b90bd084bd7212563f9ea2748291b9795dd7b32cb006b2e2571d3d7736e51511

See more details on using hashes here.

File details

Details for the file twelve_angry_llms-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for twelve_angry_llms-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b753d96bb67cc972994d2550825c571a81be79674d979860c654535d8acd6cc
MD5 0ea47985ab1454b9864418aaeddba842
BLAKE2b-256 aedf5c7b96c94943e9ca43ea78166aa28eb61c4280ce74e24ae184980ddf5265

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