Guides
Working with Splade v2
Learn how to use splade with TVI.
What is splade?
Splade
is similar to other inverted index approaches like bm25
. Splade
includes neural term expansion, meaning that it is able to match on synonym’s much better than traditional bm25
Using Splade with Trieve Vector Inference
1
Update embedding_models.yaml
To use splade with Trieve Vector Inference, you will need to adapt both the doc
and query
models
The splade document
model is the model you use to encode files, where the query
model is the one to encode the query that you will be searching with
embedding_models.yaml
models:
# ...
spladeDoc:
replicas: 1
modelName: naver/efficient-splade-VI-BT-large-doc
isSplade: true
spladeQuery:
replicas: 1
modelName: naver/efficient-splade-VI-BT-large-query
isSplade: true
# ...
2
Upgrade your TVF cluster
Update TVF to include your models
helm upgrade -i vector-inference \
oci://registry-1.docker.io/trieve/embeddings-helm \
-f embedding_models.yaml
3
Get embeddings endpoint
kubectl get ing
4
Make call to generate sparse vector
ENDPOINT="k8s-default-vectorin...elb.amazonaws.com"
curl -X POST \
-H "Content-Type: application/json"\
-d '{"inputs": "test input"}' \
--url http://$ENDPOINT/embed_sparse
For more information checkout the API reference for sparse vectors