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.
create_feedback_config(
self,
feedback_key: str,
*,
feedback_config: ls_schemas.FeedbackConfig,
is_lower_score_better: Optional[bool] = False
) -> ls_schemas.FeedbackConfigSchemaExample:
.. 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, }, )
| Name | Type | Description |
|---|---|---|
feedback_key* | str | The feedback key to configure. |
feedback_config* | FeedbackConfig | The configuration defining type, bounds, and categories. |
is_lower_score_better | Optional[bool] | Default: FalseWhether a lower score is considered better. Defaults to False. |