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

create_feedback

Create feedback for a run.

Copy
create_feedback(
  self,
  run_id: Optional[ls_client.ID_TYPE],
  key: str,
  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

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

valueUnion[float, int, bool, str, dict, None]
Default:None

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

commentOptional[str]
Default:None

A comment about this feedback.

**kwargsAny
Default:{}

Additional keyword arguments to include in the feedback data.

View source on GitHub