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
Pythonlangsmithasync_clientAsyncClientcreate_feedback
Method●Since v0.1

create_feedback

Copy
create_feedback( self, run_id: Optional[ls_client.ID_TYPE], key: str, 
View source on GitHub
score
:
Optional
[
float
]
=
None
,
value
:
Union
[
float
,
int
,
bool
,
str
,
dict
,
None
]
=
None
,
comment
:
Optional
[
str
]
=
None
,
**
kwargs
:
Any
=
{
}
)
->
ls_schemas
.
Feedback

Parameters

NameTypeDescription
run_id*Optional[ls_client.ID_TYPE]

The ID of the run to provide feedback for.

Can be None for project-level feedback.

key*str

The name of the metric or aspect this feedback is about.

scoreOptional[float]
Default:None
valueUnion[float, int, bool, str, dict, None]
Default:None
commentOptional[str]
Default:None
**kwargsAny
Default:{}

Create feedback for a run.

The score to rate this run on the metric or aspect.

The display value or non-numeric value for this feedback.

A comment about this feedback.

Additional keyword arguments to include in the feedback data.