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
  d7002ca7_f638_ad53_b56f_74502f453dd5["aevaluate_string_pairs()"]
  910b9203_afa5_b8ca_1a1e_3933f70c340f["PairwiseStringEvaluator"]
  d7002ca7_f638_ad53_b56f_74502f453dd5 -->|defined in| 910b9203_afa5_b8ca_1a1e_3933f70c340f
  7026853a_ec84_d1d0_4656_2bb45a043e17["_check_evaluation_args()"]
  d7002ca7_f638_ad53_b56f_74502f453dd5 -->|calls| 7026853a_ec84_d1d0_4656_2bb45a043e17
  a7651907_5732_2675_07d4_747590e3fc72["_aevaluate_string_pairs()"]
  d7002ca7_f638_ad53_b56f_74502f453dd5 -->|calls| a7651907_5732_2675_07d4_747590e3fc72
  style d7002ca7_f638_ad53_b56f_74502f453dd5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/evaluation/schema.py lines 352–380

    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
        self._check_evaluation_args(reference=reference, input_=input)
        return await self._aevaluate_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 352.
What does aevaluate_string_pairs() call?
aevaluate_string_pairs() calls 2 function(s): _aevaluate_string_pairs, _check_evaluation_args.

Analyze Your Own Codebase

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

Try Supermodel Free