C.W.K.
Stream
Lesson 04 of 07 · published

Reference-Based vs Reference-Free

~18 min · judges, reference

Level 0Guesser
0 XP0/55 lessons0/10 achievements
0/150 XP to next level150 XP to go0% complete

What are you comparing the output to?

Reference-based evaluation provides the judge with a known-good answer (or a list of acceptable answers). The judge's job is to compare. Reference-free evaluation gives the judge only the question and the output. The judge must judge in absolute terms, often with a written rubric.

When to use each

Reference-basedReference-free
Translation, classification, RAG with ground truthOpen-ended generation, summarization, dialogue
You can build a golden datasetMany valid outputs exist; building one golden answer is impossible
Tighter, more reproducible scoringLooser, more rubric-dependent
Often combinable with deterministic graders (BLEU, BERTScore)Almost always requires LLM judge

Hybrid: reference-based with multiple references

For tasks where many phrasings are correct ("how to express this idea"), provide a list of acceptable references and let the judge accept if the output is functionally equivalent to any of them. This sits between strict reference-based and fully reference-free.

Principle: Reference-based is tighter; reference-free is broader. Pick based on whether your task has a knowable correct answer or a knowable correct rubric.

The rubric is your stand-in for the reference

In reference-free evaluation, the judge has nothing to anchor against except the rubric. The discipline of writing a tight rubric — exact criteria, edge cases, examples — matters even more than in reference-based mode. A vague rubric in reference-free mode produces a coin-flip judge.

Code

Reference-based judge·python
REF_PROMPT = """
Question: {question}
Reference answer: {reference}
Candidate answer: {candidate}

Is the candidate factually equivalent to the reference?
- PASS if it conveys the same key facts (paraphrasing is fine)
- FAIL if it changes, omits, or adds facts

Reply: {{\"reasoning\": \"...\", \"verdict\": \"PASS\"|\"FAIL\"}}
"""
Reference-free judge with hard rubric·python
FREE_PROMPT = """
You are evaluating a customer-support response.

## Rubric (all must hold for PASS)
- Addresses the customer's specific question
- Is factually correct given general knowledge of our product (laptops, 1-year warranty)
- Maintains a professional, empathetic tone
- Provides at least one concrete next step the customer can take
- Does NOT make up policies that don't exist (e.g., 'we don't offer 5-year warranties — saying yes is a fail')

Question: {question}
Response: {response}

Reply: {{\"reasoning\": \"...\", \"verdict\": \"PASS\"|\"FAIL\", \"failed_criteria\": [\"...\"]}}
"""

External links

Exercise

For one task, write both a reference-based judge prompt and a reference-free judge prompt. Run both on the same 20 cases. Where they disagree, decide which judgment is right and use that to refine the looser of the two prompts.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.