Code QuizIntermediate

LLM-as-Judge Evaluation Prompt

Building a judge prompt that scores a model answer against a reference.

Codejavascript
function buildJudgePrompt(question, reference, answer) {
  return `You are grading an answer.
Question: ${question}
Reference answer: ${reference}
Return a score from 1 to 5.`;
}

const prompt = buildJudgePrompt(q, ref, candidate);

What is the bug in this judge prompt?