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
| Prop | Type | Default | |
|---|---|---|---|
variant | 'thumbs' | 'rubric' | 'thumbs' | thumbs for end users; rubric scores each criterion 1–scale for evaluators. |
rating | ResponseRating | null | Controlled rating; use with onRatingChange. | |
defaultRating | ResponseRating | null | Initial rating when uncontrolled. | |
onRatingChange | (rating: ResponseRating | null) => void | Called with the new rating when it changes. | |
reasons | Partial<Record<ResponseRating, string[]>> | Reason chips offered after a thumbs up or down. Default: defaultFeedbackReasons. | |
criteria | RubricCriterion[] | Rubric criteria. Default: accuracy, helpfulness, clarity, safety (defaultRubricCriteria). | |
scale | number | Highest rubric score. Default 5. | |
onSubmit | (feedback: ResponseFeedbackValue) => void | Called 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. | |
locale | string | BCP 47 locale for the average; defaults to the ThemeProvider's. | |
defaultOpen | boolean | thumbs: show the reasons and comment panel on the first render, for a rating / defaultRating already given. | |
labels | Partial<ResponseFeedbackLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Related components
- AI Chat Window — AI chat window
- Chat Message — Messages with streaming output
- Message Branches — Message versions and a conversation branch tree
- Streaming Text — Smooth token streaming
- Markdown Preview — Rendered Markdown
- Prompt Composer — Prompt field with attachments
- Inline Suggestion — Inline autocomplete suggestion
- Model Selector — AI model picker
- Model Comparison — Side-by-side answers from several models
- Prompt Library — Prompt library with variables
- Chain of Thought — Model reasoning steps
- Tool Call — Tool call with approval
Previous: Markdown Preview · Next: Prompt Composer · All AI chat and agents