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
Pythonlangsmith_openapi_clienttypesrunFeedbackStats
Class●Since v0.9

FeedbackStats

Copy
FeedbackStats()

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
avg: Optional[float]
attribute
comments: Optional[List[str]]
attribute
contains_thread_feedback: Optional[bool]
attribute
errors: Optional[int]
attribute
max: Optional[float]
attribute
min: Optional[float]
attribute
n: Optional[int]
attribute
sources: Optional[List[object]]
attribute
stdev: Optional[float]
attribute
values: Optional[Dict[str, int]]

avg is the arithmetic mean of numeric feedback scores for this key on the run, or null when no numeric score has been recorded (for example purely categorical feedback).

comments is a sample of human-readable comments attached to feedback points for this key, in no particular order. May be empty; is not exhaustive when many comments exist.

contains_thread_feedback is true when at least one feedback point for this key was submitted at the thread level (rather than at an individual run). Always false on responses that already describe a single run in isolation.

errors is the number of feedback points recorded as errors rather than successful scores (for example an automated evaluator that raised an exception). Defaults to 0 when no errors occurred.

max is the largest numeric feedback score recorded for this key on the run, or null when no numeric score has been recorded.

min is the smallest numeric feedback score recorded for this key on the run, or null when no numeric score has been recorded.

n is the number of feedback points recorded for this key on the run.

For numeric feedback this is the sample size behind avg, min, max, and stdev; for categorical feedback it is the sum of the values counts.

sources is a sample of feedback sources for this key.

Each entry is either a plain string identifier (for example "api", "app", "model") or a JSON object describing a synthetic source (for example {"type": "__ls_composite_feedback"} for a computed aggregate). Clients must tolerate both shapes.

stdev is the sample standard deviation of numeric feedback scores for this key on the run, or null when it cannot be computed (for example fewer than two numeric scores, or purely categorical feedback).

values is the distribution of categorical feedback labels for this key, mapping each label to its occurrence count. Empty ({}) for purely numeric feedback.