_aevaluate_string_pairs() — langchain Function Reference
Architecture documentation for the _aevaluate_string_pairs() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 410d183f_2cb6_1006_4210_ea1c8753bacf["_aevaluate_string_pairs()"] a279fd93_b575_438d_176b_7abfe52f575d["PairwiseEmbeddingDistanceEvalChain"] 410d183f_2cb6_1006_4210_ea1c8753bacf -->|defined in| a279fd93_b575_438d_176b_7abfe52f575d fbbf6b20_ebdc_5396_8597_95686297918e["_prepare_output()"] 410d183f_2cb6_1006_4210_ea1c8753bacf -->|calls| fbbf6b20_ebdc_5396_8597_95686297918e style 410d183f_2cb6_1006_4210_ea1c8753bacf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/evaluation/embedding_distance/base.py lines 624–657
async def _aevaluate_string_pairs(
self,
*,
prediction: str,
prediction_b: str,
callbacks: Callbacks = None,
tags: list[str] | None = None,
metadata: dict[str, Any] | None = None,
include_run_info: bool = False,
**kwargs: Any,
) -> dict:
"""Asynchronously evaluate the embedding distance between two predictions.
Args:
prediction: The output string from the first model.
prediction_b: The output string from the second model.
callbacks: The callbacks to use.
tags: The tags to apply.
metadata: The metadata to use.
include_run_info: Whether to include run information in the output.
**kwargs: Additional keyword arguments.
Returns:
`dict` containing:
- score: The embedding distance between the two predictions.
"""
result = await self.acall(
inputs={"prediction": prediction, "prediction_b": prediction_b},
callbacks=callbacks,
tags=tags,
metadata=metadata,
include_run_info=include_run_info,
)
return self._prepare_output(result)
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does _aevaluate_string_pairs() do?
_aevaluate_string_pairs() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/embedding_distance/base.py.
Where is _aevaluate_string_pairs() defined?
_aevaluate_string_pairs() is defined in libs/langchain/langchain_classic/evaluation/embedding_distance/base.py at line 624.
What does _aevaluate_string_pairs() call?
_aevaluate_string_pairs() calls 1 function(s): _prepare_output.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free