Updates:
Search speed — 35x faster
Keyword search checked every passage in the library for every question. It now jumps straight to passages containing the search terms.
Over 32,000 passages: 44ms → 1.25ms per query. The gain grows as the library grows — this scales, rather than being tuned.
Upload processing — 160x faster
Duplicate-text removal compared every paragraph against every other. On a long book, 12.5 seconds. Now grouped so only plausible matches are compared: 0.08 seconds.
Both exact, not approximations
Speed here usually costs accuracy. Neither does. The duplicate check is provably complete by a mathematical guarantee, enforced by an assertion in the code.
Verified by running old and new side by side: scores identical, results identical, at every size tested.
