Skip to content

feat(search): hybrid scoring calibration, AST context enrichment, and inspector redesign - #36

Merged
spelech merged 11 commits into
mainfrom
feat/search-inspector-hybrid-scoring
Oct 3, 2026
Merged

spelech merged 11 commits into
mainfrom
feat/search-inspector-hybrid-scoring

Conversation

@spelech

@spelech spelech commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

This PR addresses search calibration, AST context enrichment, and Inspector UX improvements:

  1. Dynamic Hybrid Calibration & Search Modes:

    • Resolved BM25 suppression where fixed 70/30 dense bias capped exact symbol/keyword matches at 0.30.
    • Introduced dynamic dense weight parameter dense_weight (alpha in [0.0, 1.0]) with a balanced 0.5 default.
    • Added support for explicit search_mode: hybrid, semantic (pure vector similarity), and lexical (pure BM25 sparse matching) across vector stores (Qdrant, Chroma, PGVector).
    • Extended vector search returns with decomposed scores (score, dense_score, sparse_score, dense_rank, sparse_rank).
  2. AST Metadata Context Enrichment:

    • Enriched search results with structural AST context queried from SQLite ast_symbols.
    • Populated exact function/method/class/struct signatures, container hierarchies (ContainerClass.method_name), clean symbol kind, and ast_symbol_id.
    • Updated MCP search tools (search_code, search_docs) to render rich markdown headers with symbol signatures, source permalinks, and percentage score breakdowns.
  3. Search Inspector Redesign & UX Polish:

    • Retained full code chunks for inspection without premature truncation.
    • Added 3-way search mode selector (Hybrid, Semantic, Lexical).
    • Added interactive hybrid split slider with quick presets (Balanced 50/50, Semantic Bias 70/30, Keyword Bias 30/70, Pure Semantic, Pure Lexical).
    • Added indexed repository dropdown datalist populated from /admin/api/repos.
    • Added score breakdown chips showing total combined score alongside dense and sparse component scores.
    • Implemented 1-click Open in Navigator bridge passing repo, file path, and start/end line bounds directly into CodeNavigator with automatic code viewer highlighting.
    • Added 1-click Copy Code snippet button.
  4. Testing & Verification:

    • Backend: All 538 tests passing (including Qdrant hybrid modes, search delegation, and FastMCP tool execution).
    • Frontend: All 32 test suites and 320 tests passing.
    • Synchronized REQUIREMENTS.md baseline (1018 automated tests).

@spelech
spelech merged commit 4cbc076 into main Oct 3, 2026
15 checks passed
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