Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EvaluationResultSchema = map[string]any{ "type": "object", "properties": map[string]any{ "score": map[string]any{ "type": "integer", "description": "A score from 1 to 5, where 5 is an excellent, accurate, and helpful review, and 1 is a poor or misleading review.", "minimum": 1, "maximum": 5, }, "rationale": map[string]any{ "type": "string", "description": "A detailed explanation of why this score was given, referencing the rubric and the diff.", }, "findings": map[string]any{ "type": "array", "items": map[string]any{ "type": "string", }, "description": "Specific strengths or weaknesses identified in the review.", }, "met_rubric": map[string]any{ "type": "boolean", "description": "Whether the review successfully addressed the primary requirements of the rubric.", }, }, "required": []string{"score", "rationale", "findings", "met_rubric"}, }
EvaluationResultSchema is the JSON Schema for the Judge's output.
Functions ¶
This section is empty.
Types ¶
type CaseResult ¶
type CaseResult struct {
CaseID string `json:"case_id"`
CaseName string `json:"case_name"`
Subject EvaluationResult `json:"subject_result"`
Metrics core.SessionMetrics `json:"metrics"` // Subject metrics
Error string `json:"error,omitempty"`
}
CaseResult captures the outcome of running a single EvalCase.
type EvalCase ¶
type EvalCase struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
// Rubric is the specific criteria the Judge should use to score the review.
Rubric string `json:"rubric"`
// FixturePath is the relative path to the directory containing input.diff and base state.
// This is resolved relative to the suite manifest file.
FixturePath string `json:"fixture_path"`
// BaseSource optionally overrides the default 'base.tar.gz' or 'base/' directory
// resolution inside FixturePath.
BaseSource string `json:"base_source,omitempty"`
// DiffPath optionally overrides the default 'input.diff' inside FixturePath.
DiffPath string `json:"diff_path,omitempty"`
// Loaded data (not in manifest)
Diff string `json:"-"`
}
EvalCase represents a single evaluation scenario.
type EvaluationResult ¶
type EvaluationResult struct {
Score int `json:"score"` // 1-5 Scale
Rationale string `json:"rationale"` // Detailed explanation of the score
Findings []string `json:"findings"` // Specific observations
MetRubric bool `json:"met_rubric"` // Whether the review satisfied the core rubric
}
EvaluationResult is the structured output from the Judge.
type Runner ¶
type Runner struct {
SubjectConfig *config.Config // Configuration for the agent under test
Judge llm.Model // The model doing the evaluation
}
Runner orchestrates the evaluation process.
type Sandbox ¶
type Sandbox struct {
RootDir string
}
Sandbox provides a high-fidelity git environment for evaluating the agent.
func NewSandbox ¶
NewSandbox initializes a new git-backed sandbox. It copies or extracts files from baseState (if non-empty), initializes git, commits the base state, applies the diff, and commits the final state. baseState can be a directory path or a .tar.gz file path.
Click to show internal directories.
Click to hide internal directories.