🎉 Agent Skills are now supported for Regtrace!
RegtraceRegtrace

Golden Set Reference

Complete schema for golden set YAML files

Synopsis

Golden sets define evaluation test cases in YAML format. Each file is loaded by a golden_sets entry in regtrace.config.yaml.

File-level fields

FieldTypeRequiredDefaultDescription
namestringYes—Human-readable identifier
versionstringYes—Semantic version (e.g. "1.0.0")
descriptionstringYes—What this golden set evaluates
interaction_typestringYes—single_turn or rag
tagsstring[]Yes[]For filtering during runs
authorstringYes—Who created this set
created_atstring (date)Yes—ISO 8601 date
updated_atstring (date)Yes—ISO 8601 date
test_casesarrayYes—Array of test case objects

Test case fields

FieldTypeRequiredDefaultDescription
idstringYes—Unique within golden set, stable across versions
descriptionstringYes—One-line summary of what this tests
inputstringYes—Prompt or user message sent to the model
system_promptstring or nullYes—System instruction in effect during generation
expected_outputstringYes—Ground truth ideal response
actual_outputstring or nullYes—Model's actual output; null at authoring time
metricsstring[]Yes—Metrics to evaluate (e.g. [factuality, format])
tagsstring[]Yes[]Case-level tags for filtering
weightnumberYes1Relative importance in suite scoring
thresholdsobjectNo{}Per-metric threshold overrides

Threshold overrides

- id: qa-001
  input: "..."
  expected_output: "..."
  metrics: [factuality, format, tone]
  thresholds:
    factuality: 0.9

This overrides the global default_threshold for factuality on this case.

RAG test case fields

RAG test cases (when interaction_type: rag) require a context block:

- id: rag-001
  input: "What is the API rate limit?"
  context:
    documents:
      - source: "docs/api-reference.md"
        content: "The API rate limit is 500 requests per minute."
        retrieval_score: 0.94
  expected_output: "500 requests per minute"
  actual_output: null

Context document fields

FieldTypeRequiredDefaultDescription
sourcestringYes—Document identifier (URL, file path)
contentstringYes—The retrieved text
retrieval_scorenumberNo—Retriever similarity score

Validation rules

  • id must be unique within the file
  • metrics values must be recognized metric names (factuality, format, tone, regression)
  • interaction_type must be single_turn or rag
  • RAG test cases must have a non-null context with at least one document
  • weight must be a positive number
  • thresholds keys must match metric names

If any validation rule is violated, Regtrace exits with a specific error message identifying the file and the exact problem.

On this page