Skip to content

Semantic Cache v0.6.0

Choose a tag to compare

@KIvanow KIvanow released this 11 Jun 12:17
461a522

Added

  • Built-in keyword-overlap rerank factorycreateKeywordOverlapRerank() blends cosine similarity with word overlap. Supports compare: 'prompt' (equivalence, default) and compare: 'response' (relevance), with configurable cosineWeight.
  • Stored prompt exposed on rerank candidates — candidates now include a prompt key (additive).
  • cachedPrompt in judge context — judge context carries the stored prompt text (reserved, inert by default).
  • Cost instrumentation — similarity-window entries record cost_saved_micros for hits; a subsequent store() 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