_evaluate_string_pairs() — langchain Function Reference
Architecture documentation for the _evaluate_string_pairs() function in schema.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6695fe03_0fd9_7552_8ebc_8e87d5983012["_evaluate_string_pairs()"] 910b9203_afa5_b8ca_1a1e_3933f70c340f["PairwiseStringEvaluator"] 6695fe03_0fd9_7552_8ebc_8e87d5983012 -->|defined in| 910b9203_afa5_b8ca_1a1e_3933f70c340f 3ea3b093_5648_88aa_046a_77ffd66a2814["evaluate_string_pairs()"] 3ea3b093_5648_88aa_046a_77ffd66a2814 -->|calls| 6695fe03_0fd9_7552_8ebc_8e87d5983012 style 6695fe03_0fd9_7552_8ebc_8e87d5983012 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/evaluation/schema.py lines 269–289
def _evaluate_string_pairs(
self,
*,
prediction: str,
prediction_b: str,
reference: str | None = None,
input: str | None = None, # noqa: A002
**kwargs: Any,
) -> dict:
"""Evaluate the output string pairs.
Args:
prediction: The output string from the first model.
prediction_b: The output string from the second model.
reference: The expected output / reference string.
input: The input string.
**kwargs: Additional keyword arguments, such as callbacks and optional reference strings.
Returns:
`dict` containing the preference, scores, and/or other information.
""" # noqa: E501
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _evaluate_string_pairs() do?
_evaluate_string_pairs() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/schema.py.
Where is _evaluate_string_pairs() defined?
_evaluate_string_pairs() is defined in libs/langchain/langchain_classic/evaluation/schema.py at line 269.
What calls _evaluate_string_pairs()?
_evaluate_string_pairs() is called by 1 function(s): evaluate_string_pairs.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free