Home / Function/ test_json_equality_evaluator_evaluate_strings_custom_operator_not_equal() — langchain Function Reference

test_json_equality_evaluator_evaluate_strings_custom_operator_not_equal() — langchain Function Reference

Architecture documentation for the test_json_equality_evaluator_evaluate_strings_custom_operator_not_equal() function in test_base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  8f853084_51b4_288b_7d49_697baebca0a7["test_json_equality_evaluator_evaluate_strings_custom_operator_not_equal()"]
  5699e682_332a_59f6_5c7c_d1fcf8332e65["test_base.py"]
  8f853084_51b4_288b_7d49_697baebca0a7 -->|defined in| 5699e682_332a_59f6_5c7c_d1fcf8332e65
  style 8f853084_51b4_288b_7d49_697baebca0a7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/evaluation/parsing/test_base.py lines 116–124

def test_json_equality_evaluator_evaluate_strings_custom_operator_not_equal() -> None:
    def operator(x: dict, y: dict) -> bool:
        return x["a"] == y["a"]

    evaluator = JsonEqualityEvaluator(operator=operator)
    prediction = '{"a": 1}'
    reference = '{"a": 2}'
    result = evaluator.evaluate_strings(prediction=prediction, reference=reference)
    assert result == {"score": False}

Domain

Subdomains

Frequently Asked Questions

What does test_json_equality_evaluator_evaluate_strings_custom_operator_not_equal() do?
test_json_equality_evaluator_evaluate_strings_custom_operator_not_equal() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/evaluation/parsing/test_base.py.
Where is test_json_equality_evaluator_evaluate_strings_custom_operator_not_equal() defined?
test_json_equality_evaluator_evaluate_strings_custom_operator_not_equal() is defined in libs/langchain/tests/unit_tests/evaluation/parsing/test_base.py at line 116.

Analyze Your Own Codebase

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

Try Supermodel Free