Repository navigation
fix(volumes): estimate prompt volume from the median of its keywords at a 45% AI adoption rate - #1103
Conversation
A prompt's Google volume was the sum of its five keywords' monthly searches. The keywords are overlapping head terms for the prompt's category, so the sum counted the same searchers several times, and one broad term could set the whole figure: "google gemini" (5M a month) put one prompt at ~755k estimated AI searches, and a 709-prompt brand's Insights total read 11.7M. summarizeVolumes now takes the median of the keywords that have a volume (medianVolume), and a keyword that resolves to the same returned one counts once. Migration 00154 applies the same rule to stored rows from their per-keyword volumes, so nothing is looked up again; total_google_volume keeps its name and holds the median. The keyword extraction is unchanged. The seed's demo volumes and the docs follow. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk ready for review: prompt volumes now use the median of each prompt's five keywords instead of their sum (live: Total Est. AI Volume 11.7M → ~770k, avg 16.5k → ~1.1k). Migration 00154 recomputes stored rows from their saved keyword volumes, no DataForSEO/LLM calls. Please merge together with #1104 and deploy the server with or before 00154. |
est_ai_volume is a prompt's Google volume times the AI adoption rate (AI_VOLUME_MULTIPLIER). Its 15% default matched the share of Google searches showing an AI Overview a year ago; they now appear on roughly 43-48%, so the default is 45%. Migration 00155 moves rows stored at the old default to the new one and leaves any other rate alone. The example env, the seed's demo volumes and the docs follow, and a test pins the default and the override. An install that sets AI_VOLUME_MULTIPLIER=0.15 itself, as the example env did, keeps analyzing at 15% until it is changed to 0.45 or removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ansvisor#1103 raises the default AI adoption rate from 15% to 45%, which triples every estimate. The High Opportunity thresholds move with it, from 500 and 1,000 to 1,500 and 3,000, so the list keeps about the same share of prompts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk added a second commit: the default AI adoption rate goes from 15% to 45% (AI Overviews now show on ~43–48% of Google searches), with migration 00155 moving rows stored at 0.15. If the live server sets AI_VOLUME_MULTIPLIER=0.15 (as .env.example did), please change it to 0.45 or remove it when deploying, or new analyses keep writing 15%. #1104 scales High Opportunity to 1,500 / 3,000 to match. |
gkhngyk
left a comment
There was a problem hiding this comment.
Thanks, approving. 00154 and 00155 are applied on production, matching a rolled-back dry run first. Across all 2,745 rows the total estimated AI volume goes from 39.7M to 8.7M, the average prompt from 14.5k to 3.2k and the median from 2.8k to 720, and every row is now at 0.450. The JS median and rounding match percentile_cont and round. On the tree merged with main and #1104/#1105, schema.sql matches build-schema.sh and server tests pass (1293). One limit for a follow-up: broad categories still read high, e.g. three of an e-bike prompt's five keywords are Google's same 1.5M cluster, so its median stays 1.5M (675k at 45%).
…gh Opportunity (#1104) * fix(prompts): count each keyword once in Similar Topics and retune High Opportunity Goes with the median-based prompt volume (fix/prompt-volume-median, migration 00154). - Similar Topics added a keyword's volume once for every prompt that used it, so "seo tools" (110k a month) in 121 prompts read 13.1M; its comment said the opposite. A keyword's volume now counts once, is found whatever its case (google_volumes keeps the provider's spelling), and a prompt listing it twice counts once. Each prompt in a cluster carries its own volumes. - High Opportunity Prompts listed prompts from 5k and called 10k High, which suited the old sum. With the median they are 500 and 1,000 (lib/prompt-volume-opportunity.ts), keeping about the same share of prompts on the list. - Avg. AI Volume is rounded (it read "632.667"), "across N keywords" counts distinct keywords, and the footnote, the Similar Topics totals and the MCP get_prompt_volumes description say how the figures are made. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(prompts): scale High Opportunity to the 45% AI adoption rate #1103 raises the default AI adoption rate from 15% to 45%, which triples every estimate. The High Opportunity thresholds move with it, from 500 and 1,000 to 1,500 and 3,000, so the list keeps about the same share of prompts. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…scale (#1105) A topic opportunity's impact came from its suggestions' estimated volumes added up: high from 50k a month, medium from 10k. The model estimates those against the brand's tracked prompts, and with #1103 (the median of the keywords at a 45% AI adoption rate instead of their sum at 15%) a brand's average prompt reads about a fifth of what it did. High is now 10k and medium 2k. Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Two fixes to prompt volumes.
The live Insights tab for a 709-prompt brand read:
Why the sum inflates. Volume analysis gives each prompt five head terms for its category (
intent-extraction.js, #11), which is the right call: long-tail terms come back as 0. But the five overlap, so adding them up counts the same searchers several times. One broad term can also set the whole figure: the Gemini prompt's keywords included "google gemini" (5M a month).Why 45%. The AI adoption rate (
AI_VOLUME_MULTIPLIER) is the share of a prompt's Google volume estimated to get an AI answer. Its 15% default matched the share of Google searches that showed an AI Overview a year ago. They now appear on roughly 43–48% (1, 2).On that brand (computed from the live per-keyword volumes; monthly figures):
No prompt drops to 0: keywords Google can't measure are left out of the median, as they added nothing to the sum.
What changes
server/src/lib/volume-analysis.jsmedianVolume(exported): the median of the volumes above 0, rounded.summarizeVolumesuses it fortotalGoogleVolume, andestAiVolumeis that ×AI_VOLUME_MULTIPLIER.00154_prompt_volume_median.sqlrecomputes stored rows the same way from theirgoogle_volumes. Nothing is looked up again: no DataForSEO or LLM cost.percentile_cont(0.5), with only numeric values cast.total_google_volumekeeps its name and now holds the median; a column comment says so.server/src/lib/intent-extraction.js:AI_VOLUME_MULTIPLIERdefaults to 0.45 when the env doesn't set it.server/.env.examplenow sets 0.45.00155_ai_volume_multiplier_45.sqlmoves rows stored at the old default (0.150) to 0.450 and recomputes theirest_ai_volume. Rows saved under any other rate were set on purpose by the install, and are left alone.supabase/seed.sql: the demo volumes follow both rules.supabase/schema.sql: regenerated.docs/guides/prompts.mdxanddocs/self-host/env-variables.mdxdescribe the median and the 45% default.Goes with #1104
#1104 (web) counts each keyword once in Similar Topics and moves the High Opportunity thresholds (5k / 10k) to the new scale (1,500 / 3,000). Please merge the two together. On its own, this one leaves Similar Topics' header smaller than its rows and the High Opportunity card nearly empty.
Deploy and follow-ups
AI_VOLUME_MULTIPLIERon the live server. If the env sets it to 0.15, as.env.exampledid, change it to 0.45 or remove it when deploying. Otherwise new analyses keep writing 15% next to rows that 00155 moved to 45%. Self-hosted installs that copied the example are in the same position.est_volume, an LLM guess calibrated on the tracked prompts' volumes) shrink as they refresh (48h). Content and Action Center opportunities already created keep their saved demand.highDemandVolume(100) and Improve's volume tiers (100 / 1,000) keep their values. With the sum almost every prompt cleared them; at the new scale (median prompt ~1.6k) they still separate the smallest prompts.topicOpportunityImpact(50k / 10k over summed suggestion volumes) was tuned on the old scale. Once suggestions refresh it will rate most topics low. fix(action-center): lower topic opportunity impact to the new volume scale #1105 retunes it to 10k / 2k, to merge with or after this one.Related issue
None. Product feedback on the Prompts → Insights volumes.
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/): this PR doesn't touchweb/yarn typecheckpasses (run fromweb/): this PR doesn't touchweb/yarn format:checkpasses (run fromweb/): this PR doesn't touchweb/Also run:
server:npm run format,npm run lintandnpm test(1,293) pass.bash supabase/build-schema.shregeneratedschema.sql.npm run version:checkfails as it does onmain(compose images 0.2.0 vs 0.3.0); this PR doesn't touch versions.New tests (
volume-analysis.test.js), which fail on the sum:medianVolumeitself.volumes-pipeline.test.jsnow callsmedianVolumeinstead of re-deriving the formula in the test.intent-extraction.test.js(new) pins the 45% default and the env override; it fails on 15%.Dev database:
medianVolumeexactly, half-way roundings included.Review: a code review raised:
The Insights platform chart's split (
AI_PLATFORM_SHARES, derived with AI Overviews at ~35% of Google searches) is its own model and is unchanged. Re-deriving it at ~45% is a possible follow-up.Commits: the median (
f011fc4), then the 45% rate (bac59ed).🤖 Generated with Claude Code