Skip to main content

An open-source Python framework for evaluating LLM systems.

Project description

AlignEval

AlignEval is an open-source Python framework for evaluating LLM systems. It helps you measure accuracy, hallucination, relevancy, and safety across your RAG pipelines, agents, and custom chatbots.

Features

  • Async Evaluation: Evaluate multiple test cases concurrently for speed.
  • Pluggable Metrics: Use built-in metrics (Accuracy, Hallucination, Safety) or define your own.
  • Caching: Avoid re-running expensive evaluations with built-in caching.
  • Synthetic Data: Generate test cases using an LLM to bootstrap your evaluation dataset.
  • Pytest Integration: Run evaluations as part of your standard test suite.

Installation

pip install aligneval

Quick Start

import asyncio
from aligneval import Evaluator
from aligneval.metrics import Accuracy, Hallucination

async def main():
    evaluator = Evaluator()
    dataset = [
        {"input": "What is the capital of France?", "output": "Paris", "context": "France is a country in Europe. Its capital is Paris.", "expected": "Paris"},
        # ... more cases
    ]
    
    results = await evaluator.evaluate(
        dataset,
        metrics=[Accuracy(), Hallucination()]
    )
    
    print(results)

if __name__ == "__main__":
    asyncio.run(main())

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

aligneval-0.1.0.tar.gz (35.1 MB view details)

Uploaded Source

Built Distribution

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

aligneval-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aligneval-0.1.0.tar.gz
  • Upload date:
  • Size: 35.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for aligneval-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f399a6e52a0e7bfa6c77e9de6867deaadd25f97ec2b9b501a00704cd3d8abde9
MD5 c57807fd967e5e36981428f0c84c3ea6
BLAKE2b-256 227becd1bdff4103f1ba25dff1f3e85ad1e6f6e63aab33186533acdf4f2fccc9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aligneval-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for aligneval-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e689a60856121703790575c21fe1443d09d0b39908bf835ccc6c5b23ae7c721a
MD5 9e11680ab7a1822540e5c663b66d02b9
BLAKE2b-256 83fec3e7b6437f8a1e58973d5713a650a379d7989b039b6aac8bc3f21e435047

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