Home / Function/ _aevaluate_strings() — langchain Function Reference

_aevaluate_strings() — langchain Function Reference

Architecture documentation for the _aevaluate_strings() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ec0bda93_7f3e_34e9_2d19_d43e5da32071["_aevaluate_strings()"]
  bff7d7ab_1e8c_c321_eeec_49e7e15eca13["StringDistanceEvalChain"]
  ec0bda93_7f3e_34e9_2d19_d43e5da32071 -->|defined in| bff7d7ab_1e8c_c321_eeec_49e7e15eca13
  b169d8ca_baf2_528c_d013_53f7c6ab28a6["_prepare_output()"]
  ec0bda93_7f3e_34e9_2d19_d43e5da32071 -->|calls| b169d8ca_baf2_528c_d013_53f7c6ab28a6
  style ec0bda93_7f3e_34e9_2d19_d43e5da32071 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/evaluation/string_distance/base.py lines 288–322

    async def _aevaluate_strings(
        self,
        *,
        prediction: str,
        reference: str | None = None,
        input: str | None = None,
        callbacks: Callbacks = None,
        tags: list[str] | None = None,
        metadata: dict[str, Any] | None = None,
        include_run_info: bool = False,
        **kwargs: Any,
    ) -> dict:
        """Evaluate the string distance between the prediction and the reference.

        Args:
            prediction: The prediction string.
            reference: The reference string.
            input: The input string.
            callbacks: The callbacks to use.
            tags: The tags to apply.
            metadata: The metadata to apply.
            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, "reference": reference},
            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_strings() do?
_aevaluate_strings() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/string_distance/base.py.
Where is _aevaluate_strings() defined?
_aevaluate_strings() is defined in libs/langchain/langchain_classic/evaluation/string_distance/base.py at line 288.
What does _aevaluate_strings() call?
_aevaluate_strings() 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