Two AI agents.
One real bug.
A verified repair.
GPT-6 found a mathematical defect in experimental ONNX semantic retrieval. Local Qwen2.5-Coder 7B recovered the task from OS29, reproduced failures and generated a partial fix. GPT-6 corrected the remaining expression, independently verified the result and integrated the patch into the experimental module.
What broke, and what correct looks like
Impossible cosine similarity above 1. An inflated vector magnitude incorrectly wins the ranking.
Top 1: capsule:inflated_magnitude cosine: 20.000000 pytest: 5 failed, 2 passed
The best semantic angle wins regardless of vector magnitude.
Top 1: capsule:best_angle cosine: 0.800000 pytest: 7 passed
The real work, step by step
Discover and reproduce
Find the unnormalized dot product in rank_vectors, build seven tests in an isolated copy and reproduce five failures.
Independent patch attempt
Recover the requirements using the OS29 Work Unit ID. Qwen 3B and 7B attempt patches; incomplete results are rejected. Qwen 7B produces a nearly correct normalization.
Repair and acceptance
Correct one transpose and normalization expression, run 50 × 12 reference comparisons, real ONNX checks, the full regression suite and Golden/Gate checks.
One expression made the difference
scores = np.dot(
query / query_norm,
doc_vectors.T / doc_norm
)Normalizing after transposition does not respect matrix dimensions.
scores = np.dot(
query / query_norm,
(doc_vectors / doc_norm).T
)Normalize each document first, then transpose the matrix.
Independent verification
Five failing tests before; 7/7 passed after. The experimental original was not changed before the isolated copy was accepted.
Reference cosine comparisons across randomized magnitudes.
Two real queries against the local cache, without changing the canonical database.
433 passed in 31.92s, exit code 0.
GOLDEN_STATE_COMPARE_PASS and FLIGHT_RECORDER_GATE_PASS; no new baseline promotion.
Checkpoints, test results and receipts were retained in the private laboratory.
Explore the public evidence
The figures above are historical local results, not tests executed by this web page. The public Core provides a separate reproducible demonstration and technical explanation.
Read the technical report · Reproduce the public example · Install OS29 Core