Skip to content

LearnRetrieve

Relevance floor

minScore · Score threshold

A minimum match strength below which candidates are dropped, so a search can return nothing instead of its least bad passages.

In DocSlurpGlossary entry

On this page

A relevance floor drops candidates whose match strength is below a threshold, so a search can return nothing. Without one, a question the corpus can’t answer still produces confident-looking passages for a model to answer from.

The hard part is the score. Scores after ranking are usually relative, such as a fused rank or a score divided by the best hit, so the top result always looks strong and a threshold on them means nothing. A floor needs a signal that means the same thing for every query, measured before ranking:

  • Vector similarity, calibrated. Raw cosine isn’t enough, because unrelated text can score well above zero. DocSlurp measured off-topic queries reaching cosines of 0.58 to 0.70 with its default local embedding model, so it rescales cosine above a measured baseline of 0.65: (cos − 0.65) / (1 − 0.65). A cosine of 0.80 becomes 0.43 and passes the default floor of 0.1; a cosine of 0.68 becomes 0.086 and is dropped.
  • Keyword coverage. The share of the query’s content words found in the passage. For “When does the London office take bookings?” (four content words: London, office, take, bookings), a passage with three of them covers 0.75; one with two covers 0.5, which isn’t a majority, and counts as 0.

The gotcha: calibration is per model

A baseline measured for one embedding model, served one way, is wrong for any other, and a fixed cutoff copied from elsewhere can hide every real hit. DocSlurp only applies the vector floor to embedding setups with a measured baseline; for others, vector hits count as relevant and only keyword and graph signals are filtered. Use minScore (0 to 1, 0 turns it off) to tune it, and noMatch: true in the response to tell users the documents don’t cover the question.

In DocSlurp

In DocSlurp

minScore (default 0.1) is checked against each candidate’s raw relevance, measured before fusion: cosine rescaled above a measured noise baseline, or the share of query terms present (core/server/src/search/relevance.ts). Empty results carry noMatch: true, which chat uses to decline. See the relevance floor.

Sources

Jump to