Skip to content

sparse: warm-start pruning threshold for BM25 DAAT_MAXSCORE#1630

Closed
lyang24 wants to merge 1 commit into
zilliztech:mainfrom
lyang24:warm-start-daat-maxscore-bm25
Closed

sparse: warm-start pruning threshold for BM25 DAAT_MAXSCORE#1630
lyang24 wants to merge 1 commit into
zilliztech:mainfrom
lyang24:warm-start-daat-maxscore-bm25

Conversation

@lyang24

@lyang24 lyang24 commented May 16, 2026

Copy link
Copy Markdown
Contributor

Bootstrap a safe non-zero pruning threshold before topk_ fills, so update_non_essential_lists() can demote terms early and current_score + lookup_bound pruning kicks in from the first candidate.

Mechanism: scan one seed term's posting list, compute single-term BM25 contribution per matching doc, take the k-th best as warm_threshold_. Since per-term BM25 contributions are non-negative, the k-th best single-term score is a safe lower bound on the k-th best full-query score (at least k docs are guaranteed to have full_score >= S_k). Exact-recall preserving.

Seed = query term with the largest per-dim max_score (high IDF, short posting list). Activated only for BM25, query.size() >= 2, k >= 2, and seed must hit >= k docs (otherwise S_m is not a valid bound on the k-th score). Falls back to current behavior on guard misses.

No change to ResultHeap semantics; warm threshold is searcher-local.

Bootstrap a safe non-zero pruning threshold before topk_ fills, so
update_non_essential_lists() can demote terms early and
current_score + lookup_bound pruning kicks in from the first candidate.

Mechanism: scan one seed term's posting list, compute single-term BM25
contribution per matching doc, take the k-th best as warm_threshold_.
Since per-term BM25 contributions are non-negative, the k-th best
single-term score is a safe lower bound on the k-th best full-query
score (at least k docs are guaranteed to have full_score >= S_k).
Exact-recall preserving.

Seed = query term with the largest per-dim max_score (high IDF, short
posting list). Activated only for BM25, query.size() >= 2, k >= 2, and
seed must hit >= k docs (otherwise S_m is not a valid bound on the
k-th score). Falls back to current behavior on guard misses.

No change to ResultHeap semantics; warm threshold is searcher-local.

Signed-off-by: lyang24 <lanqingy93@gmail.com>
@sre-ci-robot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lyang24
To complete the pull request process, please assign cqy123456 after the PR has been reviewed.
You can assign the PR to them by writing /assign @cqy123456 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify

mergify Bot commented May 16, 2026

Copy link
Copy Markdown

@lyang24 🔍 Important: PR Classification Needed!

For efficient project management and a seamless review process, it's essential to classify your PR correctly. Here's how:

  1. If you're fixing a bug, label it as kind/bug.
  2. For small tweaks (less than 20 lines without altering any functionality), please use kind/improvement.
  3. Significant changes that don't modify existing functionalities should be tagged as kind/enhancement.
  4. Adjusting APIs or changing functionality? Go with kind/feature.

For any PR outside the kind/improvement category, ensure you link to the associated issue using the format: “issue: #”.

Thanks for your efforts and contribution to the community!.

@lyang24

lyang24 commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

bench marked no gain closing

@lyang24 lyang24 closed this May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants