evaluation

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LLMJudge

type LLMJudge interface {
	// EvaluateFaithfulness checks if the generated answer is strictly grounded in the retrieved chunks.
	EvaluateFaithfulness(ctx context.Context, query string, chunks []*entity.Chunk, answer string) (score float32, reason string, err error)

	// EvaluateAnswerRelevance checks if the answer effectively addresses the user's intent.
	EvaluateAnswerRelevance(ctx context.Context, query string, answer string) (score float32, reason string, err error)

	// EvaluateContextPrecision checks if the retrieved context actually contains the useful information.
	EvaluateContextPrecision(ctx context.Context, query string, chunks []*entity.Chunk) (score float32, reason string, err error)
}

LLMJudge provides production-grade Evaluation metrics (e.g., RAGAS) using an LLM as the evaluator.

Jump to

Keyboard shortcuts

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