Expand description
Learned-sparse text embedding types and the SparseEmbeddingModel trait.
Sparse embeddings represent text as a small set of weighted vocabulary terms rather than a single dense vector. They power hybrid first-stage retrieval: a learned-sparse model (SPLADE family, the BGE-M3 sparse head) keeps the inverted-index compatibility of BM25 while learning term weights — and term expansion, for SPLADE — that beat BM25 in and out of domain.
This trait sits alongside EmbeddingModel:
it is a separate, narrow capability so a provider opts into it only when it
can produce term-weight vectors. The downstream inverted index and impact
scoring are deliberately out of scope — this is the producer side only.
Structs§
- Sparse
Embed Result - Result of a sparse-embedding call, carrying one
SparseVectorper input.
Traits§
- Sparse
Embedding Model - A model that produces learned-sparse term-weight vectors from text.
Type Aliases§
- Sparse
Vector - A single learned-sparse vector as
(term_id, weight)pairs.