Why does an hybrid search with alpha=0 match an objects that has none of the keywords?

Title says all :slight_smile:
A picture is sometimes hlping. My beautiful hybrid queries interface:


where you can see Alpha is 0 and without needing to understand Italian you can maybe see that the 3 terms in the search box are nowhere to be found in the text.

What is quite puzzling is that even though alpha is 0, the retrieved document would be plausible if some nearVector weight was used since it does talk about things that are related to the search terms.

Go figure … Ideas?

PS Is an hybrid query with an alpha=0 totally equivalent to a straight BM25 on the same properties?

hi @rjalex !

AFAIK, a hybrid with alfa=0 should be exactly the same of doing a bm25.

Can you provide a small dataset with a script to reproduce this? This will make it easier to investigate further.

Thanks!

1 Like

My bad @Duda :frowning: The behaviour is just as we expected.

The mistake is that I was doing the BM25 also on another field which I was not displaying:

response = wv_artcoll.query.hybrid(
        query=query_string,
        query_properties=[f"{WV_ENTITIES_PROPERTY}^2", WV_VECTOR_PROPERTY],
        vector=query_vector,
        target_vector=graphql_model_name,
        limit=request.result_limit,
        alpha=request.alpha,
        return_metadata=MetadataQuery(score=True, explain_score=True),
    )

so for example now that I also print the WV_ENTITIES_PROPERTY (in smaller text under the WV_VECTOR_PROPERTY), as expected I always see the searched string:

1 Like

Awesome!

Glad it is working as expected!!

1 Like