lmstudio-ai / lmstudio-ai/docs

Feature request: Add rerank endpoint

Open
#162 0 comments 48 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
MDX
Stars
172
Forks
128
Avg merge
8m
Merged PRs (30d)
1

Description

Dear LM Studio Team,

Thank you for building such a powerful and user-friendly platform for running local LLMs. LM Studio has become an essential tool for many developers working with private, offline language models.

I’d like to propose a new feature that would significantly enhance LM Studio’s capabilities in Retrieval-Augmented Generation (RAG) pipelines: a built-in document reranking endpoint.

Currently, LM Studio supports document retrieval and embedding generation, but there is no native way to rerank retrieved documents based on their relevance to a given query before they are passed to the LLM. Reranking is a critical step in high-quality RAG systems—it improves precision by reordering candidate documents using a more sophisticated cross-encoder or specialized reranker model (e.g., BAAI/bge-reranker, Cohere rerankers, etc.).

Having a dedicated /rerank or /rank HTTP endpoint—similar to the existing /embed endpoint—would allow users to:

Send a query and a list of candidate documents (or passages),
Receive a ranked list of documents with relevance scores,
Seamlessly integrate reranking into local RAG workflows without relying on external services.
This feature would greatly improve the out-of-the-box RAG performance for LM Studio users and align the platform more closely with production-grade local AI stacks.

Thank you for considering this request. I believe it would be a valuable addition to LM Studio’s growing set of local inference capabilities.

Best regards,

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

Start by reviewing the existing /embed endpoint and the documented retrieval and embedding workflow. Define the request shape for a query and candidate documents, then verify that the proposed endpoint returns reordered documents with relevance scores and fits local RAG use cases.

Written by the indexing model from the issue text.

Assessment

Domain
ai, api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.