fix(worker): exclude absence responses from brand/competitor mentions (#5)#373
Draft
tuliren wants to merge 1 commit into
Draft
fix(worker): exclude absence responses from brand/competitor mentions (#5)#373tuliren wants to merge 1 commit into
tuliren wants to merge 1 commit into
Conversation
…elmohq#5) Naive substring matching counted "I couldn't find any information about <brand>" as a mention, inflating visibility and share-of-voice. Adds an absence-aware matcher in packages/lib/mention-detection that only counts a name when it appears in a clause that isn't an explicit "couldn't find / no information about" statement, and wires it into the worker's mention analysis. Fully unit-tested. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@tuliren is attempting to deploy a commit to the Blue Whale Labs Team on Vercel. A member of the Team first needs to authorize it. |
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
Naive substring matching counted "I couldn't find any information about " as a brand mention, inflating visibility and share-of-voice.
Changes
packages/lib/src/mention-detection.ts:nameMentioned()only counts a name when it appears in a clause that isn't an explicit "couldn't find / no information about" absence statement (clause-level so a real mention sharing a sentence with an absence clause still counts).analyzeMentionsfor brand and competitor names (domain matches keep plain substring semantics).Testing
mention-detection.test.ts; workertsc --noEmitpasses.Closes #5
🤖 Generated with Claude Code