Skip to content

Commit

Permalink
Merge pull request #54 from jamescalam/james/formula-typo
Browse files Browse the repository at this point in the history
changed hybrid scaling func to be clearer
  • Loading branch information
acatav authored Nov 12, 2023
2 parents eb5aa1f + d55e547 commit 6a23f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ encoder.encode_queries(["Who jumped over the lazy dog?"])
## Combining Sparse and Dense Encodings for Hybrid Search
To combine sparse and dense encodings for hybrid search, you can use the `hybrid_convex_scale` method on your query.

This method receives both a dense vector and a sparse vector, along with a convex scaling parameter `alpha`. It returns a tuple consisting of the scaled dense and sparse vectors according to the following formula: `alpha * dense_vector + (1 - alpha) * sparse_vector`.
This method receives both a dense vector and a sparse vector, along with a convex scaling parameter `alpha`. It returns a tuple consisting of the scaled dense and sparse vectors according to the following formula: `(alpha * dense_vector, (1 - alpha) * sparse_vector)`.
```python
from pinecone_text.hybrid import hybrid_convex_scale
from pinecone_text.sparse import SpladeEncoder
Expand Down

0 comments on commit 6a23f01

Please sign in to comment.