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 synonyms 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 TVI cluster

Update TVI 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.