Skip to content

fix(worker): exclude absence responses from brand/competitor mentions (#5)#373

Draft
tuliren wants to merge 1 commit into
elmohq:mainfrom
tuliren:issue-5-absence-mentions
Draft

fix(worker): exclude absence responses from brand/competitor mentions (#5)#373
tuliren wants to merge 1 commit into
elmohq:mainfrom
tuliren:issue-5-absence-mentions

Conversation

@tuliren

@tuliren tuliren commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Naive substring matching counted "I couldn't find any information about " as a brand mention, inflating visibility and share-of-voice.

Changes

  • New 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).
  • Wired into the worker's analyzeMentions for brand and competitor names (domain matches keep plain substring semantics).

Testing

  • 13 unit tests in mention-detection.test.ts; worker tsc --noEmit passes.

Closes #5

🤖 Generated with Claude Code

…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>
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ensure mentions don't include responses like "couldn't find <brand>"

1 participant