FA-99571 / RAG context assembly / Open access
Rank-ordered evidence crowds out other sources · case 01
Rank-ordered evidence crowds out other sources.
ROOT CAUSE
Candidates are emitted in one global ranking order even when source coverage is required.
THE FAILURE
Candidates are emitted in one global ranking order even when source coverage is required.
Unsuccessful approach: Sorting sources alphabetically changes the intended first-seen source order.
Case contract
Rows are [source,text] in rank order. Return at most k by round-robin passes across sources in first-seen order.
Why this case matters
A small deterministic evidence assembly model makes context budgeting behavior inspectable.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, k):
return rows[:k]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='z'+str(N); b='a'+str(N)
check('balanced top three', solve([[a,'1'],[a,'2'],[b,'3'],[b,'4']],3), [[a,'1'],[b,'3'],[a,'2']])
check('single source order', solve([[a,'1'],[a,'2']],2), [[a,'1'],[a,'2']])
check('k zero', solve([[a,'1']],0), [])
check('empty', solve([],N), [])
check('new source later', solve([[a,'1'],[a,'2'],[b,'3']],4), [[a,'1'],[b,'3'],[a,'2']])
check('one each', solve([[b,'1'],[a,'2']],2), [[b,'1'],[a,'2']])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| balanced top three | [['z1', '1'], ['z1', '2'], ['a1', '3']] | [['z1', '1'], ['a1', '3'], ['z1', '2']] | Failed |
| single source order | [['z1', '1'], ['z1', '2']] | [['z1', '1'], ['z1', '2']] | Passed |
| k zero | [] | [] | Passed |
| empty | [] | [] | Passed |
| new source later | [['z1', '1'], ['z1', '2'], ['a1', '3']] | [['z1', '1'], ['a1', '3'], ['z1', '2']] | Failed |
| one each | [['a1', '1'], ['z1', '2']] | [['a1', '1'], ['z1', '2']] | Passed |
SHA-256 / 86207b285fadb0a9ab8b6aeb5b7c23c3cab8f1437a2ce236306ea43f634217c8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, k):
groups={}
for s,t in rows: groups.setdefault(s,[]).append([s,t])
return [r for s in sorted(groups) for r in groups[s]][:k]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='z'+str(N); b='a'+str(N)
check('balanced top three', solve([[a,'1'],[a,'2'],[b,'3'],[b,'4']],3), [[a,'1'],[b,'3'],[a,'2']])
check('single source order', solve([[a,'1'],[a,'2']],2), [[a,'1'],[a,'2']])
check('k zero', solve([[a,'1']],0), [])
check('empty', solve([],N), [])
check('new source later', solve([[a,'1'],[a,'2'],[b,'3']],4), [[a,'1'],[b,'3'],[a,'2']])
check('one each', solve([[b,'1'],[a,'2']],2), [[b,'1'],[a,'2']])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| balanced top three | [['a1', '3'], ['a1', '4'], ['z1', '1']] | [['z1', '1'], ['a1', '3'], ['z1', '2']] | Failed |
| single source order | [['z1', '1'], ['z1', '2']] | [['z1', '1'], ['z1', '2']] | Passed |
| k zero | [] | [] | Passed |
| empty | [] | [] | Passed |
| new source later | [['a1', '3'], ['z1', '1'], ['z1', '2']] | [['z1', '1'], ['a1', '3'], ['z1', '2']] | Failed |
| one each | [['a1', '1'], ['z1', '2']] | [['a1', '1'], ['z1', '2']] | Passed |
SHA-256 / bff1de75772580dc4b8a10b7002e02909039373e0869a1fdbcd36a2a9066aed0
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
Toy inputs and token counts only; this does not claim compatibility with a tokenizer, prompt format, or production retrieval system. 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:25.802004+00:00.
Case digest / 83081b8fb246f0a4097ac9522316a6d53c603e343beb210d30ac61dc3685f9ed