Skip to content

Does this work with re-rankers? #166

Answered by michaelfeil
cduk asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, see this setion in readme (0.0.30)

Reranking

Reranking gives you a score for similarity between a query and multiple documents.
Use it in conjunction with a VectorDB+Embeddings, or as standalone for small amount of documents.
Please select a model from huggingface that is a AutoModelForSequenceClassification with one class classification.

import asyncio
from infinity_emb import AsyncEmbeddingEngine, EngineArgs
query = "What is the python package infinity_emb?"
docs = ["This is a document not related to the python package infinity_emb, hence...", 
    "Paris is in France!",
    "infinity_emb is a package for sentence embeddings and rerankings using transformer models in Python!"]
engi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cduk
Comment options

Answer selected by michaelfeil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #165 on March 21, 2024 18:38.