Documentation
¶
Overview ¶
Package evaluation is the future home for evaluator session/point runtime, benchmark orchestration, and bench UI/server implementation.
Index ¶
- Constants
- func AgentVersion(spans []*Span) string
- func EvalPointID(sample, harness, model string, gridPoint GridPoint, rep int) string
- func FormatGridPoint(point GridPoint) string
- func HasAttr(s *Span, key string) bool
- func IntAttr(s *Span, key string) int
- func LoadMultiple(dirs []string) (map[GroupKey][]EvalRunResult, error)
- func PrintDetailedTable(w io.Writer, rows []SampleModelRow)
- func PrintModelTable(w io.Writer, stats []ModelStats)
- func PrintProgression(w io.Writer, groups map[GroupKey][]EvalRunResult)
- func RegisterEvalFactories(br *toolregistry.BuiltinRegistry, deps EvalFactoryDeps)
- func RegisterEvalPointFactories(br *toolregistry.BuiltinRegistry, es *EvalState)
- func ReportSessionFactory(es *EvalSessionState) toolregistry.BuiltinFactory
- func RunPointFactory(es *EvalSessionState) toolregistry.BuiltinFactory
- func StrAttr(s *Span, key string) string
- func WriteCSV(path string, groups map[GroupKey][]EvalRunResult) error
- type AttrValue
- type CheckAgentVersionBuilder
- type CollectMetricsBuilder
- type CollectTraceTokensBuilder
- type Convergence
- type CreatePointDirBuilder
- type DiscoverSuiteSamplesBuilder
- type DumpConfigBuilder
- type EvalFactoryDeps
- type EvalMeta
- type EvalRunResult
- type EvalSessionState
- type EvalState
- type EvaluationArtifactBuilder
- type EvaluationModelStat
- type EvaluationPoint
- type EvaluationSampleStat
- type EvaluationSessionDetail
- type EvaluationSessionSummary
- type EvaluationToolSnapshot
- type EvaluationTrace
- type EvaluationTraceSpan
- type Event
- type ExpandEvalGridBuilder
- type GridPoint
- type GroupKey
- type Harness
- type InitEvalSessionBuilder
- type KeyValue
- type MaterializeEvalPointsBuilder
- type ModelStats
- type ParseSuiteConfigBuilder
- type PointContext
- type PointResult
- type RecordAgentCommitBuilder
- type RecordOracleResultBuilder
- type RecordPointFailureBuilder
- type ReportSessionBuilder
- type ReportSuiteSummaryBuilder
- type RunAgentBuilder
- type RunPointBuilder
- type RunProgression
- type Sample
- type SampleDocsBuilder
- type SampleModelRow
- type SessionResult
- type Span
- type SpanCtx
- type SuiteConfig
- type SuiteProfile
- type SummarizePointResultsBuilder
- type ToolProgression
- type ToolSnapshot
Constants ¶
const ( SignalEvaluationDataReady core.Signal = "EvaluationDataReady" SignalEvaluationMissing core.Signal = "EvaluationMissing" SignalEvaluationDenied core.Signal = "EvaluationDenied" )
const ( ArtifactTrace = "trace.ndjson" ArtifactMeta = "meta.json" ArtifactExperiment = "experiment.yaml" ArtifactResult = "result.json" ArtifactDocDir = "doc" )
Evaluator artifact file names. These form a contract between the evaluator (which writes them) and the bench API (which reads them). All artifacts are written under the per-point directory.
const ( SigAgentCommitRecorded core.Signal = "AgentCommitRecorded" SigConfigDumped core.Signal = "ConfigDumped" )
const ( SigOracleCheckPassed core.Signal = "OracleCheckPassed" SigOracleCheckFailed core.Signal = "OracleCheckFailed" SigTraceTokensCollected core.Signal = "TraceTokensCollected" SigAgentVersionChecked core.Signal = "AgentVersionChecked" SigAgentVersionMismatch core.Signal = "AgentVersionMismatch" SigResultsCollected core.Signal = "ResultsCollected" SigMetricsCollected core.Signal = "MetricsCollected" )
Signals emitted by the per-point evaluation commands.
const ( SigHarnessFinished core.Signal = "HarnessFinished" SigHarnessFailed core.Signal = "HarnessFailed" SigHarnessTimedOut core.Signal = "HarnessTimedOut" )
Signals emitted by the CLI tool.
const ( SigSuiteConfigParsed core.Signal = "SuiteConfigParsed" SigSuiteSamplesDiscovered core.Signal = "SuiteSamplesDiscovered" SigEvalGridExpanded core.Signal = "EvalGridExpanded" SigEvalSessionInitialized core.Signal = "EvalSessionInitialized" SigSuiteLoaded core.Signal = "SuiteLoaded" SigEvalPointsMaterialized core.Signal = "EvalPointsMaterialized" SigPointDone core.Signal = "PointDone" SigPointsCompleted core.Signal = "PointsCompleted" SigSessionReported core.Signal = "SessionReported" )
Session-level signals for the evaluator session machine.
const ( SigPointDirCreated core.Signal = "PointDirCreated" SigDocsPresent core.Signal = "SampleDocsPresent" SigDocsAbsent core.Signal = "SampleDocsAbsent" SigFailureRecorded core.Signal = "PointFailureRecorded" )
Signals emitted by atomic evaluator workspace preparation commands.
Variables ¶
This section is empty.
Functions ¶
func AgentVersion ¶
AgentVersion extracts gen_ai.agent.version from the first span that carries it.
func EvalPointID ¶
EvalPointID produces the directory name for a single evaluation point.
func FormatGridPoint ¶
FormatGridPoint returns a stable string representation for directory naming.
func LoadMultiple ¶
func LoadMultiple(dirs []string) (map[GroupKey][]EvalRunResult, error)
LoadMultiple loads and merges results from one or more session directories. Each directory should contain point subdirectories with meta.json files.
func PrintDetailedTable ¶
func PrintDetailedTable(w io.Writer, rows []SampleModelRow)
PrintDetailedTable writes per-(sample, model) rows with convergence counts.
func PrintModelTable ¶
func PrintModelTable(w io.Writer, stats []ModelStats)
PrintModelTable writes a model-level summary table.
func PrintProgression ¶
func PrintProgression(w io.Writer, groups map[GroupKey][]EvalRunResult)
PrintProgression writes per-run tool progression timelines.
func RegisterEvalFactories ¶
func RegisterEvalFactories(br *toolregistry.BuiltinRegistry, deps EvalFactoryDeps)
RegisterEvalFactories registers all evaluator builtin tool factories (session-level: parse_suite_config, discover_suite_samples, expand_eval_grid, init_eval_session, report_suite_summary, materialize_eval_points, run_point, report_session; per-point: create_point_dir, sample_docs, record_agent_commit, dump_config, run_agent, record_oracle_result, collect_trace_tokens, check_agent_version, summarize_point_results, record_point_failure, collect_metrics) into the provided registry.BuiltinRegistry. Session state is lazily initialized on first factory call.
func RegisterEvalPointFactories ¶ added in v0.20260724.1
func RegisterEvalPointFactories(br *toolregistry.BuiltinRegistry, es *EvalState)
RegisterEvalPointFactories registers the stateful critic-point words against an existing EvalState. Nested point registries use this hook alongside the unified declaration registry rather than rebuilding a name switch.
func ReportSessionFactory ¶
func ReportSessionFactory(es *EvalSessionState) toolregistry.BuiltinFactory
ReportSessionFactory creates a registry.BuiltinFactory for report_session.
func RunPointFactory ¶
func RunPointFactory(es *EvalSessionState) toolregistry.BuiltinFactory
RunPointFactory creates a registry.BuiltinFactory for run_point. Nested loop parameters (point_machine, point_tools, agent_name, max_iterations, success_state) are read from the tool declaration config block.
Types ¶
type AttrValue ¶
type AttrValue struct {
Type string `json:"Type"`
Value interface{} `json:"Value"`
}
AttrValue holds a typed attribute value.
type CheckAgentVersionBuilder ¶
type CheckAgentVersionBuilder struct {
ES *EvalState
}
CheckAgentVersionBuilder creates checkAgentVersionCmd instances.
func (*CheckAgentVersionBuilder) Build ¶
func (b *CheckAgentVersionBuilder) Build(_ core.Result) core.Command
func (*CheckAgentVersionBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *CheckAgentVersionBuilder) BuildReverser() core.Command
type CollectMetricsBuilder ¶
type CollectMetricsBuilder struct {
ES *EvalState
}
CollectMetricsBuilder creates collectMetricsCmd instances.
func (*CollectMetricsBuilder) Build ¶
func (b *CollectMetricsBuilder) Build(_ core.Result) core.Command
func (*CollectMetricsBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *CollectMetricsBuilder) BuildReverser() core.Command
type CollectTraceTokensBuilder ¶
type CollectTraceTokensBuilder struct {
ES *EvalState
}
CollectTraceTokensBuilder creates collectTraceTokensCmd instances.
func (*CollectTraceTokensBuilder) Build ¶
func (b *CollectTraceTokensBuilder) Build(_ core.Result) core.Command
func (*CollectTraceTokensBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *CollectTraceTokensBuilder) BuildReverser() core.Command
type Convergence ¶
type Convergence string
Convergence classifies how a run's tool metrics evolved.
const ( Clean Convergence = "CLEAN" Converged Convergence = "CONVERGED" Improving Convergence = "IMPROVING" Flat Convergence = "FLAT" Regressing Convergence = "REGRESSING" NoData Convergence = "NO_DATA" )
type CreatePointDirBuilder ¶
type CreatePointDirBuilder struct {
ES *EvalState
}
CreatePointDirBuilder creates createPointDirCmd instances.
func (*CreatePointDirBuilder) Build ¶
func (b *CreatePointDirBuilder) Build(_ core.Result) core.Command
func (*CreatePointDirBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *CreatePointDirBuilder) BuildReverser() core.Command
type DiscoverSuiteSamplesBuilder ¶
type DiscoverSuiteSamplesBuilder struct {
ES *EvalSessionState
}
DiscoverSuiteSamplesBuilder creates discoverSuiteSamplesCmd instances.
func (*DiscoverSuiteSamplesBuilder) Build ¶
func (b *DiscoverSuiteSamplesBuilder) Build(_ core.Result) core.Command
func (*DiscoverSuiteSamplesBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *DiscoverSuiteSamplesBuilder) BuildReverser() core.Command
type DumpConfigBuilder ¶
type DumpConfigBuilder struct {
ES *EvalState
}
DumpConfigBuilder creates dumpConfigCmd instances.
func (*DumpConfigBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *DumpConfigBuilder) BuildReverser() core.Command
type EvalFactoryDeps ¶
type EvalFactoryDeps struct {
Ctx context.Context
Registry *core.Registry
Stderr io.Writer
SuitePath string
OutputDir string
OllamaURL string
ChildAgentBinary string
CoreRoot string
Directory string
}
EvalFactoryDeps holds the dependencies needed by evaluator tool factories.
type EvalMeta ¶
type EvalMeta struct {
Harness string `json:"harness"`
Model string `json:"model"`
Sample string `json:"sample"`
GridParams map[string]interface{} `json:"grid_params"`
Repetition int `json:"repetition"`
ExitCode int `json:"exit_code"`
Duration time.Duration `json:"duration_ns"`
TestsPassed bool `json:"tests_passed"`
TestOutput string `json:"test_output"`
TimedOut bool `json:"timed_out"`
FailureStage string `json:"failure_stage,omitempty"`
FailureCause string `json:"failure_cause,omitempty"`
}
EvalMeta records metadata for a single evaluation point.
type EvalRunResult ¶
type EvalRunResult struct {
Sample string
Model string
Repetition int
TestsPassed bool
ExitCode int
TimedOut bool
Iterations int
TokensIn int
TokensOut int
Duration time.Duration
Progression *RunProgression
}
EvalRunResult holds all metrics and analysis for a single evaluation run.
type EvalSessionState ¶
type EvalSessionState struct {
EvalState
// Configured from CLI flags / tool YAML config
SuitePath string
OutputDir string
Reps int
Timeout time.Duration
OllamaURL string
// ChildAgentBinary overrides the harness binary the evaluator launches for
// each suite profile. Empty means the default "agent" (resolved from PATH).
ChildAgentBinary string
CoreRoot string
Suite SuiteConfig
SessionDir string
PointMachine string
Result SessionResult
Stderr io.Writer
// contains filtered or unexported fields
}
EvalSessionState holds session-level state for the evaluator session machine. It extends EvalState (which holds the per-point PC) with suite configuration, grid iteration, and result accumulation.
func (*EvalSessionState) ExpandGrid ¶
func (s *EvalSessionState) ExpandGrid()
ExpandGrid materializes the suite's grid into iteration points.
func (*EvalSessionState) FinalizeSession ¶
func (s *EvalSessionState) FinalizeSession()
FinalizeSession sets the total duration on the result.
func (*EvalSessionState) InitSession ¶
func (s *EvalSessionState) InitSession(outputDir string, reps int, timeout time.Duration, ollamaURL string, llmTimeout time.Duration) error
InitSession prepares the session for iteration. Must be called after Suite is populated, samples are discovered, and the grid has been expanded.
func (*EvalSessionState) RecordPoint ¶
func (s *EvalSessionState) RecordPoint(pc *PointContext)
RecordPoint records a completed point's results into the session accumulator.
type EvalState ¶
type EvalState struct {
PC *PointContext
Ctx context.Context
}
EvalState holds shared mutable state for eval tools, analogous to pipeline.State for pipeline tools. The run_point tool sets PC before each point's nested loop runs.
type EvaluationArtifactBuilder ¶ added in v0.20260726.0
EvaluationArtifactBuilder constructs one read-only query over evaluator artifacts. It contains no HTTP routing or profile workflow policy.
type EvaluationModelStat ¶ added in v0.20260726.0
type EvaluationModelStat struct {
Model string `json:"model"`
Runs int `json:"runs"`
Successes int `json:"successes"`
SuccessRate float64 `json:"successRate"`
CleanRate float64 `json:"cleanRate"`
RecoveryRate float64 `json:"recoveryRate"`
StuckRate float64 `json:"stuckRate"`
MeanIter float64 `json:"meanIter"`
MeanTokensIn float64 `json:"meanTokensIn"`
MeanTokensOut float64 `json:"meanTokensOut"`
MeanDurationS float64 `json:"meanDurationS"`
}
type EvaluationPoint ¶ added in v0.20260726.0
type EvaluationPoint struct {
PointID string `json:"pointId"`
Sample string `json:"sample"`
Model string `json:"model"`
TestsPassed bool `json:"testsPassed"`
TimedOut bool `json:"timedOut"`
ExitCode int `json:"exitCode"`
DurationS float64 `json:"durationS"`
Iterations int `json:"iterations"`
TokensIn int `json:"tokensIn"`
TokensOut int `json:"tokensOut"`
Convergence string `json:"convergence"`
}
func ListEvaluationPoints ¶ added in v0.20260726.0
func ListEvaluationPoints(dataDir, suite, timestamp string) ([]EvaluationPoint, error)
type EvaluationSampleStat ¶ added in v0.20260726.0
type EvaluationSessionDetail ¶ added in v0.20260726.0
type EvaluationSessionDetail struct {
ID string `json:"id"`
ModelStats []EvaluationModelStat `json:"modelStats"`
SampleStats []EvaluationSampleStat `json:"sampleStats"`
TotalPoints int `json:"totalPoints"`
TotalPassed int `json:"totalPassed"`
TotalFailed int `json:"totalFailed"`
TotalTimedOut int `json:"totalTimedOut"`
}
func AnalyzeEvaluationSession ¶ added in v0.20260726.0
func AnalyzeEvaluationSession(dataDir, suite, timestamp string) (EvaluationSessionDetail, error)
type EvaluationSessionSummary ¶ added in v0.20260726.0
type EvaluationSessionSummary struct {
ID string `json:"id"`
Name string `json:"name"`
Timestamp string `json:"timestamp"`
PointCount int `json:"pointCount"`
PassCount int `json:"passCount"`
FailCount int `json:"failCount"`
TimeoutCount int `json:"timeoutCount"`
}
func ListEvaluationSessions ¶ added in v0.20260726.0
func ListEvaluationSessions(dataDir string) ([]EvaluationSessionSummary, error)
type EvaluationToolSnapshot ¶ added in v0.20260726.0
type EvaluationTrace ¶ added in v0.20260726.0
type EvaluationTrace struct {
PointID string `json:"pointId"`
Spans []EvaluationTraceSpan `json:"spans"`
Snapshots []EvaluationToolSnapshot `json:"snapshots"`
}
func ReadEvaluationTrace ¶ added in v0.20260726.0
func ReadEvaluationTrace(dataDir, suite, timestamp, pointID string) (EvaluationTrace, error)
type EvaluationTraceSpan ¶ added in v0.20260726.0
type EvaluationTraceSpan struct {
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
DurationMs float64 `json:"durationMs"`
ToolName string `json:"toolName,omitempty"`
Signal string `json:"signal,omitempty"`
TokensIn int `json:"tokensIn,omitempty"`
TokensOut int `json:"tokensOut,omitempty"`
}
type Event ¶
type Event struct {
Name string `json:"Name"`
Attributes []KeyValue `json:"Attributes"`
Time time.Time `json:"Time"`
}
Event is a span event with attributes.
type ExpandEvalGridBuilder ¶
type ExpandEvalGridBuilder struct {
ES *EvalSessionState
}
ExpandEvalGridBuilder creates expandEvalGridCmd instances.
func (*ExpandEvalGridBuilder) Build ¶
func (b *ExpandEvalGridBuilder) Build(_ core.Result) core.Command
func (*ExpandEvalGridBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *ExpandEvalGridBuilder) BuildReverser() core.Command
type GridPoint ¶
type GridPoint map[string]interface{}
GridPoint is a single point in the parameter space.
type InitEvalSessionBuilder ¶
type InitEvalSessionBuilder struct {
ES *EvalSessionState
}
InitEvalSessionBuilder creates initEvalSessionCmd instances.
func (*InitEvalSessionBuilder) Build ¶
func (b *InitEvalSessionBuilder) Build(_ core.Result) core.Command
func (*InitEvalSessionBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *InitEvalSessionBuilder) BuildReverser() core.Command
type MaterializeEvalPointsBuilder ¶ added in v0.20260730.0
type MaterializeEvalPointsBuilder struct {
ES *EvalSessionState
}
MaterializeEvalPointsBuilder creates the complete deterministic point collection.
type ModelStats ¶
type ModelStats struct {
Model string
Runs int
Successes int
SuccessRate float64
CleanRate float64
RecoveryRate float64
StuckRate float64
MeanIter float64
MeanTokensIn float64
MeanTokensOut float64
MeanDuration time.Duration
}
ModelStats aggregates convergence metrics across all runs of a model.
func ComputeModelStats ¶
func ComputeModelStats(groups map[GroupKey][]EvalRunResult) []ModelStats
ComputeModelStats builds model-level statistics from grouped results.
type ParseSuiteConfigBuilder ¶
type ParseSuiteConfigBuilder struct {
ES *EvalSessionState
}
ParseSuiteConfigBuilder creates parseSuiteConfigCmd instances.
func (*ParseSuiteConfigBuilder) Build ¶
func (b *ParseSuiteConfigBuilder) Build(_ core.Result) core.Command
func (*ParseSuiteConfigBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *ParseSuiteConfigBuilder) BuildReverser() core.Command
type PointContext ¶
type PointContext struct {
SessionDir string
PointID string
Sample Sample
Harness Harness
Model string
ProfilePath string
CoreRoot string
GridPoint GridPoint
Rep int
Timeout time.Duration
LLMTimeout time.Duration
OllamaURL string
Stderr io.Writer
// Populated during execution
PointDir string
TracePath string
ResultPath string
AgentCommit string
Tokens int
TestsPassed bool
TestOutput string
TraceVersion string
VersionMismatch bool
TimedOut bool
ExitCode int
Duration time.Duration
FailureStage string
FailureCause string
}
PointContext holds shared mutable state for a single evaluation point. All per-point commands read and write through this struct.
type PointResult ¶
type PointResult struct {
PointID string
Sample string
Harness string
Model string
TestsPassed bool
TimedOut bool
ExitCode int
Tokens int
Duration time.Duration
}
PointResult captures the result of a single evaluation point.
type RecordAgentCommitBuilder ¶ added in v0.20260724.1
type RecordAgentCommitBuilder struct {
ES *EvalState
}
RecordAgentCommitBuilder maps a configured rev_parse result into point state.
func (*RecordAgentCommitBuilder) Build ¶ added in v0.20260724.1
func (b *RecordAgentCommitBuilder) Build(res core.Result) core.Command
func (*RecordAgentCommitBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *RecordAgentCommitBuilder) BuildReverser() core.Command
type RecordOracleResultBuilder ¶ added in v0.20260724.1
type RecordOracleResultBuilder struct {
ES *EvalState
}
RecordOracleResultBuilder maps the configured oracle exec result into point state.
func (*RecordOracleResultBuilder) Build ¶ added in v0.20260724.1
func (b *RecordOracleResultBuilder) Build(res core.Result) core.Command
func (*RecordOracleResultBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *RecordOracleResultBuilder) BuildReverser() core.Command
type RecordPointFailureBuilder ¶ added in v0.20260730.0
type RecordPointFailureBuilder struct {
ES *EvalState
}
RecordPointFailureBuilder projects a failed result into point state.
func (*RecordPointFailureBuilder) Build ¶ added in v0.20260730.0
func (b *RecordPointFailureBuilder) Build(res core.Result) core.Command
func (*RecordPointFailureBuilder) BuildReverser ¶ added in v0.20260730.0
func (b *RecordPointFailureBuilder) BuildReverser() core.Command
type ReportSessionBuilder ¶
type ReportSessionBuilder struct {
ES *EvalSessionState
}
ReportSessionBuilder creates reportSessionCmd instances.
func (*ReportSessionBuilder) Build ¶
func (b *ReportSessionBuilder) Build(_ core.Result) core.Command
func (*ReportSessionBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *ReportSessionBuilder) BuildReverser() core.Command
type ReportSuiteSummaryBuilder ¶
type ReportSuiteSummaryBuilder struct {
ES *EvalSessionState
}
ReportSuiteSummaryBuilder creates reportSuiteSummaryCmd instances.
type RunAgentBuilder ¶
type RunAgentBuilder struct {
ES *EvalState
}
RunAgentBuilder creates runAgentCmd instances using the PointContext and tool configuration from EvalState.
func (*RunAgentBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *RunAgentBuilder) BuildReverser() core.Command
type RunPointBuilder ¶
type RunPointBuilder struct {
ES *EvalSessionState
PointRegistry *core.Registry
Config catalog.RunPointConfig
}
RunPointBuilder creates runPointCmd instances.
func (*RunPointBuilder) BuildReverser ¶ added in v0.20260726.0
func (b *RunPointBuilder) BuildReverser() core.Command
type RunProgression ¶
type RunProgression struct {
Tools []ToolProgression `json:"tools"`
Overall Convergence `json:"overall"`
Summary string `json:"summary"`
}
RunProgression holds the full progression analysis for a single run.
func Classify ¶
func Classify(snapshots []ToolSnapshot, succeeded bool) RunProgression
Classify analyzes the sequence of tool snapshots from a run and returns a RunProgression with convergence classification.
type Sample ¶
Sample represents a discovered evaluation sample.
func DiscoverSamples ¶
DiscoverSamples finds evaluation samples in the given directory. Each sample is a subdirectory containing a prompt.yaml and a workspace/ dir.
type SampleDocsBuilder ¶ added in v0.20260730.0
type SampleDocsBuilder struct {
ES *EvalState
}
SampleDocsBuilder exposes optional-docs presence and copy parameters.
type SampleModelRow ¶
type SampleModelRow struct {
Sample string
Model string
Runs int
SuccessRate float64
MeanIter float64
MeanTokens float64
MeanDuration time.Duration
Convergences map[Convergence]int
}
SampleModelRow is a per-(sample, model) row with progression data.
func ComputeDetailed ¶
func ComputeDetailed(groups map[GroupKey][]EvalRunResult) []SampleModelRow
ComputeDetailed builds per-(sample, model) rows.
type SessionResult ¶
type SessionResult struct {
TotalPoints int
Passed int
Failed int
TimedOut int
Duration time.Duration
Points []PointResult
}
SessionResult holds the outcome of an evaluation session.
type Span ¶
type Span struct {
Name string `json:"Name"`
SpanContext SpanCtx `json:"SpanContext"`
Parent SpanCtx `json:"Parent"`
StartTime time.Time `json:"StartTime"`
EndTime time.Time `json:"EndTime"`
Attributes []KeyValue `json:"Attributes"`
Events []Event `json:"Events"`
}
Span mirrors the Go SDK stdouttrace NDJSON format.
func ParseNDJSON ¶
ParseNDJSON extracts spans from NDJSON-encoded trace data.
func ReadTraceFile ¶
ReadTraceFile parses an NDJSON trace file into spans.
type SpanCtx ¶
type SpanCtx struct {
SpanID string `json:"SpanID"`
}
SpanCtx holds the span identifier.
type SuiteConfig ¶
type SuiteConfig struct {
Name string `yaml:"name"`
Profiles []SuiteProfile `yaml:"-"`
Grid map[string][]any `yaml:"grid,omitempty"`
SamplesDir string `yaml:"-"`
Samples []Sample `yaml:"-"`
Timeout time.Duration `yaml:"-"`
OllamaURL string `yaml:"-"`
Reps int `yaml:"-"`
}
SuiteConfig defines a complete evaluation suite.
func LoadSuite ¶
func LoadSuite(path string) (SuiteConfig, error)
LoadSuite reads a suite YAML file and resolves its samples.
func ParseSuite ¶
func ParseSuite(data []byte, baseDir string) (SuiteConfig, error)
ParseSuite parses suite YAML and resolves samples relative to baseDir.
func ParseSuiteConfig ¶
func ParseSuiteConfig(data []byte, baseDir string) (SuiteConfig, error)
ParseSuiteConfig parses suite YAML and validates metadata without discovering samples. Runtime evaluator machines compose sample discovery as a separate word after this parser.
type SuiteProfile ¶
type SuiteProfile struct {
Path string `yaml:"path"`
Name string `yaml:"-"`
Model string `yaml:"-"`
Binary string `yaml:"-"`
Profile catalog.AgentProfile `yaml:"-"`
}
SuiteProfile is a resolved profile entry in a suite configuration. It bundles the profile path with derived metadata for labeling.
type SummarizePointResultsBuilder ¶
type SummarizePointResultsBuilder struct {
ES *EvalState
}
SummarizePointResultsBuilder creates summarizePointResultsCmd instances.
type ToolProgression ¶
type ToolProgression struct {
Tool string `json:"tool"`
Snapshots []ToolSnapshot `json:"snapshots"`
Convergence Convergence `json:"convergence"`
Timeline string `json:"timeline"`
}
ToolProgression tracks per-tool metrics evolution within a run.
type ToolSnapshot ¶
type ToolSnapshot struct {
Tool string `json:"tool"`
Signal string `json:"signal"`
Total int `json:"total"`
Passed int `json:"passed"`
Failed int `json:"failed"`
}
ToolSnapshot captures the state of a tool at a single invocation point.
func ExtractToolSnapshots ¶
func ExtractToolSnapshots(spans []*Span) []ToolSnapshot
ExtractToolSnapshots returns a chronological sequence of tool invocation snapshots from trace spans. Prefers structured tool.metrics.* attributes and falls back to text parsing for legacy traces.
Source Files
¶
- artifact_query.go
- doc.go
- eval_artifacts.go
- eval_builders.go
- eval_clitool.go
- eval_config.go
- eval_convergence.go
- eval_dumpconfig.go
- eval_factories.go
- eval_load_suite.go
- eval_meta.go
- eval_metrics.go
- eval_pointcontext.go
- eval_points.go
- eval_report.go
- eval_report_session.go
- eval_results.go
- eval_run_point.go
- eval_session.go
- eval_session_state.go
- eval_tools.go
- eval_trace.go
- eval_undo.go