promptversion

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package promptversion tracks system prompt iterations for A/B testing and regression tracking across prompt changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PromptVersion

type PromptVersion struct {
	ID           id.PromptVersionID `json:"id" bun:"id,pk"`
	SuiteID      id.SuiteID         `json:"suite_id" bun:"suite_id,notnull"`
	Version      int                `json:"version" bun:"version,notnull"`
	SystemPrompt string             `json:"system_prompt" bun:"system_prompt,notnull"`
	Changelog    string             `json:"changelog,omitempty" bun:"changelog"`
	IsCurrent    bool               `json:"is_current" bun:"is_current,notnull,default:false"`
	RunID        string             `json:"run_id,omitempty" bun:"run_id"`
	PassRate     *float64           `json:"pass_rate,omitempty" bun:"pass_rate"`
	AvgScore     *float64           `json:"avg_score,omitempty" bun:"avg_score"`
	CreatedAt    time.Time          `json:"created_at" bun:"created_at,notnull,default:current_timestamp"`
}

PromptVersion represents a versioned system prompt for a suite.

type Store

type Store interface {
	CreatePromptVersion(ctx context.Context, pv *PromptVersion) error
	GetPromptVersion(ctx context.Context, pvID id.PromptVersionID) (*PromptVersion, error)
	ListPromptVersions(ctx context.Context, suiteID id.SuiteID) ([]*PromptVersion, error)
	GetCurrentPromptVersion(ctx context.Context, suiteID id.SuiteID) (*PromptVersion, error)
	SetCurrentPromptVersion(ctx context.Context, suiteID id.SuiteID, pvID id.PromptVersionID) error
}

Store defines persistence operations for prompt versions.

Jump to

Keyboard shortcuts

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