Skip to content

fix: probe and fix stagkraph search#1250

Open
fayekelmith wants to merge 2 commits intostakwork:mainfrom
fayekelmith:fix/stakgraph-search-probing
Open

fix: probe and fix stagkraph search#1250
fayekelmith wants to merge 2 commits intostakwork:mainfrom
fayekelmith:fix/stakgraph-search-probing

Conversation

@fayekelmith
Copy link
Copy Markdown
Collaborator

@fayekelmith fayekelmith commented May 10, 2026

Changes:

  • Score floor on vector results (drops weak matches)
  • Multi-word fulltext queries use OR + phrase boost instead of AND
  • Lucene special-char escape fix (prevents crashes on paths like /api/[id])
  • Vector over-fetch (limit × 3) for better RRF candidate pool
  • RRF overlap bonus for results appearing in both vector + fulltext
  • Fulltext index includes description field

Benefits:

  • 100% Hit@1 on exact symbols, endpoints, datamodels
  • 95% Hit@3 on natural-language semantic queries
  • No more search crashes on bracket-containing API paths
  • 138-query stress test at 98% Hit@3 / 99% Hit@5

@fayekelmith fayekelmith requested a review from Evanfeenstra as a code owner May 10, 2026 18:19
@fayekelmith fayekelmith force-pushed the fix/stakgraph-search-probing branch from ac7fb13 to 3423d91 Compare May 11, 2026 05:36
At K=60 all search results had virtually identical RRF scores (rank1=0.0164
vs rank5=0.0154, only 6.2% spread). Agents could not discriminate result
quality, leading to bash fallback after every search.

At K=5: rank1=0.1667 vs rank5=0.1000 (40% spread). Overlap-bonus results
now visibly dominate (score=0.50 vs 0.17 for single-source results).

Stress test (138 queries, sphinx-bounties): Hit@1=90%, Hit@3=98%, Hit@5=99%
No regression from K=60.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant