judge

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package judge provides local-model judges for the shadow-labeling flywheel: an embeddings-based similarity used to score whether a counterfactual tier's summary agrees with the reference summary (exact-match doesn't work for paraphrase). Calls the warm embeddinggemma on llama-swap :11436.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedder

type Embedder struct {
	// contains filtered or unexported fields
}

func NewEmbedder

func NewEmbedder(endpoint string, timeout time.Duration) *Embedder

func (*Embedder) Embed

func (e *Embedder) Embed(text string) ([]float64, error)

Embed returns the embedding vector for a single text from embeddinggemma.

func (*Embedder) Similar

func (e *Embedder) Similar(a, b string) (float64, error)

Similar embeds a and b in one call and returns their cosine similarity.

Jump to

Keyboard shortcuts

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