Home / Function/ _aevaluate_string_pairs() — langchain Function Reference

_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
  7ae8c4c6_d065_6bd6_7b3a_d805a0a31ecc["_aevaluate_string_pairs()"]
  673d639d_36b0_87dd_ead9_5b65d00daaca["PairwiseStringDistanceEvalChain"]
  7ae8c4c6_d065_6bd6_7b3a_d805a0a31ecc -->|defined in| 673d639d_36b0_87dd_ead9_5b65d00daaca
  b169d8ca_baf2_528c_d013_53f7c6ab28a6["_prepare_output()"]
  7ae8c4c6_d065_6bd6_7b3a_d805a0a31ecc -->|calls| b169d8ca_baf2_528c_d013_53f7c6ab28a6
  style 7ae8c4c6_d065_6bd6_7b3a_d805a0a31ecc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/evaluation/string_distance/base.py lines 420–452

    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 string distance between two predictions.

        Args:
            prediction: The first prediction string.
            prediction_b: The second prediction string.
            callbacks: The callbacks to use.
            tags: The tags to apply.
            metadata: The metadata to use.
            include_run_info: Whether to include run info in the output.
            **kwargs: Additional keyword arguments.

        Returns:
            The evaluation results containing the score.
        """
        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

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/string_distance/base.py.
Where is _aevaluate_string_pairs() defined?
_aevaluate_string_pairs() is defined in libs/langchain/langchain_classic/evaluation/string_distance/base.py at line 420.
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