FA-11846 / Search retrieval semantics / Open access
Synonym expansion changes a conjunction into a broad disjunction · case 01
Synonym expansion changes a conjunction into a broad disjunction.
ROOT CAUSE
Flattening synonym alternatives loses the required conjunction between query positions.
VERIFIED REPAIR
Require one document term from every alternative group.
Unsuccessful approach: Requiring every expanded token makes alternatives mandatory together.
Case contract
Return whether a token set satisfies all nonempty synonym groups. Each group is OR; groups are AND. Empty query matches; empty group cannot match.
Why this case matters
An offline deterministic retrieval model isolates this search contract from tokenization, storage, and network behavior.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, groups):
return any(t in tokens for group in groups for t in group)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
term='car'+str(N)
check('one synonym per position', solve([term,'red'], [[term,'auto'],['red']]), True)
check('missing required position', solve([term], [[term,'auto'],['red']]), False)
check('alternate spelling', solve(['auto','red'], [[term,'auto'],['red']]), True)
check('no query', solve([], []), True)
check('empty alternative group', solve([term], [[]]), False)
check('unrelated document', solve(['blue'], [[term,'auto']]), False)
check('single exact term', solve([term], [[term]]), True)
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 |
|---|---|---|---|
| one synonym per position | True | True | Passed |
| missing required position | True | False | Failed |
| alternate spelling | True | True | Passed |
| no query | False | True | Failed |
| empty alternative group | False | False | Passed |
| unrelated document | False | False | Passed |
| single exact term | True | True | Passed |
SHA-256 / ffc4e070d6d5f8c3b6c8791dfd1bb10e2dc821d8bcaeb06fc43c25c91da5019c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, groups):
return all(t in tokens for group in groups for t in group)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
term='car'+str(N)
check('one synonym per position', solve([term,'red'], [[term,'auto'],['red']]), True)
check('missing required position', solve([term], [[term,'auto'],['red']]), False)
check('alternate spelling', solve(['auto','red'], [[term,'auto'],['red']]), True)
check('no query', solve([], []), True)
check('empty alternative group', solve([term], [[]]), False)
check('unrelated document', solve(['blue'], [[term,'auto']]), False)
check('single exact term', solve([term], [[term]]), True)
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 |
|---|---|---|---|
| one synonym per position | False | True | Failed |
| missing required position | False | False | Passed |
| alternate spelling | False | True | Failed |
| no query | True | True | Passed |
| empty alternative group | True | False | Failed |
| unrelated document | False | False | Passed |
| single exact term | True | True | Passed |
SHA-256 / cd8bb2db51370a5e58ce980fbfed5182e69c5f615f6a32388ebdd49cdcb6f9c1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, groups):
return all(any(t in tokens for t in group) for group in groups)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
term='car'+str(N)
check('one synonym per position', solve([term,'red'], [[term,'auto'],['red']]), True)
check('missing required position', solve([term], [[term,'auto'],['red']]), False)
check('alternate spelling', solve(['auto','red'], [[term,'auto'],['red']]), True)
check('no query', solve([], []), True)
check('empty alternative group', solve([term], [[]]), False)
check('unrelated document', solve(['blue'], [[term,'auto']]), False)
check('single exact term', solve([term], [[term]]), True)
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 |
|---|---|---|---|
| one synonym per position | True | True | Passed |
| missing required position | False | False | Passed |
| alternate spelling | True | True | Passed |
| no query | True | True | Passed |
| empty alternative group | False | False | Passed |
| unrelated document | False | False | Passed |
| single exact term | True | True | Passed |
SHA-256 / f3786ad3942ff52b7c51a41fc357825f73c69cb5ab875aab7415dc318eea621c
Verification & scope
Inputs are already tokenized or scored; this model makes no claim about production engine performance or linguistic analysis. 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-29T14:38:51.552980+00:00.
Case digest / 0007d01cd62955986e3a0b252858a7c0e6d934b099088c985818af9ae16c6929