Skip to main content

OpenTelemetry GenAI Evaluations

Project description

This package provides the base evaluation manager and builtin evaluators for opentelemetry-util-genai. It is loaded dynamically by the core GenAI telemetry utilities via the completion callback plugin mechanism.

Features

  • Evaluation Manager - Background processing of LLM and agent evaluations

  • Concurrent Processing - Multi-worker parallel evaluation for high throughput

  • Bounded Queue - Backpressure support to prevent memory exhaustion

  • Async Evaluation - Native async support for LLM-as-a-Judge evaluators

Concurrent Evaluation Mode

Enable concurrent processing for improved throughput with LLM-based evaluations:

# Enable concurrent mode with 4 workers
export OTEL_INSTRUMENTATION_GENAI_EVALS_CONCURRENT=true
export OTEL_INSTRUMENTATION_GENAI_EVALS_WORKERS=4

# Optional: Bounded queue for backpressure
export OTEL_INSTRUMENTATION_GENAI_EVALS_QUEUE_SIZE=100

Sequential Mode (Default):

  • Single worker thread processes evaluations one at a time

  • Guaranteed ordering of evaluation results

  • Lower resource consumption

Concurrent Mode:

  • Multiple worker threads with asyncio event loops

  • Parallel LLM API calls for faster evaluation throughput

  • Recommended for LLM-as-a-Judge evaluators (e.g., DeepEval)

Creating Custom Evaluators

Implement the Evaluator base class and optionally override async methods for native async support:

from opentelemetry.util.genai.evals.base import Evaluator, EvaluationResult

class MyEvaluator(Evaluator):
    @property
    def supports_async(self) -> bool:
        return True  # Enable native async evaluation

    async def evaluate_llm_async(self, invocation):
        # Your async evaluation logic
        return [EvaluationResult(name="my_metric", score=0.95)]

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

splunk_otel_util_genai_evals-0.1.6.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

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

splunk_otel_util_genai_evals-0.1.6-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file splunk_otel_util_genai_evals-0.1.6.tar.gz.

File metadata

File hashes

Hashes for splunk_otel_util_genai_evals-0.1.6.tar.gz
Algorithm Hash digest
SHA256 91d1ef30fbd138820b56063696d7263ae33772e64c8d452f00e62b740c0dc45a
MD5 298aa5a311f61bb3c21d2eb2dd7f58ec
BLAKE2b-256 aff1e2410e31fc3521b63832794542effe0b51ee3118dab4d419cfb53684342e

See more details on using hashes here.

File details

Details for the file splunk_otel_util_genai_evals-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for splunk_otel_util_genai_evals-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f54113dadb8d757375f2835b0631f5a4a5ae42e02427fcaf450830c5bfd4afbd
MD5 71486f7e5e0ead07a1fbf0749ba0abc2
BLAKE2b-256 2b58bebf48a702e56d2c56b086e4267af70542ea2685bcbf424b272b105f2a15

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