Home / Function/ _aevaluate_string_pairs() — langchain Function Reference

_aevaluate_string_pairs() — langchain Function Reference

Architecture documentation for the _aevaluate_string_pairs() function in schema.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  a7651907_5732_2675_07d4_747590e3fc72["_aevaluate_string_pairs()"]
  910b9203_afa5_b8ca_1a1e_3933f70c340f["PairwiseStringEvaluator"]
  a7651907_5732_2675_07d4_747590e3fc72 -->|defined in| 910b9203_afa5_b8ca_1a1e_3933f70c340f
  d7002ca7_f638_ad53_b56f_74502f453dd5["aevaluate_string_pairs()"]
  d7002ca7_f638_ad53_b56f_74502f453dd5 -->|calls| a7651907_5732_2675_07d4_747590e3fc72
  style a7651907_5732_2675_07d4_747590e3fc72 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/evaluation/schema.py lines 291–320

    async def _aevaluate_string_pairs(
        self,
        *,
        prediction: str,
        prediction_b: str,
        reference: str | None = None,
        input: str | None = None,  # noqa: A002
        **kwargs: Any,
    ) -> dict:
        """Asynchronously 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
        return await run_in_executor(
            None,
            self._evaluate_string_pairs,
            prediction=prediction,
            prediction_b=prediction_b,
            reference=reference,
            input=input,
            **kwargs,
        )

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/schema.py.
Where is _aevaluate_string_pairs() defined?
_aevaluate_string_pairs() is defined in libs/langchain/langchain_classic/evaluation/schema.py at line 291.
What calls _aevaluate_string_pairs()?
_aevaluate_string_pairs() is called by 1 function(s): aevaluate_string_pairs.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free