This guide uses the Python and TypeScript SDKs. For installation and setup, refer to the Python SDK documentation and TypeScript SDK documentation.
Feedback layers
LangSmith uses a three-layer architecture for structured human feedback:- Feedback configs: Organization-wide definitions of feedback keys that establish the schema for evaluation metrics. For example, you might define “accuracy” as a continuous 0–1 score or “correctness” as a pass/fail categorical choice. These configs are reusable across all annotation queues in your organization.
- Annotation queue rubric items: Queue-specific assignments that determine which feedback configs annotators must fill out when reviewing runs in a particular queue. Each rubric item can include custom descriptions, guidance for specific score values, and whether the feedback is required or optional.
- Feedback: Individual scores and values that annotators submit on specific runs. This is the actual evaluation data collected using the schemas you’ve defined. Learn more about feedback in LangSmith.
Feedback configs
Create a feedback config
Feedback configs define the schema for a feedback key — whether it’s a continuous score, a categorical choice, or freeform text. A unique key identifies each config within your organization and specifies how annotators can submit feedback for that metric.Calling
create_feedback_config with an identical config that already exists returns the existing config. If a different config already exists for the same key, the system raises a 400 error.- Continuous (
"accuracy"): Defines a numeric scale from 0 to 1. Theis_lower_score_betterparameter indicates whether lower values represent better performance. Use continuous configs for rating scales or percentage-based metrics. - Categorical (
"correctness"): Provides predefined options with associated values. Each category requires avalue(used for scoring and analytics) and alabel(shown to annotators). Use categorical configs for binary choices or multi-class classifications. - Freeform (
"notes"): Allows open-ended text input with no predefined structure. Use freeform configs for qualitative observations or explanations.
List feedback configs
Retrieve feedback configs to see what evaluation criteria are available in your organization withlist_feedback_configs. You can list all configs or filter by specific keys. Each returned config object includes the key, type, configuration details (like min/max or categories), and metadata like is_lower_score_better:
Update a feedback config
Modify an existing feedback config withupdate_feedback_config by updating specific fields. The method only changes the fields you provide—the rest remain unchanged. This is a partial update that preserves other configuration settings:
Delete a feedback config
Remove a feedback config from your organization withdelete_feedback_config. This performs a soft delete, which marks the config as deleted but doesn’t permanently remove it from the system. You can recreate a config with the same key later if needed:
Annotation queue rubric items
Rubric items assign feedback configs to a specific annotation queue. They control which feedback forms annotators see when reviewing runs in that queue, and whether each form is required or optional.Create a queue with rubric items
Create an annotation queue withcreate_annotation_queue and assign feedback configs to it through rubric items. Each rubric item references a feedback config by its key and customizes how it appears to annotators in this specific queue.
The example creates a queue with three rubric items. The queue-level rubric_instructions provides general guidance shown at the top of the annotation interface:
feedback_key: The key of an existing feedback config (create this first).description: Queue-specific guidance for annotators about this metric.score_descriptions/value_descriptions: Optional labels that explain what specific values mean (usescore_descriptionsfor continuous configs,value_descriptionsfor categorical).is_required: Whether annotators must complete this feedback before submitting.
Update rubric items on an existing queue
Modify the rubric items assigned to an annotation queue withupdate_annotation_queue. This operation replaces the entire rubric items list, so you must include all items you want to keep—the operation removes any items you don’t include.
You’ll need the queue ID, which you get when you create the queue or by listing queues:
Updating rubric items replaces the full list. Include all items you want to keep.
Feedback config types (detailed)
Continuous
Continuous configs define numeric rating scales with minimum and maximum values. Annotators can select any value within the range, making this ideal for scoring dimensions like accuracy, quality, or relevance on a numeric scale:categories with labeled anchor points on the scale (like “Poor”, “Average”, “Excellent”) to help annotators understand what different values represent. These labels are optional but can improve consistency in how annotators interpret the scale.
Categorical
Categorical configs provide a discrete set of predefined options for annotators to choose from. Each category must have avalue (a numeric identifier used for scoring and analytics) and a label (the text shown to annotators). You must define at least 2 categories.
Use categorical configs for binary decisions (pass/fail, correct/incorrect), multi-class classifications (sentiment, topic categories), or any evaluation with a fixed set of discrete options. Do not set min or max for categorical configs:
Freeform
Freeform configs allow annotators to provide open-ended text feedback without any predefined structure or constraints. This type has nomin, max, or categories fields—annotators can enter any text they want.
Freeform feedback is valuable for capturing nuanced insights but is harder to aggregate and analyze compared to structured feedback types:
Validation rules
| Type | min/max | categories | Constraints |
|---|---|---|---|
continuous | Optional | Optional (labeled scale points) | min < max; category values within [min, max] |
categorical | Must not be set | Required, min 2 | Unique values and labels |
freeform | Must not be set | Must not be set | N/A |
Reference
Feedback config types
| Type | Fields | Description |
|---|---|---|
continuous | min, max | Numeric score within a range |
categorical | categories (list of {value, label}) | Selection from predefined options |
freeform | None | Free-text input |
Rubric item fields
| Field | Type | Description |
|---|---|---|
feedback_key | string | Required. Must match an existing feedback config key. |
description | string | Shows annotators guidance for this item. |
score_descriptions | Record<string, string> | Labels for specific score values (continuous). |
value_descriptions | Record<string, string> | Labels for specific category values (categorical). |
is_required | boolean | Whether annotators must complete this item before submitting. Defaults to false. |
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.