Documentation
¶
Index ¶
- func BuildJudgePrompt(skillContent string, rubric []Dimension) string
- func FormatJSON(resp *JudgeResponse) (string, error)
- func FormatTable(resp *JudgeResponse) string
- func ValidateDimensionResult(result DimensionResult, rubric []Dimension) bool
- func ValidateJudgeResponse(resp *JudgeResponse, rubric []Dimension) []string
- type Dimension
- type DimensionResult
- type JudgeOptions
- type JudgeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildJudgePrompt ¶
BuildJudgePrompt constructs the system prompt for the LLM judge.
func FormatJSON ¶
func FormatJSON(resp *JudgeResponse) (string, error)
FormatJSON renders the judge response as indented JSON.
func FormatTable ¶
func FormatTable(resp *JudgeResponse) string
FormatTable renders the judge response as a CLI-friendly table.
func ValidateDimensionResult ¶
func ValidateDimensionResult(result DimensionResult, rubric []Dimension) bool
ValidateDimensionResult checks that a DimensionResult matches the rubric.
func ValidateJudgeResponse ¶
func ValidateJudgeResponse(resp *JudgeResponse, rubric []Dimension) []string
ValidateJudgeResponse checks that the response has all expected dimensions with valid scores.
Types ¶
type Dimension ¶
type Dimension struct {
Name string `json:"name"`
Description string `json:"description"`
MinScore int `json:"min_score"`
MaxScore int `json:"max_score"`
}
Dimension represents a single quality dimension in the rubric.
func DefaultRubric ¶
func DefaultRubric() []Dimension
DefaultRubric returns the built-in quality dimensions.
type DimensionResult ¶
type DimensionResult struct {
Name string `json:"name"`
Score int `json:"score"`
Feedback string `json:"feedback"`
}
DimensionResult holds a judge's score and feedback for one dimension.
type JudgeOptions ¶
type JudgeOptions struct {
SkillPath string
TimeoutSec int
Rubric []Dimension // nil means use DefaultRubric()
}
JudgeOptions configures the quality judge.
type JudgeResponse ¶
type JudgeResponse struct {
Dimensions []DimensionResult `json:"dimensions"`
OverallScore float64 `json:"overall_score"`
Summary string `json:"summary"`
}
JudgeResponse is the structured response expected from the LLM judge.
func Judge ¶
func Judge(ctx context.Context, engine execution.AgentEngine, opts JudgeOptions) (*JudgeResponse, error)
Judge runs an LLM-based quality assessment against a SKILL.md file.
func ParseJudgeResponse ¶
func ParseJudgeResponse(raw string) (*JudgeResponse, error)
ParseJudgeResponse extracts a JudgeResponse from LLM output.