SingleKeyEvalConfig Class — langchain Architecture
Architecture documentation for the SingleKeyEvalConfig class in config.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 5528a09f_3682_a8b0_958b_cd9a898b6e3c["SingleKeyEvalConfig"] 3f727cf4_38d7_5e57_1492_800220e6e9f9["EvalConfig"] 5528a09f_3682_a8b0_958b_cd9a898b6e3c -->|extends| 3f727cf4_38d7_5e57_1492_800220e6e9f9 ba7f9415_541a_d99f_0400_a688a10212b0["config.py"] 5528a09f_3682_a8b0_958b_cd9a898b6e3c -->|defined in| ba7f9415_541a_d99f_0400_a688a10212b0 682cf20d_5338_c7c4_4ecb_fe694cc89fa5["get_kwargs()"] 5528a09f_3682_a8b0_958b_cd9a898b6e3c -->|method| 682cf20d_5338_c7c4_4ecb_fe694cc89fa5
Relationship Graph
Source Code
libs/langchain/langchain_classic/smith/evaluation/config.py lines 57–77
class SingleKeyEvalConfig(EvalConfig):
"""Configuration for a run evaluator that only requires a single key."""
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."""
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."""
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."""
@override
def get_kwargs(self) -> dict[str, Any]:
kwargs = super().get_kwargs()
# Filer out the keys that are not needed for the evaluator.
for key in ["reference_key", "prediction_key", "input_key"]:
kwargs.pop(key, None)
return kwargs
Extends
Source
Frequently Asked Questions
What is the SingleKeyEvalConfig class?
SingleKeyEvalConfig is a class in the langchain codebase, defined in libs/langchain/langchain_classic/smith/evaluation/config.py.
Where is SingleKeyEvalConfig defined?
SingleKeyEvalConfig is defined in libs/langchain/langchain_classic/smith/evaluation/config.py at line 57.
What does SingleKeyEvalConfig extend?
SingleKeyEvalConfig extends EvalConfig.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free