SingleKeyEvalConfig#

class langchain.smith.evaluation.config.SingleKeyEvalConfig[source]#

Bases: EvalConfig

Configuration for a run evaluator that only requires a single key.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param evaluator_type: EvaluatorType [Required]#
param input_key: str | None = None#

The key from the traced run’s inputs dictionary to use to represent the input. If not provided, it will be inferred automatically.

param prediction_key: str | None = None#

The key from the traced run’s outputs dictionary to use to represent the prediction. If not provided, it will be inferred automatically.

param reference_key: str | None = None#

The key in the dataset run to use as the reference string. If not provided, we will attempt to infer automatically.

get_kwargs() Dict[str, Any][source]#

Get the keyword arguments for the load_evaluator call.

Returns:

The keyword arguments for the load_evaluator call.

Return type:

Dict[str, Any]