evaluators

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package evaluators defines a set of Genkit Evaluators for popular use-cases

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureMetric

func ConfigureMetric(metric MetricConfig) ai.Evaluator

Types

type EvaluatorType

type EvaluatorType int

EvaluatorType is an enum used to indicate the type of evaluator being configured for use

const (
	EvaluatorDeepEqual EvaluatorType = iota
	EvaluatorRegex
	EvaluatorJsonata
)

func (EvaluatorType) String

func (ss EvaluatorType) String() string

type GenkitEval

type GenkitEval struct {
	Metrics []MetricConfig // Configs for individual metrics
	// contains filtered or unexported fields
}

GenkitEval is a Genkit plugin that provides evaluators

func (*GenkitEval) Init

func (ge *GenkitEval) Init(ctx context.Context) []api.Action

Init initializes the plugin.

func (*GenkitEval) Name

func (ge *GenkitEval) Name() string

type MetricConfig

type MetricConfig struct {
	MetricType EvaluatorType
}

MetricConfig provides configuration options for a specific metric. More Params (judge LLMs, etc.) could be configured by extending this struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL