Skip to content

Conversation

sbatten
Copy link
Member

@sbatten sbatten commented Oct 17, 2025

Adds an experimental reranking endpoint to be fulfilled via ExP

@Copilot Copilot AI review requested due to automatic review settings October 17, 2025 17:45
@sbatten sbatten enabled auto-merge October 17, 2025 17:45
@sbatten sbatten self-assigned this Oct 17, 2025
@sbatten sbatten requested review from mjbvz and rebornix and removed request for Copilot and rebornix October 17, 2025 17:46
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 17, 2025
@Copilot Copilot AI review requested due to automatic review settings October 17, 2025 17:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds an experimental remote reranker service and integrates it into workspace chunk search when enabled.

  • Introduces IRerankerService and its implementation with a remote endpoint driven by experimentation.
  • Adds enableRerank option to search options and conditional remote rerank logic before existing local rerank flow.
  • Registers the new service in the VS Code extension service container.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/platform/workspaceChunkSearch/node/workspaceChunkSearchService.ts Injects reranker service and adds conditional remote rerank branch in search flow.
src/platform/workspaceChunkSearch/common/workspaceChunkSearch.ts Adds enableRerank flag to search options.
src/platform/workspaceChunkSearch/common/rerankerService.ts Implements remote reranking with endpoint lookup via experimentation service.
src/extension/extension/vscode-node/services.ts Registers the reranker service in the instantiation builder.

}

async rerank(query: string, documents: readonly FileChunkAndScore[], token: CancellationToken): Promise<readonly FileChunkAndScore[]> {
if (!documents.length || !this.isAvailable || !this._endpoint) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we warn if you call this service and it's not available?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we throw?

};

// If explicit rerank is enabled, use the remote reranker
if (options.enableRerank && this._rerankerService.isAvailable) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking if we really want to do this in the full workspace case too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what @rebornix does in this case today. I think if you explicitly pass "enable rerank" maybe. Or maybe you shouldn't even get the "full workspace" case but be treated as if you want ranked semantic chunks.

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.

3 participants