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
PythonlangsmithclientClientcreate_comparative_experiment
Method●Since v0.1

create_comparative_experiment

Create a comparative experiment on the LangSmith API.

These experiments compare 2 or more experiment results over a shared dataset.

Copy
create_comparative_experiment(
  self,
  name: str,
  experiments: Sequence[ID_TYPE],
  *,
  reference_dataset: Optional[ID_TYPE] = None,
  description: Optional[str] = None,
  created_at: Optional[datetime.datetime] = None,
  metadata: Optional[dict[str, Any]] = None,
  id: Optional[ID_TYPE] = None
) -> ls_schemas.ComparativeExperiment

Parameters

NameTypeDescription
name*str

The name of the comparative experiment.

experiments*Sequence[Union[UUID, str]]

The IDs of the experiments to compare.

reference_datasetOptional[Union[UUID, str]]
Default:None

The ID of the dataset these experiments are compared on.

descriptionOptional[str]
Default:None

The description of the comparative experiment.

created_atOptional[datetime.datetime]
Default:None

The creation time of the comparative experiment.

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

Additional metadata for the comparative experiment.

idOptional[Union[UUID, str]]
Default:None

The ID of the comparative experiment.

View source on GitHub