ValyroUI Русская версия

Response Feedback

Answer rating and a rubric for reviewers. Pro · AI chat and agents › Chat

Feedback on an AI response: thumbs up/down with reason chips and a comment, or an evaluator rubric that scores each criterion with notes.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add response-feedback
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ResponseFeedback } from 'valyro-ui-pro';

Props

PropTypeDefault
variant'thumbs' | 'rubric''thumbs'thumbs for end users; rubric scores each criterion 1–scale for evaluators.
ratingResponseRating | nullControlled rating; use with onRatingChange.
defaultRatingResponseRating | nullInitial rating when uncontrolled.
onRatingChange(rating: ResponseRating | null) => voidCalled with the new rating when it changes.
reasonsPartial<Record<ResponseRating, string[]>>Reason chips offered after a thumbs up or down. Default: defaultFeedbackReasons.
criteriaRubricCriterion[]Rubric criteria. Default: accuracy, helpfulness, clarity, safety (defaultRubricCriteria).
scalenumberHighest rubric score. Default 5.
onSubmit(feedback: ResponseFeedbackValue) => voidCalled on Submit with the rating, picked reasons and comment (thumbs), or with each criterion's score, notes and average (rubric). A rubric only submits once every criterion is scored.
localestringBCP 47 locale for the average; defaults to the ThemeProvider's.
defaultOpenbooleanthumbs: show the reasons and comment panel on the first render, for a rating / defaultRating already given.
labelsPartial<ResponseFeedbackLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Markdown Preview · Next: Prompt Composer · All AI chat and agents