HubCloneHubClone
Tasks

Text Ranking

Text ranking models re-order candidate passages by how relevant they are to a query.

Inputs

Input

Example input

Text Ranking Model

Output

Output

Example output

About Text Ranking

Text ranking models re-order candidate passages by how relevant they are to a query. Browse text ranking models on HubClone to compare checkpoints, or open a Space to try one in the browser.

Use Cases

Search re-ranking

Improve the top results of a keyword search.

Retrieval-augmented generation

Pick the passages a language model should read.

Inference

The Transformers pipeline API runs text ranking models in a few lines. Replace <model-id> with any model listed on this page.

from transformers import pipeline

pipe = pipeline("text-ranking", model="<model-id>")
pipe("Example input")

Useful Resources

Want to dig deeper into the topic? Great! Here is a hand-picked list of resources we found helpful.

Documentation

  • Text Ranking task guide
  • Pipelines reference

Notebooks

  • Fine-tuning a text ranking model