← Learning guides

Worked tutorial · about 40 minutes

Compare two prompts on the same six examples

Score a fixed set of fictional answers, count paired wins and regressions, and explain why a higher total is only the start of a prompt evaluation.

Original editorial exercise · fictional practice data · checked 25 October 2026

A new prompt can fix two answers and break another. Looking only at its overall score hides that tradeoff. In this exercise, you will compare candidate A with candidate B on exactly the same six questions, preserve ties, and write a decision that identifies the remaining failures.

Every notice, prompt and response is invented editorial practice material. The responses are canned examples, not outputs measured from a model. You need no account or API. Work on paper or in a spreadsheet first; an optional Python 3 script checks your tally.

1. Fix the task and rubric before scoring

Each candidate answers a question using its short notice. A says: “Answer the question using the notice.” B says: “Answer using only the notice. Include every requested condition or time. If the notice does not give a fact, say it is not specified. Prefer a later correction to the original notice.” Keep these prompt versions, cases and responses unchanged for the comparison.

For each response, mark two binary checks. Supported means all factual claims follow from the notice, including any correction. Complete means the response addresses every requested part. An explicit unknown is complete when the notice does not supply that fact. A response passes only when both checks pass.

These checks answer different questions. An answer can mention a correct start time while omitting the requested end time. An invented date can address the question's shape while failing factual support. Record the reason beside the two scores; do not collapse them into a vague rating such as “sounds good.”

2. Score each pair against its notice

Hide the answer key and fill in the worksheet. Compare the meaning with the notice rather than matching wording. Alternate which candidate you read first. If several people score a real evaluation, hide candidate names and vary response order before collecting their independent judgments.

P01: When does the evening workshop begin?

Notice: The evening workshop begins at 18:00.

A: It begins at 18:00.

B: It begins at 18:00.

P02: What is the registration deadline?

Notice: Registration is required. The notice gives no registration deadline.

A: Registration closes on Thursday.

B: The registration deadline is not specified.

P03: Who can book the equipment and under what condition?

Notice: Members may book the equipment only after completing an induction.

A: Members can book the equipment.

B: Members can book the equipment after completing an induction.

P04: What are the start and end times of the morning session?

Notice: The morning session runs from 10:00 to 12:00.

A: It starts at 10:00 and ends at 12:00.

B: It starts at 10:00.

P05: Which room should attendees use after the correction?

Notice: Original notice: use Room B. Later correction: use Room C instead of Room B.

A: Use Room B.

B: Use Room D.

P06: How many people can the studio hold?

Notice: The studio is on the ground floor. Its capacity is not listed.

A: The studio capacity is not specified.

B: The notice does not specify the studio capacity.

Assign every pair to one of four groups: both pass, only A passes, only B passes, or both fail. A tie can mean shared success or shared failure; keep those two kinds of tie separate.

3. Compare with the worked judgments

Show every score and its reason
Example judgments: supported / complete, where 1 means pass
CaseABReason
P011 / 11 / 1Both give the stated 18:00 start.
P020 / 11 / 1A invents Thursday. B leaves the missing deadline unknown.
P031 / 01 / 1A omits the induction condition the question asks for. B includes it.
P041 / 11 / 0B states a supported start time but omits the requested 12:00 end.
P050 / 10 / 1A repeats the superseded room; B invents Room D. The corrected room is C.
P061 / 11 / 1Both correctly leave capacity unknown.

P03's A response states an allowed group without explicitly saying induction is unnecessary, so it passes the narrow support check. It still fails the task because it omits the requested condition. If your intended use requires every eligibility statement to repeat its conditions, strengthen the rubric before evaluating further cases and re-score both candidates consistently.

4. Count improvements and regressions together

Paired result under the supplied answer key
OutcomeIDsCount
Both passP01, P062
Only A passesP041 regression from A to B
Only B passesP02, P032 improvements from A to B
Both failP051 shared failure

A passes 3/6 = 50%; B passes 4/6 ≈ 66.7%. The net change is one additional pass, or about 16.7 percentage points. It is not a 16.7% relative increase: relative to three initial passes, the increase is 1/3 ≈ 33.3%. Keep the six-case denominator attached to either description.

Among the three pairs whose pass result differs, B wins two and A wins one. Reporting only “B wins two out of three” leaves out the two shared successes and the shared failure. Report the full four-group table alongside the totals.

python compare_prompts.py comparison_cases.json answer_annotations.csv

Save all downloads in one folder before running that command. The standard-library script checks case IDs, validates binary labels and prints exact fractions. It tallies your supplied annotations; it cannot decide whether an answer is supported or complete. Its net_percentage_points_exact value is 50/3, or 16⅔ percentage points.

Show the complete tally checker
"""Tally supplied labels for a paired, fictional exercise; never judges text."""
import argparse
import csv
import json
from fractions import Fraction
from pathlib import Path


def evaluate(case_path, label_path):
    data = json.loads(Path(case_path).read_text(encoding='utf-8-sig'))
    cases = data['cases']
    ids = [row['id'] for row in cases]
    if not ids or len(ids) != len(set(ids)):
        raise ValueError('Case IDs must be nonempty and unique.')
    with Path(label_path).open(encoding='utf-8-sig', newline='') as handle:
        rows = list(csv.DictReader(handle))
    label_ids = [row['case_id'] for row in rows]
    if len(label_ids) != len(set(label_ids)) or set(label_ids) != set(ids):
        raise ValueError('Provide exactly one annotation per case, with no extra IDs.')
    groups = {'both_pass': [], 'a_only': [], 'b_only': [], 'both_fail': []}
    for row in rows:
        fields = ['a_supported', 'a_complete', 'b_supported', 'b_complete']
        if any(row[field] not in ('0', '1') for field in fields):
            raise ValueError('Rubric fields must be 0 or 1.')
        a = row['a_supported'] == row['a_complete'] == '1'
        b = row['b_supported'] == row['b_complete'] == '1'
        group = 'both_pass' if a and b else 'a_only' if a else 'b_only' if b else 'both_fail'
        groups[group].append(row['case_id'])
    for values in groups.values():
        values.sort()
    total = len(ids)
    a_count = len(groups['both_pass']) + len(groups['a_only'])
    b_count = len(groups['both_pass']) + len(groups['b_only'])
    return {
        'scope': 'Tally of supplied fictional answer-key labels; no semantic judging.',
        'cases': total,
        'a_passes': a_count,
        'b_passes': b_count,
        'a_pass_fraction': str(Fraction(a_count, total)),
        'b_pass_fraction': str(Fraction(b_count, total)),
        'net_additional_passes': b_count - a_count,
        'net_percentage_points_exact': str(Fraction(100 * (b_count - a_count), total)),
        **groups,
    }


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('cases')
    parser.add_argument('annotations')
    args = parser.parse_args()
    try:
        print(json.dumps(evaluate(args.cases, args.annotations), indent=2))
    except (ValueError, KeyError, OSError) as exc:
        parser.exit(2, f'Input error: {exc}\n')

5. Write the next experiment

A supported conclusion is: “On these six fictional cases, B has one more passing answer overall. It fixes P02 and P03, regresses on P04, and still fails P05.” A useful next development step is to test an explicit check for every requested time and for later corrections. Keep the P04 regression visible while making that change.

These cases become development material once you use them to revise a prompt. In a real evaluation, hold the model version, settings, tools, input context and scoring rules fixed when comparing prompt versions; record repeated runs if output varies. Evaluate the chosen change on fresh held-out cases. This tiny fabricated comparison establishes neither a statistical improvement nor a result for any commercial model.

If scoring the responses was harder than counting them, practice support and completeness checks. If repeated case runs are unfamiliar, start with the smaller project review exercise. For a separate evaluation decision involving precision and recall, try the threshold worked example.

Sources and scope

OpenAI's evaluation best-practices guide discusses criteria-based pairwise comparisons and response-order and verbosity bias. Google's dataset-splitting lesson explains why repeatedly using evaluation data for development weakens the evaluation. Sources checked 25 October 2026. The rubric, examples, labels and arithmetic here are our own exercise.