test_json_schema_evaluator_valid_prediction() — langchain Function Reference
Architecture documentation for the test_json_schema_evaluator_valid_prediction() function in test_json_schema.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7e731749_aac9_eb64_4035_63195714466c["test_json_schema_evaluator_valid_prediction()"] 54803af3_7979_cadf_df7b_bcd305ce919c["test_json_schema.py"] 7e731749_aac9_eb64_4035_63195714466c -->|defined in| 54803af3_7979_cadf_df7b_bcd305ce919c style 7e731749_aac9_eb64_4035_63195714466c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/evaluation/parsing/test_json_schema.py lines 33–45
def test_json_schema_evaluator_valid_prediction(
json_schema_evaluator: JsonSchemaEvaluator,
) -> None:
prediction = '{"name": "John", "age": 30}'
reference = {
"type": "object",
"properties": {"name": {"type": "string"}, "age": {"type": "integer"}},
}
result = json_schema_evaluator._evaluate_strings(
prediction=prediction,
reference=reference,
)
assert result["score"] is True
Domain
Subdomains
Source
Frequently Asked Questions
What does test_json_schema_evaluator_valid_prediction() do?
test_json_schema_evaluator_valid_prediction() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/evaluation/parsing/test_json_schema.py.
Where is test_json_schema_evaluator_valid_prediction() defined?
test_json_schema_evaluator_valid_prediction() is defined in libs/langchain/tests/unit_tests/evaluation/parsing/test_json_schema.py at line 33.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free