Skip to content

Commit

Permalink
Cleanup some doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
markuswustenberg committed Jan 17, 2025
1 parent d99892f commit 406287f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions eval/eval.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package eval lets you evaluate LLM output by scoring it with various scoring methods, and logging the result.
// It provides a convenient way to run evaluations as part of the standard Go tests using the [Run] function.
// Package eval lets you evaluate LLM output with various [Scorer] functions.
// It also provides a convenient way to run evaluations as part of the standard Go tests using the [Run] function.
package eval

import (
Expand All @@ -23,6 +23,7 @@ func (s Score) IsValid() {
}
}

// String satisfies [fmt.Stringer].
func (s Score) String() string {
// floating point with two decimals
return fmt.Sprintf("%.2f", float64(s))
Expand All @@ -34,7 +35,7 @@ type Result struct {
Type string
}

// Scorer produces a [Result] with a [Score] for a [Sample].
// Scorer produces a [Result] (including a [Score]) for the given [Sample].
type Scorer = func(s Sample) Result

// LevenshteinDistanceScorer returns a [Scorer] that uses the Levenshtein distance to compare strings.
Expand Down
1 change: 1 addition & 0 deletions internal/examples/llm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/google/generative-ai-go/genai"
"github.com/openai/openai-go"
"maragu.dev/env"

"maragu.dev/llm"
"maragu.dev/llm/eval"
)
Expand Down

0 comments on commit 406287f

Please sign in to comment.