Skip to content

docs: add FastembedColbertRanker to fastembed integration page#442

Merged
anakin87 merged 3 commits intodeepset-ai:mainfrom
dina-deifallah:docs/add-fastembed-colbert-ranker
Apr 16, 2026
Merged

docs: add FastembedColbertRanker to fastembed integration page#442
anakin87 merged 3 commits intodeepset-ai:mainfrom
dina-deifallah:docs/add-fastembed-colbert-ranker

Conversation

@dina-deifallah
Copy link
Copy Markdown
Contributor

Summary

Updates the fastembed integration page to include the new FastembedColbertRanker component from deepset-ai/haystack-core-integrations#3135.

  • Added FastembedColbertRanker to the components list alongside FastembedRanker
  • Added a new "Example with ColBERT ranker" section with a working pipeline code snippet
  • Added a note on unnormalized ColBERT scores

Related

🤖 Generated with Claude Code

Updates the fastembed integration page to include the new
FastembedColbertRanker component from PR #3135, which adds
ColBERT late-interaction reranking support via fastembed.

- Added FastembedColbertRanker to the components list
- Added a usage example with ColBERT ranker in a pipeline

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dina-deifallah dina-deifallah requested a review from a team as a code owner April 13, 2026 11:49
@kacperlukawski kacperlukawski self-requested a review April 13, 2026 13:11
Copy link
Copy Markdown
Member

@kacperlukawski kacperlukawski left a comment

Choose a reason for hiding this comment

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

Hey, thanks for contributing @dina-deifallah! I have some minor comments. One question: do we allow choosing a metric used to calculate the maxsim score in the implementation? If so, it would be great to mention the parameter in the example.

Comment thread integrations/fastembed.md Outdated

### Example with ColBERT ranker

`FastembedColbertRanker` uses ColBERT late-interaction scoring: the query and documents are encoded independently into token-level embeddings, and a MaxSim score is computed for each document. This offers stronger ranking quality than cross-encoders on many tasks while remaining efficient.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

According to the benchmarks, cross-encoders are stronger than late interaction. Models, such as ColBERT, are used as a middle ground due to their scalability and performance.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback Kacper. That makes sense. I committed your suggested changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I took a look at the ColBERTv2 paper to check about the metric. The current implementation doesn't expose a metric parameter. It uses dot product similarity via np.matmul, which is the standard ColBERT approach. Since fastembed's LateInteractionTextEmbedding returns L2-normalized embeddings (as described in the ColBERTv2 paper, Santhanam et al., 2021 — https://arxiv.org/abs/2112.01488), dot product and cosine similarity are mathematically equivalent for these models, so the ranking order is the same regardless of metric. For that reason, no metric parameter is needed for the current supported models.

Comment thread integrations/fastembed.md Outdated
Co-authored-by: Kacper Łukawski <kacperlukawski@users.noreply.github.com>
Copy link
Copy Markdown
Member

@kacperlukawski kacperlukawski left a comment

Choose a reason for hiding this comment

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

LGTM, but I assume a corresponding PR in the integration itself has to be merged first

@anakin87
Copy link
Copy Markdown
Member

@dina-deifallah @kacperlukawski

This component has been renamed to FastembedLateInteractionRanker. So I updated the current PR in 9745bcb.

In the meantime, we also released a new version of the integration, containing this new component: https://pypi.org/project/fastembed-haystack/2.2.0/

Merging this PR now

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