In-line evaluations are a way to evaluate within a trace.
evaluator.evaluate()
with the trace_eval=True
parameter inside an active span, the evaluation is executed, and its results are attached to that span as attributes. This allows you to see evaluation results directly in the context of the operation you are tracing, like an LLM call.
Evaluator
.
evaluator.evaluate()
:
trace_eval=True
: This is the essential parameter that enables the in-line evaluation feature. It tells the system to find the current active span and attach the evaluation results to it.custom_eval_name
: This parameter is required and provides a unique, human-readable name for your evaluation instance. It helps distinguish between multiple evaluations, especially of the same type, within a trace. The name will appear in the UI.