models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	Version string `json:"version"`
}

type ConversationEvaluationRequest

type ConversationEvaluationRequest struct {
	ConversationID string             `json:"conversation_id"` // Required
	Agent          Agent              `json:"agent"`
	Turns          []ConversationTurn `json:"turns"` // All turns in the conversation
}

ConversationEvaluationRequest is the API input for conversation-level evaluation.

type ConversationEvaluationResult

type ConversationEvaluationResult struct {
	ConversationID string                 `json:"conversation_id"`
	AgentName      string                 `json:"agent_name"`
	AgentVersion   string                 `json:"agent_version"`
	TurnCount      int                    `json:"turn_count"`
	TurnResults    []TurnEvaluationResult `json:"turn_results"`
	TurnAvg        float64                `json:"turn_avg"`
	HolisticScore  float64                `json:"holistic_score"`
	HolisticReason string                 `json:"holistic_reason"`
	FinalScore     float64                `json:"final_score"`
	Verdict        Verdict                `json:"verdict"`
	EvalErrors     []string               `json:"eval_errors,omitempty"`
}

ConversationEvaluationResult is the output of conversation-level evaluation.

type ConversationTurn

type ConversationTurn struct {
	TurnIndex      int    `json:"turn_index"`
	UserQuery      string `json:"user_query"`
	Answer         string `json:"answer"`
	Context        string `json:"context,omitempty"`
	ExpectedOutput string `json:"expected_output,omitempty"`
}

ConversationTurn represents a single turn in a multi-turn conversation.

type EvaluationContext

type EvaluationContext struct {
	RequestID      string             `json:"request_id"`
	ConversationID string             `json:"conversation_id"`
	AgentName      string             `json:"agent_name,omitempty"`
	AgentVersion   string             `json:"agent_version,omitempty"`
	Query          string             `json:"user_query"`
	Context        string             `json:"context,omitempty"`
	Answer         string             `json:"answer"`
	ExpectedOutput string             `json:"expected_output,omitempty"`
	Turns          []ConversationTurn `json:"turns,omitempty"`
	CreatedAt      time.Time          `json:"created_at"`
}

EvaluationContext is the normalized internal context passed to judges.

type QueryFilters

type QueryFilters struct {
	AgentName string
	Verdict   string
	Limit     int
	Offset    int
	Count     int
}

type StageResult

type StageResult struct {
	Name     string        `json:"name"`
	Score    float64       `json:"score"`
	Reason   string        `json:"reason"`
	Error    string        `json:"error,omitempty"`
	Duration time.Duration `json:"duration_ns"`
	Weight   float64       `json:"weight,omitempty"`
}

StageResult is a single judge's output.

type TurnEvaluationResult

type TurnEvaluationResult struct {
	TurnIndex int           `json:"turn_index"`
	UserQuery string        `json:"user_query"`
	Answer    string        `json:"answer"`
	Scores    []StageResult `json:"scores"`
	TurnScore float64       `json:"turn_score"` // average of Scores
}

TurnEvaluationResult holds the evaluation scores for a single conversation turn.

type Verdict

type Verdict string
const (
	VerdictPass   Verdict = "pass"
	VerdictFail   Verdict = "fail"
	VerdictReview Verdict = "review"
)

Jump to

Keyboard shortcuts

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