fix(rank): keep the official site on page one for known-item searches#87
Merged
Merged
Conversation
Ports the desktop fix. Two re-rank layers could bury a navigational result (the official site of the searched name) below encyclopedia/forum pages even though the aggregator ranked it first. Both fixed on-device with no new requests. 1. ResultSorter flattened relevance into list position. The default fresh+relevant sort re-derived a flat 1/(60+index) from rank position, discarding each result's real score (lexical blend + navigational boost), so a single dated result could leapfrog an undated official homepage. Aggregator now stores its final blended+nav score on AggregatedResult and ResultSorter scales THAT (relevanceOf accessor), so recency only reorders results of comparable relevance and never overtakes a strong match. 2. AI-slop blocklist false positives. The bundled blocklist is merged from community "hide AI" browser lists that include the official sites of AI companies and major developer hubs (github.com, huggingface.co, openai.com, and more). With the filter on by default those sites were downranked off the first screen. A curated allowlist (assets/blocklist/allowlist.txt) is now subtracted from the effective blocklist on load, including subdomains, via AiSlopBlocklist.effectiveBlocklist. Regression tests added for both. Unit suite and ktlint green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9223b22 to
afe1d7a
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Searching a brand or product name returned the official site buried below encyclopedia/forum pages, or off the first screen, even though the metasearch aggregator ranked it first. This is a precision@1 placement problem in the re-rank layers, not a recall problem. Ports the desktop fix (SearchMob-Desktop#92).
Two root causes, both fixed
1.
ResultSorterflattened relevance into list position. The default fresh+relevant sort re-derived a flat1/(60+index)from rank position, discarding each result's real score (lexical blend + navigational boost), so a single dated result could leapfrog an undated official homepage.AggregatedResultnow stores its final blended+nav score andResultSorterscales that (newrelevanceOfaccessor), so recency only reorders results of comparable relevance and never overtakes a strong match.2. The AI-slop blocklist had high-value false positives, on by default. The bundled blocklist is bulk-merged from community browser "hide AI" lists that include the official sites of AI companies and major developer hubs —
github.com,huggingface.co,openai.com, and more. With the filter defaulting todownrank, those sites were pushed off page one. A curated allowlist (assets/blocklist/allowlist.txt) is now subtracted from the effective blocklist on load (subdomains too), viaAiSlopBlocklist.effectiveBlocklist.Verification
Notes
urlmrgraded navigational boost, BM25F title>snippet field weighting, registrable-domain dedup, trust-weighted RRF) are queued separately and mirror the desktop plan.🤖 Generated with Claude Code