MatchGuards
Ready-made guard sets for dev.kmemo.SemanticCache.
Pick by how much a wrong answer costs you:
| Preset | Use when |
|---|---|
| standard | Default. Every guard that pays for itself, tuned to reject no genuine paraphrase. |
| strict | A wrong answer is expensive. Trades hit rate for margin. |
| none | Similarity alone. Only with a dev.kmemo.Verifier, or a private benchmark. |
standard takes an optional GuardVocabulary or Locale, so the same guards run against another language's markers — see Vocabularies for the packs that ship.
Functions
No guards: the similarity threshold decides alone.
The default set: one guard per way a near-miss slips past a similarity threshold, wired to the English GuardVocabulary.
standard, but reading every marker from vocabulary — the way to run the guards against a non-English language, or a customized marker set. NumericGuard is language-agnostic and takes no markers; every other guard is fed from the pack.
standard for a locale's language, using the shipped Vocabularies pack.
standard with the tolerant edges pulled in: prompts must share meaningfully more wording, and a large length gap is enough to refuse on its own.