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
PythonlangsmithtypesissueEvidenceSeriesMetricDefinitionDenominator
Class●Since v0.14

EvidenceSeriesMetricDefinitionDenominator

Copy
EvidenceSeriesMetricDefinitionDenominator()

Bases

BaseModel

Attributes

Inherited fromBaseModel

Attributes

Amodel_fields_set: set[str]Amodel_configAmodel_construct: construct

Methods

Mto_dict
—

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

View source on GitHub
Mto_json
—

Return the report as a JSON-serializable dict (raw JSON shape).

Mconstruct
Mmodel_dump
—

Dump the feedback, including its address.

Mmodel_dump_json
—

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

Classes

CConfig
attribute
type: Literal['count', 'sum', 'avg', 'min', 'max', 'percentile', 'ratio', 'histogram']

An operand is non-composite, so ratio is rejected here too.

attribute
entity: Optional[Literal['run', 'feedback']]

Entity selects what a type=count metric counts.

Only valid when type=count; defaults to MetricEntityRun. entity=feedback requires params.feedback_key and counts individual feedback records rather than runs.

attribute
field: Optional[Literal['latency_seconds', 'first_token_seconds', 'total_tokens', 'prompt_tokens', 'completion_tokens', 'total_cost', 'prompt_cost', 'completion_cost', 'feedback_score', 'prompt_token_details.cache_creation', 'prompt_token_details.cache_read', 'prompt_token_details.ephemeral_1h_input_tokens', 'prompt_token_details.ephemeral_5m_input_tokens', 'prompt_token_details.audio', 'prompt_token_details.image', 'prompt_token_details.video', 'completion_token_details.reasoning', 'completion_token_details.audio', 'completion_token_details.image', 'completion_token_details.video', 'prompt_cost_details.cache_creation', 'prompt_cost_details.cache_read', 'prompt_cost_details.ephemeral_1h_input_tokens', 'prompt_cost_details.ephemeral_5m_input_tokens', 'prompt_cost_details.audio', 'prompt_cost_details.image', 'prompt_cost_details.video', 'completion_cost_details.reasoning', 'completion_cost_details.audio', 'completion_cost_details.image', 'completion_cost_details.video']]
attribute
filter: Optional[str]
attribute
params: Optional[EvidenceSeriesMetricDefinitionDenominatorParams]

required when type=percentile