Repository navigation
docs(skills): teach the AEO coach the Mentions & Sentiment tools - #1127
Conversation
Both skills learn the six Mentions tools and REST endpoints from ansvisor#1126: the numbers to quote (net sentiment, low sample, brand only), a workflow for "why did sentiment drop on Gemini?", and the correction as a write. The sentiment reference explains net sentiment and the README lists the new questions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@cihan-gyk this merges cleanly, but it documents six tools ( When #1126 is in, please re-check the field names against its rebased
Apart from that, it looks good to merge right after #1126. |
gkhngyk
left a comment
There was a problem hiding this comment.
Merge right after #1126, with two small wording fixes. The branch is unchanged (44a90b6a), and git merge-tree onto the current main (4ac82ce5) is clean: only the 5 skills files.
Checked against #1126's final code (web/src/lib/mcp/server.ts, web/src/lib/mcp/mentions.ts, the /api/mcp/mentions/* routes):
- The six tool names and the six REST paths match.
- The filter parameters match:
brand_id,date_from/date_to(30 days by default),platform,region,topic_idandsearch. - The
list_mentionsfilters match:sentiment,competitor_id(withnone),sort(newest/oldest/co_mentions/negative) andpage.get_mentionandoverride_mention_sentimenttakeid, and the override also takessentimentandnote. - These fields exist as written:
current.sentiment.net,lowSample,changes.netSentimentPoints,headline.mover(withchange),platforms[].netSentiment/netSentimentChange,sameResponseAsYou,mentionsChangePct,brandTerms[].sharePct,attributesinentitiesorder,coMentionsandbiggestGap. - The REST correction returns 403 for a key that isn't an admin's or manager's.
- "Mentions are responses that name the brand at least once" matches #1126 today, which counts responses naming the brand as
mentionsand occurrences astimesNamed.
Wording fixes, in both SKILL.md files
- "The
changesfields are alreadynullthere" is only partly true.netSentimentPointsis null on a low sample.mentionRatePointsis null under 20 tracked responses.mentionsPctis not gated.- Suggested text: "
changes.netSentimentPointsis alreadynullthere, as is the mention rate's change under 20 tracked responses."
biggestGapis alsonullwhen the brand or the leading competitor has under 20 mentions (#1124's low-sample rule). That's more than "when none leads by 20+ points".
If #1226 lands before this PR, update the "Mentions" definition as noted earlier.
…p is - Only changes.netSentimentPoints is null on a low sample (and the mention rate's change under 20 tracked responses); mentionsPct isn't gated. - biggestGap is also null when the brand or the leading competitor has fewer than 20 mentions (ansvisor#1124's low-sample rule). Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tool description said null only when no competitor leads by 20+ points; it is also null when the brand or that competitor has fewer than 20 mentions (ansvisor#1124's low-sample rule), as the skills now say (ansvisor#1127). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk Both wording fixes are in fdbe4d3, in both
#1126's tool description now says the same. Merge after #1126, as planned. |
gkhngyk
left a comment
There was a problem hiding this comment.
Looks good. Both wording fixes are in, in both SKILL.md files (fdbe4d3):
- Only
changes.netSentimentPointsis described as null on a low sample, and the mention rate's change as null under 20 tracked responses. biggestGapnow also states its low-sample case.
The branch merges cleanly on main and on top of #1126, and touches only the five skills files. We'll merge it right after #1126.
…swered, and mentionsPct is times named Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk updated to match #1126's switch (8cab641): |
gkhngyk
left a comment
There was a problem hiding this comment.
One wording fix before merge. The rest of 8cab641 matches #1126's final fields:
timesNamed;changes.basis.sharedPrompts,newPromptsanddroppedPrompts;changes.mentionsPctas the change in times named;- the mention rate's change, null when either window has under 20 responses.
- The glossary still leads with "Mentions are responses" (
skills/ansvisor-aeo-coach/SKILL.md:76,skills/ansvisor-aeo-coach-standalone/SKILL.md:79).- The page now calls times named Total mentions. A user who asks "how many mentions did we get?" would get
current.mentionsfrom the coach, which isn't the number on the card. - Fix: start the bullet with times named, e.g. "Mentions, as the page's Total mentions counts them, are every time AI names the brand (
timesNamed), twice in one response included: quote this one for 'how many mentions'.mentionsis the responses naming the brand at least once: the base of the mention rate, net sentiment andlowSample." - The "fewer than 20 mentions" lines (
SKILL.md:91/:94, andreferences/sentiment-interpretation.md:17and:56in both skills) can then say "responses naming the brand". - If #1126 renames
changes.mentionsPct, updateSKILL.md:90and:93to match.
- The page now calls times named Total mentions. A user who asks "how many mentions did we get?" would get
This merges cleanly on main (12846db) and with #1126, and it touches only the five skills files.
…m the API and MCP (#1126) * feat(mentions): read Mentions & Sentiment and correct a sentiment from the API and MCP The Mentions page's figures over the API and MCP (MS-13): summary, the mentions list, one answer, competitors and perception, under the page's filters, from the page's own database functions after a brand check; and "Sentiment is wrong" as the API key's owner. Migration 00162 lets override_mention_sentiment correct for that person when the service role calls, still only for an admin or manager of the answer's organization. The in-app agent gets the five reads. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(mentions): say when get_mentions_perception's biggestGap is null The tool description said null only when no competitor leads by 20+ points; it is also null when the brand or that competitor has fewer than 20 mentions (#1124's low-sample rule), as the skills now say (#1127). Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mentions): read get_mentions_summary's changes as the page's cards do Total mentions' change is now on times named (occurrences), and every change is taken on the prompts both windows answered (changeBasis, 00195), with the counts behind it in changes.basis. The mention rate's change is null when either window has under 20 responses, as on the card. Adds promptsWithMentionsPct, and timesNamed per platform and day. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
… Total mentions As the Overview card counts them, "mentions" are every time AI names the brand (timesNamed): the coach quotes that for "how many mentions", and mentions (responses naming the brand) as the base of the rate, net sentiment and lowSample, whose 20 is responses naming the brand. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#1126 kept |
gkhngyk
left a comment
There was a problem hiding this comment.
Looks good. Ready to merge.
The wording fix is done in 5e22ba0. The glossary now leads with times named (timesNamed), the page's Total mentions. It also says mentions is the responses naming the brand, which the mention rate, net sentiment and lowSample are based on. The "under 20" lines now say "responses naming the brand" in both skills and both sentiment-interpretation.md files.
I checked the names against main's web/src/lib/mcp/mentions.ts, server.ts and the /api/mcp/mentions routes, and they all match:
timesNamed,mentionsandsentiment.lowSample(fewer than 20 mentions);changes.mentionsPct, which is times named;changes.netSentimentPoints, null on a low sample;- the mention rate's change, null under 20 tracked responses;
changes.basis.sharedPrompts,newPromptsanddroppedPrompts;- the sorts and
competitor_id: none, theidparameter, and the REST paths.
Optional:
skills/ansvisor-aeo-coach/SKILL.md:146-148(and theGET /mentions/competitorsrow atskills/ansvisor-aeo-coach-standalone/SKILL.md:133): a competitor'smentionscounts responses, not times named. The glossary now says to quote times named for "how many mentions", so add half a line here: "compare a competitor'smentionswithbrand.mentionsfrom the same call, not withtimesNamed". Otherwise "us vs X" could mix the two units.
Merge notes
- Merges cleanly on current main. It changes only the five skills files.
Tested on top of main together with #1346, #1349 and #1127: web and server tests, tsc, lint and Prettier pass.
Summary
The AEO coach skills learn the Mentions & Sentiment tools. #1126 adds six MCP tools and their REST mirrors for the Mentions page, and the in-app agent already gets the reads. This brings both flavours of the skill (
ansvisor-aeo-coachover MCP,ansvisor-aeo-coach-standaloneover REST) up to them, so a client with the skill can answer "how is AI talking about us?" and "why did sentiment drop on Gemini?".Merge after #1126, which adds the tools; it is stacked on #1125 → … → #1115. The branch is from
main, so the diff is only the skills. Until #1126 merges, the tools described here don't exist yet.What changes, in both skills
lowSampleunder 20 mentions, wherechangesare alreadynull;/api/mcp)get_mentions_summaryGET /mentions/summarylist_mentionsGET /mentionsget_mentionGET /mentions/{id}get_mention_competitorsGET /mentions/competitorsget_mentions_perceptionGET /mentions/perceptionoverride_mention_sentiment(write)POST /mentions/{id}/sentiment-overrideheadline.moverandplatforms[], skipping low samples;list_mentionswithsentiment: "negative";sameResponseAsYou) and perception (brandTerms,biggestGap);references/sentiment-interpretation.md:skills/README.md: Mentions in what the skill does, an example question, and the correction listed among the writes.Related issue
None. Follow-up to #1126.
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
SKILL.mdfiles.web/src/lib/mcp/server.tsandweb/src/lib/mcp/mentions.tson feat(mentions): read Mentions & Sentiment and correct a sentiment from the API and MCP #1126's branch: tool names, parameters and fields should match.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): not run; no web code changedyarn typecheckpasses (run fromweb/): not run; no web code changedyarn format:checkpasses (run fromweb/): not run; no web code changedAlso checked:
changes.netSentimentPoints,headline.mover,platforms[].netSentimentChange;sameResponseAsYou,brandTerms[].sharePct,biggestGap;nonecompetitor filter;npm run version:checkfails as it does onmain(the docker-compose images are 0.2.0 against 0.3.0). That is unrelated to this PR and left for the maintainers.🤖 Generated with Claude Code