Documentation
¶
Index ¶
Constants ¶
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:
- JUDGES_CONFIG_PATH env var (explicit override)
- ./judges.yaml (current working directory)
- ./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