-
Notifications
You must be signed in to change notification settings - Fork 775
Closed
Milestone
Description
Make the following parameter updates:
keyword: Allow boolean (sets to BM25 like current) and string (sets to a scoring method)sparse: new parameter that enables sparse vector scoring. When set toTrueit will use a default sparse vector model, otherwise this should be set to a model pathdense: new parameter that is an alias forpath.Truesets the default dense vector model, otherwise this should be set to a model path.hybrid:Trueenables BM25 + vector search (like it does today). String supports hybrid indexes with a scoring method or sparse vector path
With this new pattern, embeddings can be created as follows.
from txtai import Embeddings
embeddings = Embeddings(keyword=True)
embeddings = Embeddings(keyword="bm25")
embeddings = Embeddings(sparse=True)
embeddings = Embeddings(sparse="prithivida/Splade_PP_en_v2")
embeddings = Embeddings(dense=True)
embeddings = Embeddings(dense="sentence-transformers/all-MiniLM-L6-v2")
embeddings = Embeddings(sparse=True, dense=True)
embeddings = Embeddings(hybrid=True)
embeddings = Embeddings(hybrid="prithivida/Splade_PP_en_v2")This change will be fully backwards compatible.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels