Skip to content
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.

  • answers is a pair. Each answer has a text and an optional source, such as the model or the prompt behind it.
  • prompt shows 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-model is the vote: a, b, tie, or bad. 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 labels or a label pack. The API table lists the keys.

Usage ​

ts
import { BlessAnswerCompare } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
promptstring—
answers*[BlessComparedAnswer, BlessComparedAnswer]—
blindbooleantruehide the sources until the person votes, so the names do not sway the vote
labelsPartial<Record<BlessAnswerVote, string> & { prompt: string; answer: (letter: string) => string; question: string; thanks: string; }>—
modelValueBlessAnswerVote | nullnull

Events

NamePayloadDescription
update:modelValue[value: BlessAnswerVote | null]

Released under the MIT License. Character names and artwork belong to their owners.