Skip to main content

Genkit Evaluators Plugin (regex, deep_equal, jsonata)

Project description

Genkit Evaluators Plugin

Provides three rule-based evaluators matching the Go and JS implementations:

  • regex – Tests output against a regex pattern (reference = regex string)
  • deep_equal – Tests equality of output against reference
  • jsonata – Evaluates a JSONata expression (reference) against output; pass if result is truthy

No LLM or API keys required.

Installation

pip install genkit-plugin-evaluators

Usage

from genkit import Genkit
from genkit.plugins.evaluators import GenkitEval

ai = Genkit(plugins=[GenkitEval()])

# Run evaluation with genkit eval-flow or programmatically
evaluator = await ai.registry.resolve_evaluator('genkitEval/regex')
result = await evaluator.run(input={
    'dataset': [
        {'input': 'sample', 'output': 'banana', 'reference': 'ba?a?a'},
        {'input': 'sample', 'output': 'apple', 'reference': 'ba?a?a'},
    ],
    'evalRunId': 'test',
})

Evaluators

  • genkitEval/regex – Reference is a regex string. Output (stringified if needed) must match.
  • genkitEval/deep_equal – Reference is the expected value. Output must equal reference.
  • genkitEval/jsonata – Reference is a JSONata expression. Evaluated against output; pass if truthy.

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

genkit_plugin_evaluators-0.7.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

genkit_plugin_evaluators-0.7.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file genkit_plugin_evaluators-0.7.0.tar.gz.

File metadata

  • Download URL: genkit_plugin_evaluators-0.7.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for genkit_plugin_evaluators-0.7.0.tar.gz
Algorithm Hash digest
SHA256 763adcf54274cf8f962025b4ee26957fa5f5e6cae332fae4634ff6ebe27ee530
MD5 c0c3b7d5bccf036e17a0ff923c65b09d
BLAKE2b-256 9ce7a5462f020e0e841ee282509f927f231fa4b833cb53561ecde967291f8e85

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkit_plugin_evaluators-0.7.0.tar.gz:

Publisher: publish_python.yml on genkit-ai/genkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genkit_plugin_evaluators-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for genkit_plugin_evaluators-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc4a54e02543533e6593d8befd769f256548d8d57c4ff464dcc417b447a15fa1
MD5 ad5d6ad8fb1431608ba0c354487bed15
BLAKE2b-256 9ab5bb6edbd09c491f4df87c506261c66e883e1e6929db285ac435e084f5e5a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkit_plugin_evaluators-0.7.0-py3-none-any.whl:

Publisher: publish_python.yml on genkit-ai/genkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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