run
/rootRun
argument, which is a Run
object that contains the intermediate steps of your pipeline.
langsmith>=0.3.13
langsmith>=0.3.13
with_structured_output
to define the evaluator for hallucination.
The key here is that the evaluator function should traverse the run
/ rootRun
argument to access the intermediate steps of the pipeline. The evaluator can then process the inputs and outputs of the intermediate steps to evaluate according to the desired criteria.
Example uses langchain
for convenience, this is not required.
evaluate
with the custom evaluators defined above.