| Name | Type | Description |
|---|---|---|
run_id | Optional[ls_client.ID_TYPE] | Default: NoneThe ID of the run to provide feedback for. At least one of run_id, trace_id, or project_id must be specified. |
key | str | Default: 'unnamed'The name of the feedback metric. |
score | Union[float, int, bool, None] | Default: None |
value | Union[float, int, bool, str, dict, None] | Default: None |
trace_id | Optional[ls_client.ID_TYPE] | Default: None |
correction | Union[dict, None] | Default: None |
feedback_id | Optional[ls_client.ID_TYPE] | Default: None |
feedback_config | Optional[ls_schemas.FeedbackConfig] | Default: None |
feedback_source_type | Union[ls_schemas.FeedbackSourceType, str] | Default: ls_schemas.FeedbackSourceType.API |
source_info | Optional[dict[str, Any]] | Default: None |
source_run_id | Optional[ls_client.ID_TYPE] | Default: None |
stop_after_attempt | int | Default: 10 |
project_id | Optional[ls_client.ID_TYPE] | Default: None |
comparative_experiment_id | Optional[ls_client.ID_TYPE] | Default: None |
feedback_group_id | Optional[ls_client.ID_TYPE] | Default: None |
extra | Optional[dict] | Default: None |
error | Optional[bool] | Default: None |
session_id | Optional[ls_client.ID_TYPE] | Default: None |
start_time | Optional[datetime.datetime] | Default: None |
comment | Optional[str] | Default: None |
extend_trace_retention | bool | Default: True |
address | Optional[str] | Default: None |
**kwargs | Any | Default: {} |
Create feedback for a run.
address is in beta. It is enabled per workspace; a
workspace without it rejects the feedback, so it is lost rather
than falling back to a project. The address must already exist --
unlike run ingestion, a feedback part never creates one. It may
change without notice.
The score to rate this run on the metric or aspect.
The display value or non-numeric value for this feedback.
The ID of the trace that contains the run.
The proper ground truth for this run.
Optional ID to assign to the feedback.
Configuration specifying how to interpret this feedback with this key.
The feedback source type, such as API or model.
Information about the source of this feedback.
The run that generated this feedback, if model-generated.
The number of times to retry the request before giving up.
The project or experiment ID for project-level feedback.
The comparative experiment ID for this feedback.
The group ID for preference or comparative feedback.
Metadata for the feedback.
Whether the feedback represents an error.
The project ID of the run. Required for run-level feedback; omitting it is deprecated. See https://docs.langchain.com/langsmith/smithdb-sdk-migration-feedback#feedback-create
The start time of the run. Better performance if provided.
A comment about this feedback.
If false, create the feedback without extending the trace's retention tier.
The address to attach this feedback to, instead of a
project. Pass whatever the run being described was traced to.
Cannot be combined with session_id / project_id, and is
never read from the env vars: feedback follows its run, not
the ambient environment.
Additional deprecated keyword arguments.