-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Description
What happened?
Hi, I implemented a prefech retriever.
I am using the model:
SparseTextEmbedding("Qdrant/bm25")
TextEmbedding("sentence-transformers/paraphrase-multilingual-mpnet-base-v2")
LateInteractionTextEmbedding("answerdotai/answerai-colbert-small-v1")
I tried the query: "Errore 0x000006D9"
This is the abnormal behaviour:
with fastembed version 0.5.1 it retrieves the right qdrant docuemnt
From fastembed 0.6.0 to 0.7.1 it retrieves the wrong qdrant document
instead, if the query is: "Erro 0x000006D9" or "Erro 0x000006D9" it works fine.
This is my function;
def retrieve_with_prf(query, limit=5, k_feedback=3):
try:
sparse_vec = list(sparse_embedding_model.embed([query]))[0]
initial_results = client.query_points(
collection_name=collection_name,
query=models.SparseVector(**sparse_vec.as_object()),
using=sparse_vector_name,
with_payload=True,
limit=k_feedback
)
if not initial_results or not initial_results.points:
return []
feedback_texts = [
p.payload.get('text', '')[:1000]
for p in initial_results.points
if p.payload.get('text')
]
if not feedback_texts:
return []
feedback_embeddings = list(dense_embedding_model.embed(feedback_texts))
avg_vec = np.mean(feedback_embeddings, axis=0).tolist()
return client.query_points(
collection_name=collection_name,
query=avg_vec,
using=dense_vector_name,
with_payload=True,
limit=limit
)
except Exception:
return []
What is the expected behaviour?
No response
A minimal reproducible example
No response
What Python version are you on? e.g. python --version
python 3.13
FastEmbed version
v0.7.1
What os are you seeing the problem on?
No response
Relevant stack traces and/or logs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels