microsoft / microsoft/winml-cli

[Task] text-ranking model support

Open
#290 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

model / task scale P2 triaged
Dominant language
Python
Stars
40
Forks
11
Avg merge
1d 8h
Merged PRs (30d)
50

Description

Overview

Text ranking (a.k.a. cross-encoder reranking) takes a query and a set of candidate passages and scores their relevance. Unlike bi-encoder retrieval which embeds query and documents independently, a cross-encoder jointly encodes the pair for higher accuracy. This is typically the final scoring step in a retrieval-augmented generation (RAG) pipeline.

This is primarily a pipeline feature: cross-encoder reranking models can be built on top of existing text feature extraction support. The implementation involves adding a text-ranking pipeline class that wraps a sequence-classification model and accepts (query, [passages]) as input.

Agent Scenarios

  • RAG reranking agent: after BM25 or vector retrieval returns a candidate pool, rerank with a cross-encoder before passing top-k to an LLM for generation
  • Enterprise search agent: improve precision of document retrieval over internal wikis or code bases by reranking BM25 hits
  • Question answering agent: select the most relevant passage from a retrieved set before extracting or generating an answer
  • Recommendation agent: score user query against candidate items (product descriptions, articles) and surface the highest-relevance results

ModelKit Integration

wmk config → wmk build (ONNX export) → wmk perf → wmk eval

Requires implementing the text-ranking pipeline in ModelKit before model onboarding can begin.

Acceptance Criteria

  • Implement text-ranking pipeline (cross-encoder scoring of query–passage pairs)
  • Validate with top text-ranking models (>2k downloads on HuggingFace)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the existing text feature extraction and sequence-classification pipeline implementations, then trace the wmk config, build, perf, and eval flow. Done means a text-ranking pipeline accepts a query with candidate passages, scores each pair, and is validated with popular text-ranking models.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.