Skip to content

v4.5.0 — Hybrid Search Ranking & Routing Fix

Latest

Choose a tag to compare

@lyonzin lyonzin released this 07 Jul 01:11
f433745

Two search-quality changes ship together in v4.5.0. Both are additive from a public-API standpoint (no signature changes, routed_by field unchanged).

Fixed

  • search_knowledge now searches the entire index when the caller omits category_filter. The internal keyword router previously acted as a hard where-filter on both semantic and BM25 branches, so a query whose terms happened to map to a sparsely-populated category could return two documents while thousands of relevant chunks in other categories were silently dropped. The router is now informational only — the routed_by field is still populated for telemetry, but the candidate set is never restricted. Explicit category_filter=... continues to filter BM25 consistently with #109. (#112)

Added

  • Path-metadata ranking boost in hybrid search. When query terms match a chunk's indexed source or filename metadata, hybrid search now applies a small bounded boost (capped at ~20% of typical RRF magnitudes) before final sorting/reranking. This helps navigational queries surface the canonical file for a topic instead of adjacent files that only cross-reference it. Public API unchanged. (#110, thanks @Hohlas)

Tests

  • New TestKeywordRoutingBehavior (3 tests) pins the routing fix.
  • New TestPathAwareRanking covers the path-metadata boost.
  • Baseline: 266 → 271.

Upgrade note

Warm query_cache entries from before v4.5.0 should be invalidated by restarting the server so cached responses no longer reflect the pre-fix restrictive behavior.