judge

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Judge

type Judge interface {
	Name() string
	Evaluate(ctx context.Context, evaluationContext models.EvaluationContext) models.StageResult
}

type JudgePool

type JudgePool struct {
	// contains filtered or unexported fields
}

JudgePool builds and manages a collection of judges from configuration

func NewJudgePool

func NewJudgePool(registry *llm.LLMClientRegistry, logger *zerolog.Logger) *JudgePool

NewJudgePool creates a new judge pool builder

func (*JudgePool) BuildHolisticJudgeFromConfig

func (p *JudgePool) BuildHolisticJudgeFromConfig(cfg *config.JudgesConfig) (Judge, error)

BuildHolisticJudgeFromConfig builds the single holistic conversation judge (scope: "conversation"). Returns the first enabled conversation-scoped judge.

func (*JudgePool) BuildTurnJudgesFromConfig

func (p *JudgePool) BuildTurnJudgesFromConfig(cfg *config.JudgesConfig) ([]Judge, error)

BuildTurnJudgesFromConfig builds per-turn judges (scope: "turn").

type JudgeRunner

type JudgeRunner struct {
	Judges []Judge
	// contains filtered or unexported fields
}

func NewJudgeRunner

func NewJudgeRunner(judges []Judge, logger *zerolog.Logger) *JudgeRunner

func (*JudgeRunner) Run

func (c *JudgeRunner) Run(ctx context.Context, evaluationContext models.EvaluationContext) []models.StageResult

type LLMJudge

type LLMJudge struct {
	// contains filtered or unexported fields
}

LLMJudge is a generic judge implementation that uses LLM with configurable prompts.

func NewLLMJudge

func NewLLMJudge(
	judgeCfg config.JudgeConfiguration,
	llmClient llm.LLMClient,
	logger *zerolog.Logger,
) (*LLMJudge, error)

func (*LLMJudge) Evaluate

Evaluate executes the judge evaluation

func (*LLMJudge) Name

func (j *LLMJudge) Name() string

Name returns the judge's name

Jump to

Keyboard shortcuts

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