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

create_feedback_config

Create a feedback configuration.

Defines how feedback with a given key should be interpreted. If an identical configuration already exists for the key, it is returned unchanged. If a different configuration already exists for the key, an error is raised.

Copy
create_feedback_config(
  self,
  feedback_key: str,
  *,
  feedback_config: ls_schemas.FeedbackConfig,
  is_lower_score_better: Optional[bool] = False
) -> ls_schemas.FeedbackConfigSchema

Example:

.. code-block:: python

from langsmith import Client

client = Client() config = client.create_feedback_config( feedback_key="user-rating", feedback_config={ "type": "continuous", "min": 0.0, "max": 5.0, }, )

Parameters

NameTypeDescription
feedback_key*str

The feedback key to configure.

feedback_config*FeedbackConfig

The configuration defining type, bounds, and categories.

is_lower_score_betterOptional[bool]
Default:False

Whether a lower score is considered better. Defaults to False.

View source on GitHub