LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
  • RemoteGraph
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDKRemoteGraph
Language
Theme
PythonlangsmithclientClientevaluate_run
Method●Since v0.0

evaluate_run

Evaluate a run.

Copy
evaluate_run(
  self,
  run: Union[ls_schemas.Run, ls_schemas.RunBase, str, uuid.UUID],
  evaluator: ls_evaluator.RunEvaluator,
  *,
  source_info: Optional[dict[str, Any]] = None,
  reference_example: Optional[Union[ls_schemas.Example, str, dict, uuid.UUID]] = None,
  load_child_runs: bool = False
) -> ls_evaluator.EvaluationResult

Parameters

NameTypeDescription
run*Union[Run, RunBase, str, UUID]

The run to evaluate.

evaluator*RunEvaluator

The evaluator to use.

source_infoOptional[Dict[str, Any]]
Default:None

Additional information about the source of the evaluation to log as feedback metadata.

reference_exampleOptional[Union[Example, str, dict, UUID]]
Default:None

The example to use as a reference for the evaluation. If not provided, the run's reference example will be used.

load_child_runsbool, default=False
Default:False

Whether to load child runs when resolving the run ID.

View source on GitHub