evaluation

package
v0.0.0-...-ac4fcd6 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateEvaluationStats

func CalculateEvaluationStats(result *types.EvaluationResult)

func CalculateRunSummary

func CalculateRunSummary(r *types.EvaluationRun)

func CalculateScore

func CalculateScore(expected types.ExpectedResults, actual []types.Issue) float64

func ComparePrompts

func ComparePrompts(resultsDir string) error

func CompareResults

func CompareResults(resultsDir string) error

func LoadConfigs

func LoadConfigs(path string) ([]types.EvaluationConfig, error)

func LoadSuite

func LoadSuite(path string) (*types.EvaluationSuite, error)

func PrintEvaluationSummary

func PrintEvaluationSummary(r *types.EvaluationResult)

func PrintMultiRunProgress

func PrintMultiRunProgress(runNum, totalRuns int)

func PrintRunHeader

func PrintRunHeader(modelName, promptVariant string, numRuns int)

func PrintSummary

func PrintSummary(r *types.EvaluationRun)

func PrintTestResult

func PrintTestResult(result *types.TestCaseResult, err error)

func SaveEvaluationResults

func SaveEvaluationResults(resultsDir string, result *types.EvaluationResult) error

func ValidateConfig

func ValidateConfig(config types.EvaluationConfig) error

func ValidateConfigs

func ValidateConfigs(configs []types.EvaluationConfig) error

func WarmUpModel

func WarmUpModel(modelConfig llm.ProviderConfig) error

WarmUpModel pre-loads the model by making a simple request to avoid initial loading time in evaluation

Types

type ComparisonResult

type ComparisonResult struct {
	Model         string
	PromptVariant string
	Runs          int
	AvgScore      float64
	StdDev        float64
	SuccessRate   float64
	AvgDuration   float64
}

type EvaluationConfig

type EvaluationConfig = types.EvaluationConfig

type EvaluationRun

type EvaluationRun = types.EvaluationRun

type Evaluator

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

func NewEvaluator

func NewEvaluator(suitePath string, resultsDir string) (*Evaluator, error)

func (*Evaluator) RunEvaluation

func (e *Evaluator) RunEvaluation(modelConfig llm.ProviderConfig, serverName string, promptVariant string, numRuns int) (*types.EvaluationResult, error)

func (*Evaluator) SaveEvaluationResults

func (e *Evaluator) SaveEvaluationResults(result *types.EvaluationResult) error

type ModelServerConfig

type ModelServerConfig struct {
	Name      string `json:"name"`
	ModelPath string `json:"model_path"`
	BaseURL   string `json:"base_url"`
	Port      int    `json:"port"`
}

type ServerConfig

type ServerConfig = types.ServerConfig

type ServerManager

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

func NewServerManager

func NewServerManager(llamaServerPath string, port int, extraArgs ...string) *ServerManager

func (*ServerManager) IsRunning

func (sm *ServerManager) IsRunning() bool

func (*ServerManager) StartServer

func (sm *ServerManager) StartServer(modelPath string) error

func (*ServerManager) StopServer

func (sm *ServerManager) StopServer()

type TestCaseResult

type TestCaseResult = types.TestCaseResult

Jump to

Keyboard shortcuts

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