LengthRatioGuard
Rejects matches where one prompt is far longer than the other.
A one-line question and a three-paragraph one rarely want the same answer even when they cover the same topic, and length is a decent proxy for how much detail was asked for. It is only a proxy, though — "python list reverse" and "How do I reverse a list in Python?" are a four-fold difference in tokens and the same question — so this guard is not part of MatchGuards.standard. Reach for it through MatchGuards.strict, or add it directly, when your traffic mixes short queries with long ones and you would rather pay for the call.
Properties
Link copied to clipboard
Short stable identifier, surfaced in dev.kmemo.CacheLookup.Miss.detail.