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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for genkit_plugin_evaluators-0.6.0rc1.tar.gz
Algorithm Hash digest
SHA256 d799d528d4418b5cd4fe2f3bfe50cce6a7a433eec81ce0aeb90b44c0055b9bdb
MD5 e22f02f2e86602acd3fb81f0dc8eda2c
BLAKE2b-256 f63913b0b78deab557ef8811c8cd473f58964f186f2000c1517bbf7ee2c6f35c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for genkit_plugin_evaluators-0.6.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 b0da04dcbcdeace0c0bc9ec58c9a95c2e5d7272b7c9e3e936c45fc3398e4b8db
MD5 e4527f42cce0e1d71334da4f330dfbbf
BLAKE2b-256 86cd6ab6c29b7fbf510d1cccdb4a89073be592c12477d7ff5a523de55384b198

See more details on using hashes here.

Provenance

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