Skip to main content

Evaluation framework for LLM Workers

Project description

llm-workers-evaluation

Evaluation framework for LLM Workers.

Overview

llm-workers-evaluation provides tools for running evaluation suites against LLM scripts and reporting scores.

  • llm-workers-evaluate: CLI tool for running evaluation suites

Installation

pip install llm-workers-evaluation

This will install llm-workers (core) as a dependency.

Usage

Running Evaluations

# Basic usage
llm-workers-evaluate my-script.yaml my-suite.yaml

# With custom iteration count
llm-workers-evaluate -n 5 my-script.yaml my-suite.yaml

# With verbose output
llm-workers-evaluate --verbose my-script.yaml my-suite.yaml

# With debug mode
llm-workers-evaluate --debug my-script.yaml my-suite.yaml

Evaluation Suite Format

Evaluation suites are YAML files defining tests that return scores between 0.0 and 1.0:

shared:
  data:
    expected: "hello"
  tools: []

iterations: 10

suites:
  basic:
    data: {}
    tools: []
    tests:
      always-pass:
        do:
          eval: 1.0
      always-fail:
        do:
          eval: 0.0
      conditional:
        data:
          value: "hello"
        do:
          eval: "${1.0 if value == expected else 0.0}"

Output Format

Results are output as YAML:

final_score: 0.75
per_suite:
  basic:
    final_score: 0.75
    per_test:
      always-pass: 1.0
      always-fail: 0.0
      conditional: 1.0

Score Handling

  • Tests must return a float between 0.0 and 1.0
  • None results are treated as 0.0
  • Non-numeric results are treated as 0.0
  • Scores below 0.0 are clamped to 0.0
  • Scores above 1.0 are clamped to 1.0
  • Exceptions during test execution result in 0.0 for that iteration

Data and Tool Merging

Data and tools are merged in order: shared -> suite -> test

  • For data: later values override earlier ones
  • For tools: lists are concatenated

Documentation

Full documentation: https://mrbagheera.github.io/llm-workers/

License

See main repository for license 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

llm_workers_evaluation-1.1.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

llm_workers_evaluation-1.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file llm_workers_evaluation-1.1.0.tar.gz.

File metadata

  • Download URL: llm_workers_evaluation-1.1.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.4 Darwin/23.6.0

File hashes

Hashes for llm_workers_evaluation-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c7dbaaba4d0cd934676ea473b9e3be475b2488fba17a1b08166b4e015d7dcf48
MD5 40ef6fc77342cddbe723b0fa226f7f73
BLAKE2b-256 e219e43d53d94dc510c8d768cf393355e7bc2f9274f615110b4a3c5db3167a00

See more details on using hashes here.

File details

Details for the file llm_workers_evaluation-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_workers_evaluation-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d377f0915529922fb5ca5533c4ec1478e10f3d0e6d7e3895f656a4aa6b9307e6
MD5 746c11f58059940491766384615df37c
BLAKE2b-256 77f863677ef06e1a265c0cdbc728caedaf0d88f6bbb07157daeb2c97e77b65b5

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