aiq.eval.rag_evaluator.register#
Attributes#
Classes#
RAGAS metrics configuration |
|
Evaluation using RAGAS metrics. |
Functions#
|
Module Contents#
- logger#
- class RagasMetricConfig(/, **data: Any)#
Bases:
pydantic.BaseModel
RAGAS metrics configuration skip: Allows the metric config to be present but not used kwargs: Additional arguments to pass to the metric’s callable
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.
- class RagasEvaluatorConfig(/, **data: Any)#
Bases:
aiq.data_models.evaluator.EvaluatorBaseConfig
Evaluation using RAGAS metrics.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- metric: str | dict[str, RagasMetricConfig] = None#
- classmethod validate_metric(values)#
Ensures metric is either a string or a single-item dictionary.
- property metric_config: RagasMetricConfig#
Returns the metric configuration (or a default if only a string is provided).
- async register_ragas_evaluator(
- config: RagasEvaluatorConfig,
- builder: aiq.builder.builder.EvalBuilder,