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
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
PythonlangsmithevaluationevaluatorComparisonEvaluationResult
Class●Since v0.1

ComparisonEvaluationResult

Copy
ComparisonEvaluationResult()

Bases

BaseModel

Attributes

Inherited fromBaseModel

Attributes

Amodel_fields_set: set[str]Amodel_config: ConfigDictAmodel_construct: construct

Methods

Mto_dict
—
View source on GitHub

Recursively generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Mto_json
—

Generates a JSON string representing this model as it would be received from or sent to the API (but with indentation).

Mconstruct
Mmodel_dump
—

Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump

Mmodel_dump_json
—

Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json

Classes

CConfig
attribute
key: str
attribute
scores: dict[Union[uuid.UUID, str], SCORE_TYPE]
attribute
source_run_id: Optional[Union[uuid.UUID, str]]
attribute
comment: Optional[Union[str, dict[Union[uuid.UUID, str], str]]]

Feedback scores for the results of comparative evaluations.

These are generated by functions that compare two or more runs, returning a ranking or other feedback.

The aspect, metric name, or label for this evaluation.

The scores for each run in the comparison.

The ID of the trace of the evaluator itself.

Comment for the scores. If a string, it's shared across all target runs.

If a dict, it maps run IDs to individual comments.