liveBook · Manning

SPLADE

As explained in AI-Powered Search

SPLADE is a neural sparse lexical expansion model that produces weighted lexical representations for information retrieval.

SPLADE (Sparse Lexical and Expansion) generates contextualized tokens and weights from a query, enabling semantic search through sparse lexical representations rather than dense embeddings alone. section 7.4.3

Unlike an SKG expansion, SPLADE-style output may contain language-model tokens such as “las”, “##ag”, and “na##”, not necessarily terms directly present in the document index. Documents therefore need matching SPLADE tokens generated and indexed before query-time matching works. section 7.4.3

Listing 7.14 Expanding queries with SPLADE++
from spladerunner import Expander
expander = Expander('Splade_PP_en_v1', 128) #1
queries = ["kimchi", "bbq", "korean bbq",
           "lasagna", "karaoke", "drive through"]

for query in queries:
  sparse_vec = expander.expand(query,  #2
                  outformat="lucene")[0]  #3
  print(sparse_vec)

A Python listing expands queries including “kimchi”, “korean bbq”, “lasagna”, and “drive through” with Splade_PP_en_v1 and returns Lucene-formatted sparse output. section 7.4.3

How AI-Powered Search covers it

How deep it goes
Explains contextualized-token generation and indexing consequences, but defers model internals and detailed ranking mechanics.
Examples
Demonstrates SPLADE++ expansions for kimchi, barbecue, Korean barbecue, lasagna, karaoke, and drive-through queries.
What it assumes
Assumes familiarity with lexical queries and inverted indexes while distinguishing sparse expansion from dense embedding search.
What you can do after
Apply it via spladerunner to expand queries and inspect Lucene-formatted sparse token weights.
How it connects
Connects sparse vectors with semantic search, query expansion, inverted indexes, language models, and dense vector search.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Search. The section links point to the parts of the book it draws on.