Home / Function/ aevaluate_strings() — langchain Function Reference

aevaluate_strings() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  7005c138_072e_7038_918d_35c947f2e4ac["aevaluate_strings()"]
  3bfa222e_74bd_6c80_db4a_a3d3a09b5e7b["StringEvaluator"]
  7005c138_072e_7038_918d_35c947f2e4ac -->|defined in| 3bfa222e_74bd_6c80_db4a_a3d3a09b5e7b
  7026853a_ec84_d1d0_4656_2bb45a043e17["_check_evaluation_args()"]
  7005c138_072e_7038_918d_35c947f2e4ac -->|calls| 7026853a_ec84_d1d0_4656_2bb45a043e17
  18f54728_8c17_5647_a4f6_df52b9f1d794["_aevaluate_strings()"]
  7005c138_072e_7038_918d_35c947f2e4ac -->|calls| 18f54728_8c17_5647_a4f6_df52b9f1d794
  style 7005c138_072e_7038_918d_35c947f2e4ac fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/evaluation/schema.py lines 237–262

    async def aevaluate_strings(
        self,
        *,
        prediction: str,
        reference: str | None = None,
        input: str | None = None,  # noqa: A002
        **kwargs: Any,
    ) -> dict:
        """Asynchronously evaluate Chain or LLM output, based on optional input and label.

        Args:
            prediction: The LLM or chain prediction to evaluate.
            reference: The reference label to evaluate against.
            input: The input to consider during evaluation.
            **kwargs: Additional keyword arguments, including callbacks, tags, etc.

        Returns:
            The evaluation results containing the score or value.
        """  # noqa: E501
        self._check_evaluation_args(reference=reference, input_=input)
        return await self._aevaluate_strings(
            prediction=prediction,
            reference=reference,
            input=input,
            **kwargs,
        )

Domain

Subdomains

Frequently Asked Questions

What does aevaluate_strings() do?
aevaluate_strings() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/schema.py.
Where is aevaluate_strings() defined?
aevaluate_strings() is defined in libs/langchain/langchain_classic/evaluation/schema.py at line 237.
What does aevaluate_strings() call?
aevaluate_strings() calls 2 function(s): _aevaluate_strings, _check_evaluation_args.

Analyze Your Own Codebase

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

Try Supermodel Free