Skip to main content

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

uv add genkit-evaluators

Usage

from genkit import Genkit
from genkit.evaluator import BaseDataPoint
from genkit_evaluators import register_genkit_evaluators

ai = Genkit()
register_genkit_evaluators(ai)

results = await ai.evaluate(
    evaluator='genkitEval/regex',
    dataset=[
        BaseDataPoint(input='sample', output='banana', reference='ba?a?a'),
        BaseDataPoint(input='sample', output='apple', reference='ba?a?a'),
    ],
)

Or from the CLI:

genkit eval:run datasets/example.json --evaluators=genkitEval/regex

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genkit_evaluators-0.10.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

genkit_evaluators-0.10.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file genkit_evaluators-0.10.0.tar.gz.

File metadata

  • Download URL: genkit_evaluators-0.10.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for genkit_evaluators-0.10.0.tar.gz
Algorithm Hash digest
SHA256 d9b3fd0a338339dedf4fcab48ea485069589cfc31d9987341035a5dd2079b32f
MD5 c22533b7db701948100b022d859411a7
BLAKE2b-256 3c3f1ca99e8b531489834cd5560d3645bed4325ffcb4393c8c9a7950d4bba2c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkit_evaluators-0.10.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_evaluators-0.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for genkit_evaluators-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e026a1de1a99cce334dd27bf39a4e94f6021daca2530dd6903c1b83bad80faa1
MD5 ebcd00bf31d9bcc52da7468a0b3fa6d8
BLAKE2b-256 9ae2280cf6e1c8771ee6603113a7a9af8f7256c2ead63e47e0f0944fc05fa8f9

See more details on using hashes here.

Provenance

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

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 files

0.9.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page