Skip to content

Remove semantic search and DSR adaptive retrieval pipeline#25

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/refactor-query-capabilities
Draft

Remove semantic search and DSR adaptive retrieval pipeline#25
Copilot wants to merge 2 commits intomainfrom
copilot/refactor-query-capabilities

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

The semantic CLI command and semantic_search MCP tool use hash-based SQ8 vector similarity, which cannot produce meaningful semantic results without a real embedding model. The DSR (Dual Search & Reranking) adaptive retrieval pipeline compounds this by fusing unreliable vector scores with graph/symbol results. This makes basic queries like git-ai ai query and git-ai ai graph find unreliable.

Removes these inaccurate search paths, keeping only deterministic index-based search (symbol matching via LanceDB, AST graph queries via CozoDB).

CLI

  • Remove semantic command from src/commands/ai.ts
  • Remove semantic handler registration from src/cli/registry.ts

MCP Server

  • Remove semantic_search tool definition, handler, schema, and server registration across src/mcp/{tools,handlers,schemas,server}.ts

Core

  • Strip DSR pipeline (classifyQuery, expandQuery, fuseResults, rerank, computeWeights) from src/core/search.ts

Tests

  • Update mcp.smoke.test.js to assert semantic_search is not registered
  • Remove semantic CLI invocations from e2e.test.js
  • Remove runAdaptiveRetrieval test from retrieval.test.ts

What stays

Symbol search, graph queries (find/children/refs/callers/callees/chain), file search, repo-map, and all indexing/pack/hooks/serve commands remain unchanged. The underlying src/core/retrieval/ module source files are retained but no longer surfaced to users.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…val from search.ts

- Remove semantic CLI command from ai.ts aggregator
- Remove semantic handler from CLI registry
- Remove semantic_search MCP tool definition, handler, and schema
- Remove semantic_search from MCP server schema map
- Remove DSR adaptive retrieval pipeline from core/search.ts
- Update MCP smoke test to verify semantic_search is not registered
- Remove semantic_search tool call from MCP smoke test
- Remove semantic CLI command tests from e2e test
- Remove runAdaptiveRetrieval test from retrieval test

Co-authored-by: mars167 <29228178+mars167@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor query capabilities for accurate results Remove semantic search and DSR adaptive retrieval pipeline Feb 13, 2026
Copilot AI requested a review from mars167 February 13, 2026 04:03
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.

2 participants