NewMCP ServerView docs
Core Concepts

Sparse Vectors

Understand sparse vector representations and SPLADE for retrieval.

5 min readUpdated 2026-01-16

Sparse Vectors

Sparse vectors are high-dimensional vectors where most values are zero, focusing on specific term importance.

Dense vs Sparse

Dense VectorsSparse Vectors
All values non-zeroMostly zeros
1024 dimensions30,000+ dimensions
Semantic meaningTerm importance
Similar meaning = similar vectorShared terms = similar vector

SPLADE

SPLADE (Sparse Lexical and Expansion) creates sparse vectors by:

  1. Term weighting - Assigns importance to each term
  2. Query expansion - Adds related terms automatically
Input: "machine learning"
Output: {
  "machine": 0.8,
  "learning": 0.9,
  "ML": 0.6,
  "artificial": 0.4,
  "intelligence": 0.4,
  "model": 0.3,
  ...
}

Benefits

  1. Interpretable - You can see which terms matter
  2. Efficient - Only store non-zero values
  3. Expansion - Handles synonyms and related terms
  4. Complementary - Works well with dense vectors

Configuration

python
results = client.search(
    query="...",
    options={
        "sparse_model": "splade-v3",
        "expansion_factor": 1.2  # More expansion
    }
)

When Sparse Shines

  • Rare terms: Technical jargon, product codes
  • Exact matching: Names, IDs, specific phrases
  • Low-resource languages: Where dense models struggle