RAGASEvaluator

org.llm4s.rag.evaluation.RAGASEvaluator
See theRAGASEvaluator companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(llmClient: LLMClient, embeddingClient: EmbeddingClient, embeddingModelConfig: EmbeddingModelConfig): RAGASEvaluator

Create a new RAGAS evaluator with default metrics.

Create a new RAGAS evaluator with default metrics.

Value parameters

embeddingClient

Embedding client for similarity calculations

embeddingModelConfig

Configuration for the embedding model

llmClient

LLM client for semantic evaluation

Attributes

Returns

A new evaluator with all four RAGAS metrics enabled

def apply(llmClient: LLMClient, embeddingClient: EmbeddingClient, embeddingModelConfig: EmbeddingModelConfig, metrics: Seq[RAGASMetric]): RAGASEvaluator

Create a new RAGAS evaluator with specific metrics.

Create a new RAGAS evaluator with specific metrics.

Value parameters

embeddingClient

Embedding client for similarity calculations

embeddingModelConfig

Configuration for the embedding model

llmClient

LLM client for semantic evaluation

metrics

Custom metrics to use

Attributes

Returns

A new evaluator with the specified metrics

def basic(llmClient: LLMClient, embeddingClient: EmbeddingClient, embeddingModelConfig: EmbeddingModelConfig): RAGASEvaluator

Create an evaluator with only Faithfulness and Answer Relevancy metrics. These metrics don't require ground truth.

Create an evaluator with only Faithfulness and Answer Relevancy metrics. These metrics don't require ground truth.

Value parameters

embeddingClient

Embedding client for similarity calculations

embeddingModelConfig

Configuration for the embedding model

llmClient

LLM client for semantic evaluation

Attributes

Returns

A new evaluator with basic metrics only

Concrete fields

val ANSWER_RELEVANCY: String
val CONTEXT_PRECISION: String
val CONTEXT_RECALL: String
val FAITHFULNESS: String

Metric names for reference.

Metric names for reference.

Attributes