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
PythonlangsmithevaluationevaluatorComparisonEvaluationResult
Class●Since v0.1

ComparisonEvaluationResult

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.

Copy
ComparisonEvaluationResult()

Bases

BaseModel

Attributes

attribute
key: str

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

attribute
scores: dict[Union[uuid.UUID, str], SCORE_TYPE]

The scores for each run in the comparison.

attribute
source_run_id: Optional[Union[uuid.UUID, str]]

The ID of the trace of the evaluator itself.

attribute
comment: Optional[Union[str, dict[Union[uuid.UUID, str], str]]]

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

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

View source on GitHub