Repository navigation
fix(metrics): shrink the position factor by mention evidence - #584
Merged
Merged
Conversation
A competitor named first in 6 of 16k answers scored a flat 15-point position floor (0.15 × a perfect 1.0 average over 6 samples) and ranked 4th on the leaderboard, above one named in 500+ answers. The position factor now enters the blend as pf × mentionAnswers / (mentionAnswers + 10): thin samples are damped toward zero while high-volume entities are untouched (support ≈ 1 from a few dozen mentions up). Both mirrors of the score module change identically, so every surface — leaderboard, trend chart, pulse, reports, MCP — re-ranks consistently; nothing is re-analyzed and no stored data changes. The Formulas dialog documents the evidence weighting.
7 tasks done
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.
Summary
A competitor named first in 6 of ~16k answers ranked 4th on a brand's 30d leaderboard, above one named in 500+ answers. The position factor is an average over only the answers that mention the entity, so a perfect 1.0 average on a tiny sample paid out the full 15-point position weight as a floor.
The position term now enters the blend with evidence shrinkage:
web/src/lib/visibility-score.ts,server/src/config/visibility-score.js) change identically, so every surface re-ranks consistently — leaderboard, trend chart (the misranked competitor also leaves the top-4 lines), Daily Pulse, reports, MCP, Looker.Related issue
Customer report (no tracked issue).
Type of change
fix— Bug fixHow to test
yarn testinweb/(7 score tests) andyarn vitest runinserver/pass.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)