Hi, I am trying to perform a hybrid search with alpha=0.5
and am getting responses, but I would like to validate the search process. To do so, I printed the scores from the metadata. However, I observed that for every document in the results, the score is the same, i.e., 0.5.
Here is my code snippet:
response = collection.query.hybrid(
query="my query",
query_properties=["test"],
alpha=0.5,
fusion_type=HybridFusion.RELATIVE_SCORE,
return_metadata=MetadataQuery(score=True, explain_score=True),
limit=5,
)
for o in response.objects:
print(o.properties)
print(o.metadata.score,o.metadata.explain_score)
Example Output:
- Document 1 Result:
Hybrid (Result Set keyword, bm25) Document854678e5-af01-4658-b55f-0427c0544a32
:
Original score:15.578449
, Normalized score:0.5
- Document 2 Result:
Hybrid (Result Set vector, hybridVector) Documentd745302e-84a6-42d9-bee1-5b104be285e3
:
Original score:0.7183615
, Normalized score:0.5
Observations:
- When
alpha=0.5
, the normalized scores for all documents are the same (0.5), irrespective of the query type. - When experimenting with
alpha
:
- At
alpha=0
(pure keyword search), the scores differ for each document. - At
alpha=1
(pure vector search), the normalized scores are again the same for all documents.
Query: Am I missing something in my implementation or understanding of the hybrid search process? Could you provide any suggestions or clarifications on this behavior?