config

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: 6 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

View Source
const (
	ConfigFileNameJudges          = "judges.yaml"
	ConfigDirConfigFileNameJudges = "configs/judges.yaml"
)

Configuration file search paths

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationConfig

type AggregationConfig struct {
	PrecheckWeight float64 `yaml:"precheck_weight"`
	JudgeWeight    float64 `yaml:"judge_weight"`
}

AggregationConfig contains weights for aggregating precheck and judge scores

type AnnotationLabel

type AnnotationLabel struct {
	Score       int    `yaml:"score"`
	Label       string `yaml:"label"`
	Description string `yaml:"description"`
}

AnnotationLabel defines a score label for human annotation (used in correlation analysis)

type Config

type Config struct {
	LLMJudge       LLMJudgeConfig                `yaml:"llm_judge"`
	EvaluationType string                        `yaml:"evaluation_type"`
	Judges         map[string]JudgeConfiguration `yaml:"judges"`
	Aggregation    AggregationConfig             `yaml:"aggregation"`
}

Config represents the complete evaluation configuration

type JudgeConfiguration

type JudgeConfiguration struct {
	Name        string       `yaml:"name"`
	Enabled     bool         `yaml:"enabled"`
	Description string       `yaml:"description"`
	Scope       string       `yaml:"scope,omitempty"` // "turn" (default) or "conversation"
	Prompt      string       `yaml:"prompt"`
	Model       *ModelConfig `yaml:"model,omitempty"`  // Optional override
	Weight      float64      `yaml:"weight,omitempty"` // Weight for this judge (0.0-1.0)
}

JudgeConfiguration defines a single judge configuration

type Judges

type Judges struct {
	DefaultModel ModelConfig          `yaml:"default_model"`
	Evaluators   []JudgeConfiguration `yaml:"evaluators"`
}

Judges contains default model config and list of evaluators

type JudgesConfig

type JudgesConfig struct {
	Judges Judges `yaml:"judges"`
}

JudgesConfig is the root configuration structure

func LoadJudgesConfig

func LoadJudgesConfig() (*JudgesConfig, error)

LoadJudgesConfig loads and validates the judges configuration from YAML Search priority:

  1. JUDGES_CONFIG_PATH env var (explicit override)
  2. ./judges.yaml (current working directory)
  3. ./configs/judges.yaml (configs folder in current working directory)

Returns error if no configuration file is found.

func (*JudgesConfig) Validate

func (cfg *JudgesConfig) Validate() error

type LLMJudgeConfig

type LLMJudgeConfig struct {
	Prompt           string            `yaml:"prompt"`
	AnnotationLabels []AnnotationLabel `yaml:"annotation_labels"`
}

LLMJudgeConfig contains the global evaluation prompt and annotation labels

type ModelConfig

type ModelConfig struct {
	ModelID     string  `yaml:"modelID,omitempty"`
	ModelFamily string  `yaml:"modelFamily,omitempty"`
	MaxTokens   int     `yaml:"max_tokens,omitempty"`
	Temperature float64 `yaml:"temperature,omitempty"`
	Retry       bool    `yaml:"retry,omitempty"`
}

ModelConfig defines LLM model parameters

Jump to

Keyboard shortcuts

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