ScoreString Class — langchain Architecture
Architecture documentation for the ScoreString class in config.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 47293a9b_cea7_3396_d2ae_5ae17921131c["ScoreString"] 5528a09f_3682_a8b0_958b_cd9a898b6e3c["SingleKeyEvalConfig"] 47293a9b_cea7_3396_d2ae_5ae17921131c -->|extends| 5528a09f_3682_a8b0_958b_cd9a898b6e3c ba7f9415_541a_d99f_0400_a688a10212b0["config.py"] 47293a9b_cea7_3396_d2ae_5ae17921131c -->|defined in| ba7f9415_541a_d99f_0400_a688a10212b0
Relationship Graph
Source Code
libs/langchain/langchain_classic/smith/evaluation/config.py lines 247–268
class ScoreString(SingleKeyEvalConfig):
"""Configuration for a score string evaluator.
This is like the criteria evaluator but it is configured by
default to return a score on the scale from 1-10.
It is recommended to normalize these scores
by setting `normalize_by` to 10.
Attributes:
criteria: The criteria to evaluate.
llm: The language model to use for the evaluation chain.
normalize_by: If you want to normalize the score, the denominator to use.
If not provided, the score will be between 1 and 10.
prompt: The prompt template to use for evaluation.
"""
evaluator_type: EvaluatorType = EvaluatorType.SCORE_STRING
criteria: CRITERIA_TYPE | None = None
llm: BaseLanguageModel | None = None
normalize_by: float | None = None
prompt: BasePromptTemplate | None = None
Extends
Source
Frequently Asked Questions
What is the ScoreString class?
ScoreString is a class in the langchain codebase, defined in libs/langchain/langchain_classic/smith/evaluation/config.py.
Where is ScoreString defined?
ScoreString is defined in libs/langchain/langchain_classic/smith/evaluation/config.py at line 247.
What does ScoreString extend?
ScoreString extends SingleKeyEvalConfig.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free