Calm motion: animations on this site only fade, with no movement
Answer compare
Two answers side by side with a vote for the better one
Lets people choose between two answers of an AI assistant, so the team learns which model or prompt works better.
Basic
Prompt
I record a podcast in a small bedroom with a fan. Which mic do I buy?
Answer A
Buy a dynamic mic. It picks up the voice close to it and little of the room and the fan. Speak 5 to 10 cm from it.
Answer B
A large condenser mic gives the richest sound. Put foam on the walls first, and turn off the fan when you record.
answersis a pair. Each answer has atextand an optionalsource, such as the model or the prompt behind it.promptshows the question above the answers.blind(on by default) hides the sources until the person votes, so the names do not change the vote.v-modelis the vote:a,b,tie, orbad. The chosen button is pressed, and the better answer gets a frame and a check. A status line thanks the person.- On a narrow screen, the answers go one under the other.
- Change the words with
labelsor a label pack. The API table lists the keys.
Usage
ts
import { BlessAnswerCompare } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
prompt | string | — | |
answers* | [BlessComparedAnswer, BlessComparedAnswer] | — | |
blind | boolean | true | hide the sources until the person votes, so the names do not sway the vote |
labels | Partial<Record<BlessAnswerVote, string> & { prompt: string; answer: (letter: string) => string; question: string; thanks: string; }> | — | |
modelValue | BlessAnswerVote | null | null |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: BlessAnswerVote | null] |