You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Partial solution
Looking at the error message I found that it includes 'json_schema_validation', which looks as a correct candidate, so I used the following code:
Error running evaluator <DynamicRunEvaluator evaluate> on run 8ba9cf6c-90bf-4c51-ad37-e2ab01290413: ValueError('JsonSchemaEvaluator requires a reference string.')
Traceback (most recent call last):
File "/Users/user/PycharmProjects/ml-sandbox/.venv/lib/python3.12/site-packages/langsmith/evaluation/_runner.py", line 1634, in _run_evaluators
evaluator_response = evaluator.evaluate_run(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/PycharmProjects/ml-sandbox/.venv/lib/python3.12/site-packages/langsmith/evaluation/evaluator.py", line 331, in evaluate_run
result = self.func(
^^^^^^^^^^
File "/Users/user/PycharmProjects/ml-sandbox/.venv/lib/python3.12/site-packages/langsmith/run_helpers.py", line 629, in wrapper
raise e
File "/Users/user/PycharmProjects/ml-sandbox/.venv/lib/python3.12/site-packages/langsmith/run_helpers.py", line 626, in wrapper
function_result = run_container["context"].run(func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/PycharmProjects/ml-sandbox/.venv/lib/python3.12/site-packages/langsmith/evaluation/integrations/_langchain.py", line 260, in evaluate
results = self.evaluator.evaluate_strings(**eval_inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/PycharmProjects/ml-sandbox/.venv/lib/python3.12/site-packages/langchain/evaluation/schema.py", line 219, in evaluate_strings
self._check_evaluation_args(reference=reference, input=input)
File "/Users/user/PycharmProjects/ml-sandbox/.venv/lib/python3.12/site-packages/langchain/evaluation/schema.py", line 127, in _check_evaluation_args
raise ValueError(f"{self.__class__.__name__} requires a reference string.")
ValueError: JsonSchemaEvaluator requires a reference string.
Looking deeper at the implementation of LangChainStringEvaluator.evaluate I can see that the second argument given to the StringEvaluator is an example field, taken from the dataset, which is None in my case. Instead, I expect it to use the given JSON schema, but I didn't manage to figure out how to make it work.
Context
LangSmith version: 0.3.8
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Description
Following the instructions in docs/reference/sdk_reference/langchain_evaluators.mdx I tried to create 'json_schema' evaluator:
And got the following error:
Partial solution
Looking at the error message I found that it includes
'json_schema_validation'
, which looks as a correct candidate, so I used the following code:However, this led to another error:
Looking deeper at the implementation of
LangChainStringEvaluator.evaluate
I can see that the second argument given to theStringEvaluator
is an example field, taken from the dataset, which isNone
in my case. Instead, I expect it to use the given JSON schema, but I didn't manage to figure out how to make it work.Context
LangSmith version: 0.3.8
The text was updated successfully, but these errors were encountered: