LexicalDivergenceGuard
Rejects matches whose prompts share too few meaningful words. The backstop under the specialised guards: it catches the swaps nobody wrote a rule for.
Function words and politeness filler are stripped first, so "How do I kill a process on a port?" and "Hi, could you please tell me how to kill a process on a port? Thanks!" reduce to nearly the same set. What remains is compared with Jaccard overlap.
Two details do most of the work:
Typos are matched fuzzily. instal counts as install, so "how do i instal numpy wiht pip" still matches. Matching is capped at one edit between tokens of five characters or more, which is deliberately too strict to merge Austria with Australia.
minOverlap defaults low. Genuine paraphrases can share surprisingly few words — "How do I undo my last git commit?" and "I committed by mistake in git, how do I take that commit back?" overlap by about a quarter — so a threshold tuned to catch entity swaps on its own would reject real hits. The specialised guards handle the precise cases; this one only fires when two prompts have almost nothing in common and the embedding still claimed a match.
Properties
Short stable identifier, surfaced in dev.kmemo.CacheLookup.Miss.detail.