FAILURE MAP
← Case archive

FA-100056 / Preference pair construction / Open access

Preference pairs: responses from different prompts are compared · case 01

responses from different prompts are compared.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

A global score sort ignores the prompt identity that defines comparability.

THE FAILURE

A global score sort ignores the prompt identity that defines comparability.

Unsuccessful approach: Grouping by prompt but relying on input order for equal scores makes tied endpoints depend on row order.

Case contract

Rows are [prompt,id,score]. For each prompt with at least two rows, return [prompt,max_id,min_id] in first-seen prompt order; ties break by lexical ID.

Why this case matters

A small deterministic preference-data transform makes pair semantics inspectable without a training framework.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows):
    s=sorted(rows,key=lambda r:(r[2],r[1]))
    return [[s[-1][0],s[-1][1],s[0][1]]] if len(s)>1 else []
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
p='p'+str(N); q='q'+str(N)
rows=[[p,'a',N],[q,'x',N+5],[p,'b',0],[q,'y',1]]
check('separate prompts',solve(rows),[[p,'a','b'],[q,'x','y']])
check('singleton group omitted',solve([[p,'a',N],[q,'x',1],[q,'y',0]]),[[q,'x','y']])
check('empty',solve([]),[])
check('single row',solve([[p,'a',N]]),[])
check('tie lexical ids',solve([[p,'a',N],[p,'z',N]]),[[p,'z','a']])
check('input group order',solve([[q,'b',N],[p,'a',N+1],[q,'a',0]]),[[q,'b','a']])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
separate prompts[['q1', 'x', 'b']][['p1', 'a', 'b'], ['q1', 'x', 'y']]Failed
singleton group omitted[['q1', 'x', 'y']][['q1', 'x', 'y']]Passed
empty[][]Passed
single row[][]Passed
tie lexical ids[['p1', 'z', 'a']][['p1', 'z', 'a']]Passed
input group order[['p1', 'a', 'a']][['q1', 'b', 'a']]Failed

SHA-256 / d75cb8e80bb07f4810749abce49b9f1ca61fb8f3cc0aa504255566b8baf77071

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows):
    groups={}
    for r in rows: groups.setdefault(r[0],[]).append(r)
    sorted_rows=sorted(rows,key=lambda r:(r[2],r[1]))
    return [[p,max(g,key=lambda r:r[2])[1],min(g,key=lambda r:r[2])[1]] for p,g in groups.items() if len(g)>1]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
p='p'+str(N); q='q'+str(N)
rows=[[p,'a',N],[q,'x',N+5],[p,'b',0],[q,'y',1]]
check('separate prompts',solve(rows),[[p,'a','b'],[q,'x','y']])
check('singleton group omitted',solve([[p,'a',N],[q,'x',1],[q,'y',0]]),[[q,'x','y']])
check('empty',solve([]),[])
check('single row',solve([[p,'a',N]]),[])
check('tie lexical ids',solve([[p,'a',N],[p,'z',N]]),[[p,'z','a']])
check('input group order',solve([[q,'b',N],[p,'a',N+1],[q,'a',0]]),[[q,'b','a']])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
separate prompts[['p1', 'a', 'b'], ['q1', 'x', 'y']][['p1', 'a', 'b'], ['q1', 'x', 'y']]Passed
singleton group omitted[['q1', 'x', 'y']][['q1', 'x', 'y']]Passed
empty[][]Passed
single row[][]Passed
tie lexical ids[['p1', 'a', 'a']][['p1', 'z', 'a']]Failed
input group order[['q1', 'b', 'a']][['q1', 'b', 'a']]Passed

SHA-256 / 8fff7a060a1557b8a82f20c1bf41283a2d7859209bc1ebcbe3db01b0645a339b

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

These are explicit toy record contracts; they do not claim compatibility with a trainer or improved model behavior. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-30T16:48:31.262459+00:00.

Case digest / aca9680eec188be6166219bf793c4d18595ec9e774ac12bf6402054af19020d8