TECHNOLOGY

Qdrant sparse IDF: corpus changes can alter query scoring

In this article
THE QUICK TAKE

Qdrant's documented IDF statistics are shard-scoped; applying a tenant filter does not automatically make those statistics tenant-specific.

Qdrant sparse IDF scores can change when the indexed corpus changes even if the query text and stored document vectors remain unchanged. Treat corpus statistics as part of the scoring context, especially when investigating ranking drift after large additions, deletions or changes in tenant composition.

Separate sparse vectors from frequency statistics

The official vector reference describes sparse representations separately from dense vectors. The indexing documentation explains the IDF modifier, which adjusts a sparse query using statistics of currently stored documents. This is not a promise that every sparse representation already includes the correct IDF treatment. Verify what the encoder emits and what the collection applies before combining independently computed weighting with automatic query modification.

Inspect the scope of the statistics

The current indexing documentation states that IDF statistics are calculated per shard, with an explicit mechanism for scoping statistics to a subset of points. A tenant filter should not be assumed to imply tenant-specific statistics automatically. Record the configured scoring scope alongside filters and shard organization. Otherwise a ranking change can be incorrectly attributed to the encoder even though the population used for term rarity changed.

Build a corpus-change fixture

Start with a small technical collection containing a rare component term. Add a separate batch in which that term is common, then repeat an unchanged query against the original relevant documents. Inspect sparse scores and candidate ordering. This is an illustrative experiment, not a prediction of a particular measured direction for every candidate: different terms and document contributions can interact in the final score.

Controlled artifactReason to retain it
Query vector before modificationConfirms unchanged encoder output
Collection and shard snapshotDefines the frequency population
Modifier and scope settingsDefines query weighting behavior
Sparse candidate resultsExposes score and order changes

Keep hybrid effects explainable

The hybrid query documentation describes combining candidate paths. An IDF change can affect which sparse candidates reach fusion, not just the displayed score of an unchanged result. Rank-based fusion and score-based fusion respond through different mechanisms. Preserve the sparse and dense candidate lists before inspecting the combined output; otherwise a missing document can look like a fusion defect when it was excluded earlier.

Evaluate drift under a reproducible corpus

Save corpus revision, scoring scope, query representation and candidate settings with the relevance test. Recheck important questions after material corpus changes, especially across tenants or domains. Distinguish expected statistical adaptation from incompatible encoder changes and accidental duplicate ingestion. This makes sparse ranking interpretable without promising stable scores across a growing corpus or treating a fixed threshold as independent of the collection that supplies its statistics.

Related reading: Qdrant for RAG: deciding what belongs in RAM or on disk; Batch text embeddings on your own GPU.

← All articles