Skip to content

mcp: add unique_paths format mode for file-shortlist workflows - #9

Merged
julymetodiev merged 1 commit into
mainfrom
mcp-unique-paths-mode
May 9, 2026
Merged

julymetodiev merged 1 commit into
mainfrom
mcp-unique-paths-mode

Conversation

@julymetodiev

Copy link
Copy Markdown
Owner

format: paths returns one line per chunk hit, which means the same file appears multiple times when it matches at several locations. For agents that just want to know which files to look at (not which chunks), that's noise.

format: unique_paths collapses to one line per file, ordered by the best-scoring hit per file. The result is a clean shortlist — crates/foo/bar.rs per line, deduped, no line ranges.

For refs, dedupe spans both sections: definitions are listed first (authoritative), then any additional files surfaced by BM25. Same deduping logic, applied to the union.

Available on search, find_related, and refs — symmetric with the existing paths mode.

`format: paths` returns one line per chunk hit, which means the same
file appears multiple times when it matches at several locations. For
agents that just want to know *which files to look at* (not which
chunks), that's noise.

`format: unique_paths` collapses to one line per file, ordered by the
best-scoring hit per file. The result is a clean shortlist —
`crates/foo/bar.rs` per line, deduped, no line ranges.

For `refs`, dedupe spans both sections: definitions are listed first
(authoritative), then any additional files surfaced by BM25. Same
deduping logic, applied to the union.

Available on `search`, `find_related`, and `refs` — symmetric with
the existing `paths` mode.
@julymetodiev
julymetodiev merged commit 71006e1 into main May 9, 2026
1 check passed
kundeng added a commit to kundeng/Veles that referenced this pull request Jul 6, 2026
rerank: feed the transformer the UNION of BM25 + semantic recall (deduped)
instead of the hybrid-RRF set. On prose the static-semantic channel is
noise-floor, and RRF blended it in, demoting strong BM25 hits below the
recall window before the reranker saw them (measured: a correct snippet
sat at BM25 julymetodiev#9 but hybrid #22). Union guarantees strong lexical hits reach
the transformer. Regex lane untouched.

mcp: add the MCP `instructions` field to the initialize result so agents
learn which tool/mode to use, that prose queries need rerank:true with a
local /v1/embeddings server, and efficiency tips (path/lang/exclude,
token-cheap formats).

installer: install.sh version-parametrised to 0.6.1. Also stop tracking
release tarballs in git (they belong in GitHub Releases); gitignore them.

108 core tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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