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.6.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.6.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: genkit_plugin_evaluators-0.6.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.6.0.tar.gz
Algorithm Hash digest
SHA256 1c3a9eaf0494592de0fe95190c9752b2bc9f5e87e1048c463c1e9eb60cdeb4ab
MD5 7008e401c780deb04afb25268d83c857
BLAKE2b-256 a4ce7ac6d27c9af515d249ebaf13544288106a8d9a6377bb8efff500b3c62572

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkit_plugin_evaluators-0.6.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.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for genkit_plugin_evaluators-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2cacc265b75804f081eed20274a0e839f6cb676c6e737664eb3df73845821678
MD5 2f8c5591324ab14e1a6e293f224867bf
BLAKE2b-256 d3c16913325757fa3404c845c87ee7de4646e07f30bade50fa066f42286e74ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkit_plugin_evaluators-0.6.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