Evaluation Core Types (evalcore/types.go)

observer · internal/evalcore/types.go · go · Apache-2.0
testing, ai, infra, lang:go, tag:embed-classified

Go data structures for tracing, scoring, and evaluating AI model outputs. Use when building LLM evaluation pipelines or observability tools.

// Source: https://github.com/superbasedapp/observer | License: Apache-2.0 | Copyright 2026 Gaja AI
// Provided via justclaw.it.com; keep this notice with the code.
package evalcore

import (
	"context"
)

// Sample is one unit to score: the span/trace identity, its content (input /
// output / reference, populated by the store seam from obs_span_content +
// dataset items, honoring the ContentGate), and content-free facts. A code
// scorer reads whichever fields it needs; a judge reads the text.
type Sample struct {
	ItemID    int64
	SpanID    string
	TraceID   string
	Input     string
	Output    string
	Reference string
	Facts     SpanFacts
}

// SpanFacts is the content-free side of a sample — always available even when
// raw bodies are gated off, so the facts-based scorers (status/lat

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key