Semantic Cache v0.6.0
Added
- Built-in keyword-overlap rerank factory —
createKeywordOverlapRerank()blends cosine similarity with word overlap. Supportscompare: 'prompt'(equivalence, default) andcompare: 'response'(relevance), with configurablecosineWeight. - Stored prompt exposed on rerank candidates — candidates now include a
promptkey (additive). cachedPromptin judge context — judge context carries the stored prompt text (reserved, inert by default).- Cost instrumentation — similarity-window entries record
cost_saved_microsfor hits; a subsequentstore()retroactively populates the cost of the preceding miss. Powers BetterDB Monitor's cost-weighted threshold recommendations.
Fixed
- Miss-pending zset is pruned and flushed — entries older than the 5-minute bound are pruned on every record, so miss-only traffic cannot grow the bookkeeping zset unbounded;
flush()now deletes the miss-pending key.
Full Changelog: semantic-cache-v0.5.1...semantic-cache-v0.6.0
Full Changelog: v0.23.0...semantic-cache-v0.6.0