Repository navigation
feat(metrics): visibility rate becomes the AI visibility score on every surface - #574
Merged
Merged
Conversation
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
The Visibility Rate shown across the product is now the AI Visibility Score (0-100):
0.6 × mention rate + 0.25 × citation rate + 0.15 × position factor, computed over the filtered answer set through the shared compute layer from #573 — one formula, one weights module, every surface. Coverage (appeared in X of Y prompts) survives as a secondary line/tooltip everywhere it was useful.Surfaces switched in this PR (all in one release, so no page can disagree with another):
%signs dropped — the score isn't a percentage.ai_visibility_score_30dadded), prompt detail KPI.score → visibilityRate% → avgVisibility/100, so every stored snapshot keeps rendering exactly as generated. The LLM summary prompt now explains the score fields.Mechanics:
getCompetitorComparisongainedscore/scoreChange/mentionAnswers/citationAnswers/positionFactorper entry (three parallelai_visibility_aggregatescalls reusing its existing windows) — leaderboard, Competitors page and topic detail all feed from it.getVisibilityRateTrendpoints/summary are score-based;getPromptVisibilitySummariesandgetPromptDetailexpose per-prompt scores; the Topics scan and both report scans accumulate components (and now selectmention_position).Related issue
—
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)