Open-source agentic AI Search Execution Platform. Track AI visibility, find opportunities, and let agents turn signals into prioritized actions and drafted fixes across ChatGPT, Claude, Gemini, Google AI Overviews, Google AI Mode, Perplexity, Grok, and Microsoft Copilot.
TypeScript aeoai-agentai-searchanswer-engine-optimizationbrand-monitoringchatgptclaudecopilotdockergeminigeogoogle-ai-overviewsgrokmcpnextjsopen-sourceperplexityseosupabasetypescript
fix(volumes): estimate prompt volume from the median of its keywords at a 45% AI adoption rate (#1103)
Cihanfc3087391b6a
diff --git a/docs/guides/prompts.mdx b/docs/guides/prompts.mdxindex 3846fd948..dfc76dac3 100644--- a/docs/guides/prompts.mdx+++ b/docs/guides/prompts.mdx@@ -37,7 +37,7 @@ Suggestions have a 48-hour TTL. Hit **Refresh** on the Suggestions card to regen## Volume Analysis (Insights tab)For prompts where you've enabled volume analysis, you'll see:-- **Estimated monthly AI volume** (rough, derived from Google search volume + AI adoption multiplier)+- **Estimated monthly AI volume** (rough): the prompt's Google volume × the AI adoption multiplier (45% by default, about the share of Google searches that show an AI Overview). The Google volume is the median of the monthly searches for five category keywords picked for the prompt; keywords Google can't measure are left out. The Insights total adds up these per-prompt estimates.- **Intent classification** (informational, commercial, navigational, transactional)- **Keyword cluster** — the related queries that group with this promptdiff --git a/docs/self-host/env-variables.mdx b/docs/self-host/env-variables.mdxindex 7952c41f8..01d99037d 100644--- a/docs/self-host/env-variables.mdx+++ b/docs/self-host/env-variables.mdx@@ -52,7 +52,7 @@ Fed to the Express API + workers.| `CLORO_API_KEY` | optional | Cloro web scraper API key (for ChatGPT/Gemini/Perplexity web scraping) || `PLATFORM_PROVIDER` | optional | Default `cloro`. Used to pick scraper backend || `SCRAPEDO_API_KEY` | Site Audit | Scrape.do API key — required to run **Site Audit** (it fetches target pages via Scrape.do's proxy + JS render). Distinct from `CLORO_API_KEY`, which scrapes the AI answer engines. |-| `AI_VOLUME_MULTIPLIER` | optional | Estimated AI search adoption rate (default `0.15` = 15% of Google volume) |+| `AI_VOLUME_MULTIPLIER` | optional | Estimated AI search adoption rate (default `0.45` = 45% of a prompt's Google volume, the median of its keywords' monthly searches; AI Overviews appear on roughly 43–48% of Google searches) || `CRON_SECRET` | cloud only | Shared secret with web's CRON_SECRET; protects internal cron endpoints |## Tips for productiondiff --git a/server/.env.example b/server/.env.exampleindex 6eaa4d18b..ef6f36f0b 100644--- a/server/.env.example+++ b/server/.env.example@@ -94,8 +94,10 @@ CLORO_WEBHOOK_SECRET=# Platform provider for web scrapers (default: cloro)PLATFORM_PROVIDER=cloro-# AI Volume Multiplier (AI search adoption rate, e.g. 0.15 = 15%)-AI_VOLUME_MULTIPLIER=0.15+# AI Volume Multiplier (AI search adoption rate: the share of Google volume+# estimated to get an AI answer, e.g. 0.45 = 45%; AI Overviews appear on+# roughly 43-48% of Google searches)+AI_VOLUME_MULTIPLIER=0.45# Cron / Internal-endpoint secret (cloud only — not needed for self-hosted)# Guards three internal server endpoints:diff --git a/server/src/lib/intent-extraction.js b/server/src/lib/intent-extraction.jsindex 6b120aaf9..567f0ca0c 100644--- a/server/src/lib/intent-extraction.js+++ b/server/src/lib/intent-extraction.js@@ -1,8 +1,14 @@import { generateObject } from 'ai';import { z } from 'zod';+/**+ * The share of a prompt's Google volume estimated to get an AI answer: the+ * AI adoption rate. 45% by default, as AI Overviews now appear on roughly+ * 43–48% of Google searches (2026 estimates; it was about 15% a year+ * before, the old default). AI_VOLUME_MULTIPLIER overrides it.+ */const parsedMultiplier = parseFloat(process.env.AI_VOLUME_MULTIPLIER);-export const AI_VOLUME_MULTIPLIER = Number.isFinite(parsedMultiplier) ? parsedMultiplier : 0.15;+export const AI_VOLUME_MULTIPLIER = Number.isFinite(parsedMultiplier) ? parsedMultiplier : 0.45;export const intentKeywordSchema = z.object({intent: zdiff --git a/server/src/lib/intent-extraction.test.js b/server/src/lib/intent-extraction.test.jsnew file mode 100644index 000000000..c37be7f4d--- /dev/null+++ b/server/src/lib/intent-extraction.test.js@@ -0,0 +1,27 @@+import { afterEach, describe, expect, it, vi } from 'vitest';++/**+ * The AI adoption rate behind every est_ai_volume: 45% of a prompt's Google+ * volume unless the install sets AI_VOLUME_MULTIPLIER.+ */+async function multiplier() {+ vi.resetModules();+ const { AI_VOLUME_MULTIPLIER } = await import('./intent-extraction.js');+ return AI_VOLUME_MULTIPLIER;+}++afterEach(() => {+ vi.unstubAllEnvs();+});++describe('AI_VOLUME_MULTIPLIER', () => {+ it('defaults to 45% of Google volume', async () => {+ vi.stubEnv('AI_VOLUME_MULTIPLIER', '');+ expect(await multiplier()).toBe(0.45);+ });++ it('takes the rate an install sets', async () => {+ vi.stubEnv('AI_VOLUME_MULTIPLIER', '0.2');+ expect(await multiplier()).toBe(0.2);+ });+});diff --git a/server/src/lib/volume-analysis.js b/server/src/lib/volume-analysis.jsindex 447003a40..b0e1cec56 100644--- a/server/src/lib/volume-analysis.js+++ b/server/src/lib/volume-analysis.js@@ -70,14 +70,34 @@ async function fetchVolumesForKeywords(keywords, { locationCode, languageCode })return { volumes, requests: Math.ceil(distinct.length / MAX_KEYWORDS_PER_REQUEST) };}+/**+ * A prompt's Google volume: the median of its keywords that have any, rounded.+ *+ * The keywords are five head terms for the prompt's category+ * (intent-extraction.js), and they overlap: summing them counted the same+ * searchers several times over, and one very broad term (a product name such+ * as "google gemini", 5M a month) could set the whole figure. The median keeps+ * a prompt on its category's typical demand and leaves the extremes out, and+ * a keyword Google can't measure doesn't pull it down to 0.+ * 00154_prompt_volume_median.sql applies the same rule to stored rows.+ */+export function medianVolume(volumes) {+ const measured = volumes.filter((v) => v > 0).sort((a, b) => a - b);+ if (measured.length === 0) return 0;+ const mid = Math.floor(measured.length / 2);+ return Math.round(measured.length % 2 ? measured[mid] : (measured[mid - 1] + measured[mid]) / 2);+}+/*** Reduce one prompt's keywords against a volume map that may cover the whole- * brand. google_volumes stays a { keyword: number } map for the UI, and- * competition is a volume-weighted average of the keyword indices.+ * brand. google_volumes stays a { keyword: number } map for the UI, the+ * prompt's volume is their median (medianVolume), and competition is a+ * volume-weighted average of the keyword indices.** Lookups are case-folded because the response echoes keywords in its own* normalised form; the stored key stays the returned one, so what lands in the- * column is unchanged from when each prompt had the response to itself.+ * column is unchanged from when each prompt had the response to itself. Two+ * keywords that resolve to the same returned one count once.*/function summarizeVolumes(keywords, volumes) {const byKeyword = new Map();@@ -86,7 +106,6 @@ function summarizeVolumes(keywords, volumes) {}const googleVolumes = {};- let totalGoogleVolume = 0;let competitionWeightedSum = 0;let competitionWeight = 0;@@ -95,8 +114,8 @@ function summarizeVolumes(keywords, volumes) {if (!hit) continue;const [returnedKeyword, data] = hit;+ if (Object.hasOwn(googleVolumes, returnedKeyword)) continue;googleVolumes[returnedKeyword] = data.volume;- totalGoogleVolume += data.volume;if (data.competitionIndex !== null && data.competitionIndex !== undefined) {competitionWeightedSum += data.competitionIndex * data.volume;competitionWeight += data.volume;@@ -114,12 +133,14 @@ function summarizeVolumes(keywords, volumes) {? 'MEDIUM': 'HIGH';+ // Stored as total_google_volume: the column predates the median.+ const googleVolume = medianVolume(Object.values(googleVolumes));return {googleVolumes,- totalGoogleVolume,+ totalGoogleVolume: googleVolume,competitionIndex,competition,- estAiVolume: Math.round(totalGoogleVolume * AI_VOLUME_MULTIPLIER),+ estAiVolume: Math.round(googleVolume * AI_VOLUME_MULTIPLIER),};}diff --git a/server/src/lib/volume-analysis.test.js b/server/src/lib/volume-analysis.test.jsindex 0f2093a90..80eeebd77 100644--- a/server/src/lib/volume-analysis.test.js+++ b/server/src/lib/volume-analysis.test.js@@ -309,6 +309,81 @@ describe('analyzeBrandVolumes', () => {expect(row.totalGoogleVolume).toBe(500);});+ // The five keywords are overlapping head terms for the prompt's category,+ // so their sum counted the same searchers several times, and one product+ // name (5M a month) set a prompt at ~755k. The median leaves it out.+ it("takes the median of a prompt's keyword volumes, not their sum", async () => {+ const { analyzeBrandVolumes } = await load(seed({ activeCount: 1 }));+ extractIntentKeywords.mockResolvedValue({+ intent: 'how-to',+ keywords: [+ 'generative engine optimization',+ 'ai seo',+ 'google gemini',+ 'content strategy',+ 'search optimization',+ ],+ });+ getSearchVolumes.mockResolvedValue({+ 'generative engine optimization': { volume: 4400, competitionIndex: 20, competition: 'LOW' },+ 'ai seo': { volume: 8100, competitionIndex: 30, competition: 'LOW' },+ 'google gemini': { volume: 5000000, competitionIndex: 10, competition: 'LOW' },+ 'content strategy': { volume: 3600, competitionIndex: 40, competition: 'MEDIUM' },+ 'search optimization': { volume: 18100, competitionIndex: 50, competition: 'MEDIUM' },+ });++ const [row] = await analyzeBrandVolumes('b1', { onlyMissing: true });++ expect(row.totalGoogleVolume).toBe(8100);+ expect(row.estAiVolume).toBe(1215);+ // Every keyword's own volume is still kept for the UI.+ expect(Object.keys(row.googleVolumes)).toHaveLength(5);+ });++ it('leaves keywords Google cannot measure out of the median', async () => {+ const { analyzeBrandVolumes } = await load(seed({ activeCount: 1 }));+ extractIntentKeywords.mockResolvedValue({ intent: 'i', keywords: ['rare', 'mid', 'big'] });+ getSearchVolumes.mockResolvedValue({+ rare: { volume: 0, competitionIndex: null, competition: null },+ mid: { volume: 1000, competitionIndex: null, competition: null },+ big: { volume: 3000, competitionIndex: null, competition: null },+ });++ const [row] = await analyzeBrandVolumes('b1', { onlyMissing: true });++ expect(row.totalGoogleVolume).toBe(2000);+ expect(row.estAiVolume).toBe(300);+ });++ it('reads 0 when none of the keywords has a volume', async () => {+ const { analyzeBrandVolumes } = await load(seed({ activeCount: 1 }));+ extractIntentKeywords.mockResolvedValue({ intent: 'i', keywords: ['rare', 'rarer'] });+ getSearchVolumes.mockResolvedValue({+ rare: { volume: 0, competitionIndex: null, competition: null },+ });++ const [row] = await analyzeBrandVolumes('b1', { onlyMissing: true });++ expect(row.totalGoogleVolume).toBe(0);+ expect(row.estAiVolume).toBe(0);+ });++ it('counts a keyword listed twice, in any case, once', async () => {+ const { analyzeBrandVolumes } = await load(seed({ activeCount: 1 }));+ extractIntentKeywords.mockResolvedValue({ intent: 'i', keywords: ['CRM', 'crm', 'tools'] });+ getSearchVolumes.mockResolvedValue({+ crm: { volume: 100, competitionIndex: 20, competition: 'LOW' },+ tools: { volume: 300, competitionIndex: 80, competition: 'HIGH' },+ });++ const [row] = await analyzeBrandVolumes('b1', { onlyMissing: true });++ expect(row.googleVolumes).toEqual({ crm: 100, tools: 300 });+ expect(row.totalGoogleVolume).toBe(200);+ // The duplicate doesn't weigh twice in the competition average either.+ expect(row.competitionIndex).toBe(65);+ });+// One request now stands in for up to two hundred prompts, so a blip that// used to cost one prompt would cost all of them. It is retried first.it('retries a failed request before giving up on the batch', async () => {@@ -485,3 +560,17 @@ describe('getVolumeProgress', () => {expect(await getVolumeProgress('b1')).toEqual({ total: 0, analyzed: 0 });});});++describe('medianVolume', () => {+ it('takes the middle volume, or the mean of the middle two', async () => {+ const { medianVolume } = await load(seed());+ expect(medianVolume([18100, 9900, 6600, 4400])).toBe(8250);+ expect(medianVolume([2400, 4400, 880])).toBe(2400);+ });++ it('ignores zeros and reads 0 for nothing measured', async () => {+ const { medianVolume } = await load(seed());+ expect(medianVolume([0, 0, 500])).toBe(500);+ expect(medianVolume([])).toBe(0);+ });+});diff --git a/server/src/lib/volumes-pipeline.test.js b/server/src/lib/volumes-pipeline.test.jsindex 8f66f91d1..e9bf0aa60 100644--- a/server/src/lib/volumes-pipeline.test.js+++ b/server/src/lib/volumes-pipeline.test.js@@ -11,6 +11,10 @@ vi.mock('./ai-provider.js', () => ({resolveModel: vi.fn(),}));+vi.mock('../config/supabase.js', () => ({ default: {} }));++const { medianVolume } = await import('./volume-analysis.js');+const AI_VOLUME_MULTIPLIER = parseFloat(process.env.AI_VOLUME_MULTIPLIER || '0.15');describe('test-volumes pipeline (mocked)', () => {@@ -35,7 +39,7 @@ describe('test-volumes pipeline (mocked)', () => {expect(getSearchVolumes).toHaveBeenCalledTimes(1);});- it('should compute estimated AI volume from Google volumes', async () => {+ it('should estimate AI volume from the median of the Google volumes', async () => {const mockVolumes = {'keyword one': { volume: 10000, competitionIndex: 70, competition: 'HIGH' },'keyword two': { volume: 5000, competitionIndex: 50, competition: 'MEDIUM' },@@ -44,11 +48,11 @@ describe('test-volumes pipeline (mocked)', () => {getSearchVolumes.mockResolvedValue(mockVolumes);const volumes = await getSearchVolumes(['keyword one', 'keyword two']);- const totalGoogleVolume = Object.values(volumes).reduce((sum, v) => sum + v.volume, 0);- const estAiVolume = Math.round(totalGoogleVolume * AI_VOLUME_MULTIPLIER);+ const googleVolume = medianVolume(Object.values(volumes).map((v) => v.volume));+ const estAiVolume = Math.round(googleVolume * AI_VOLUME_MULTIPLIER);- expect(totalGoogleVolume).toBe(15000);- expect(estAiVolume).toBeCloseTo(2250);+ expect(googleVolume).toBe(7500);+ expect(estAiVolume).toBe(1125);});it('should handle zero volumes gracefully', async () => {@@ -59,10 +63,10 @@ describe('test-volumes pipeline (mocked)', () => {getSearchVolumes.mockResolvedValue(mockVolumes);const volumes = await getSearchVolumes(['rare term']);- const totalGoogleVolume = Object.values(volumes).reduce((sum, v) => sum + v.volume, 0);- const estAiVolume = Math.round(totalGoogleVolume * AI_VOLUME_MULTIPLIER);+ const googleVolume = medianVolume(Object.values(volumes).map((v) => v.volume));+ const estAiVolume = Math.round(googleVolume * AI_VOLUME_MULTIPLIER);- expect(totalGoogleVolume).toBe(0);+ expect(googleVolume).toBe(0);expect(estAiVolume).toBe(0);});diff --git a/supabase/migrations/00154_prompt_volume_median.sql b/supabase/migrations/00154_prompt_volume_median.sqlnew file mode 100644index 000000000..691c3f862--- /dev/null+++ b/supabase/migrations/00154_prompt_volume_median.sql@@ -0,0 +1,38 @@+-- A prompt's volume is the median of its keywords' Google volumes, not their+-- sum.+--+-- Volume analysis gives each prompt five head terms for its category+-- (server/src/lib/intent-extraction.js) and looked up their Google volumes.+-- Their sum stood for the prompt, but the five overlap, so the same searchers+-- were counted several times over, and one very broad term ("google gemini",+-- 5M a month) could set the whole figure: a single prompt read ~755k+-- estimated AI searches a month, and the Insights total ran to millions.+-- summarizeVolumes (server/src/lib/volume-analysis.js) now takes the median of+-- the keywords that have any volume; this applies the same rule to the rows+-- already stored, from the per-keyword volumes they keep, so no keyword is+-- looked up again. A row with no measured keyword stays at 0.+--+-- total_google_volume keeps its name; it now holds that median.++update public.prompt_volumes pv+set total_google_volume = m.google_volume,+ est_ai_volume = round(m.google_volume * pv.ai_volume_multiplier)::integer+from (+ select p.id,+ coalesce(round(percentile_cont(0.5) within group (order by k.volume)), 0)::integer+ as google_volume+ from public.prompt_volumes p+ left join lateral (+ select e.value::numeric as volume+ from jsonb_each_text(p.google_volumes) e+ -- Only numbers are cast; the case keeps the cast behind the check.+ where case when e.value ~ '^[0-9]+(\.[0-9]+)?$' then e.value::numeric > 0 else false end+ ) k on true+ group by p.id+) m+where m.id = pv.id+ and (pv.total_google_volume is distinct from m.google_volume+ or pv.est_ai_volume is distinct from round(m.google_volume * pv.ai_volume_multiplier)::integer);++comment on column public.prompt_volumes.total_google_volume is+ 'The prompt''s Google volume: the median of google_volumes'' measured keywords (named before the median replaced their sum).';diff --git a/supabase/migrations/00155_ai_volume_multiplier_45.sql b/supabase/migrations/00155_ai_volume_multiplier_45.sqlnew file mode 100644index 000000000..ec836b726--- /dev/null+++ b/supabase/migrations/00155_ai_volume_multiplier_45.sql@@ -0,0 +1,18 @@+-- The AI adoption rate's default goes from 15% to 45% of a prompt's Google+-- volume.+--+-- est_ai_volume is the prompt's Google volume (the median of its keywords',+-- 00154) times the AI adoption rate, AI_VOLUME_MULTIPLIER on the server.+-- Its default was 15%, about the share of Google searches that showed an AI+-- Overview a year ago; they now appear on roughly 43–48%+-- (server/src/lib/intent-extraction.js). This moves the rows stored at the+-- old default to the new one. Rows saved under any other rate were set on+-- purpose by the install, and are left alone.+--+-- An install that sets AI_VOLUME_MULTIPLIER=0.15 itself (server/.env.example+-- did) keeps analyzing at 15% until it is changed to 0.45 or removed.++update public.prompt_volumes+set ai_volume_multiplier = 0.450,+ est_ai_volume = round(total_google_volume * 0.450)::integer+where ai_volume_multiplier = 0.150;diff --git a/supabase/schema.sql b/supabase/schema.sqlindex 1afc6ee00..bafd6a44c 100644--- a/supabase/schema.sql+++ b/supabase/schema.sql@@ -18630,3 +18630,67 @@ grant execute on function public.insights_topic_competitors_daily(comment on function public.insights_topic_competitors_daily(uuid, date, date, text[], text) is'Insights "Topics vs competitors" (VIS-010, 00137; planned with its arguments, security definer, 00152): per active topic, the brand''s Visibility components over the topic''s prompts and each live competitor''s components over the same answers, from the prompt-grain rollups. complete=false until they are backfilled (00130). Null when the caller is not a member of the brand''s organization.';+-- ─────────────────────────────────────────────────────────────────────────+-- migrations/00154_prompt_volume_median.sql+-- ─────────────────────────────────────────────────────────────────────────+-- A prompt's volume is the median of its keywords' Google volumes, not their+-- sum.+--+-- Volume analysis gives each prompt five head terms for its category+-- (server/src/lib/intent-extraction.js) and looked up their Google volumes.+-- Their sum stood for the prompt, but the five overlap, so the same searchers+-- were counted several times over, and one very broad term ("google gemini",+-- 5M a month) could set the whole figure: a single prompt read ~755k+-- estimated AI searches a month, and the Insights total ran to millions.+-- summarizeVolumes (server/src/lib/volume-analysis.js) now takes the median of+-- the keywords that have any volume; this applies the same rule to the rows+-- already stored, from the per-keyword volumes they keep, so no keyword is+-- looked up again. A row with no measured keyword stays at 0.+--+-- total_google_volume keeps its name; it now holds that median.++update public.prompt_volumes pv+set total_google_volume = m.google_volume,+ est_ai_volume = round(m.google_volume * pv.ai_volume_multiplier)::integer+from (+ select p.id,+ coalesce(round(percentile_cont(0.5) within group (order by k.volume)), 0)::integer+ as google_volume+ from public.prompt_volumes p+ left join lateral (+ select e.value::numeric as volume+ from jsonb_each_text(p.google_volumes) e+ -- Only numbers are cast; the case keeps the cast behind the check.+ where case when e.value ~ '^[0-9]+(\.[0-9]+)?$' then e.value::numeric > 0 else false end+ ) k on true+ group by p.id+) m+where m.id = pv.id+ and (pv.total_google_volume is distinct from m.google_volume+ or pv.est_ai_volume is distinct from round(m.google_volume * pv.ai_volume_multiplier)::integer);++comment on column public.prompt_volumes.total_google_volume is+ 'The prompt''s Google volume: the median of google_volumes'' measured keywords (named before the median replaced their sum).';++-- ─────────────────────────────────────────────────────────────────────────+-- migrations/00155_ai_volume_multiplier_45.sql+-- ─────────────────────────────────────────────────────────────────────────+-- The AI adoption rate's default goes from 15% to 45% of a prompt's Google+-- volume.+--+-- est_ai_volume is the prompt's Google volume (the median of its keywords',+-- 00154) times the AI adoption rate, AI_VOLUME_MULTIPLIER on the server.+-- Its default was 15%, about the share of Google searches that showed an AI+-- Overview a year ago; they now appear on roughly 43–48%+-- (server/src/lib/intent-extraction.js). This moves the rows stored at the+-- old default to the new one. Rows saved under any other rate were set on+-- purpose by the install, and are left alone.+--+-- An install that sets AI_VOLUME_MULTIPLIER=0.15 itself (server/.env.example+-- did) keeps analyzing at 15% until it is changed to 0.45 or removed.++update public.prompt_volumes+set ai_volume_multiplier = 0.450,+ est_ai_volume = round(total_google_volume * 0.450)::integer+where ai_volume_multiplier = 0.150;+diff --git a/supabase/seed.sql b/supabase/seed.sqlindex a63a2e373..1905d2f8b 100644--- a/supabase/seed.sql+++ b/supabase/seed.sql@@ -195,6 +195,8 @@ ON CONFLICT (id) DO NOTHING;-- won't have — so we seed them here. Without these rows the Prompts page volume-- view stays empty even with the backend running. Served read-only by-- GET /api/volumes/brand/:id (no provider keys required to read).+-- total_google_volume is the median of the measured keyword volumes and+-- est_ai_volume is that × 0.45, as summarizeVolumes computes them.INSERT INTO public.prompt_volumes (prompt_id, intent, keywords, google_volumes,@@ -204,27 +206,27 @@ INSERT INTO public.prompt_volumes (('88888888-8888-8888-8888-888888888801', 'best-top','["best coffee subscription","coffee subscription","coffee subscription services","best coffee subscription 2026"]'::jsonb,'{"best coffee subscription":8100,"coffee subscription":22200,"coffee subscription services":5400,"best coffee subscription 2026":1300}'::jsonb,- 37000, 0.150, 5550, 2840, 'en', now() - interval '2 days'),+ 6750, 0.450, 3038, 2840, 'en', now() - interval '2 days'),('88888888-8888-8888-8888-888888888802', 'recommendation','["international coffee subscription","specialty coffee subscription","coffee subscription worldwide shipping"]'::jsonb,'{"international coffee subscription":2400,"specialty coffee subscription":4400,"coffee subscription worldwide shipping":880}'::jsonb,- 7680, 0.150, 1152, 2840, 'en', now() - interval '2 days'),+ 2400, 0.450, 1080, 2840, 'en', now() - interval '2 days'),('88888888-8888-8888-8888-888888888803', 'best-top','["office coffee subscription","monthly coffee bean subscription","coffee subscription for business"]'::jsonb,'{"office coffee subscription":3600,"monthly coffee bean subscription":1900,"coffee subscription for business":1600}'::jsonb,- 7100, 0.150, 1065, 2840, 'en', now() - interval '2 days'),+ 1900, 0.450, 855, 2840, 'en', now() - interval '2 days'),('88888888-8888-8888-8888-888888888804', 'best-top','["best espresso machine","home espresso machine","best espresso machine under 500","espresso machine under $500"]'::jsonb,'{"best espresso machine":18100,"home espresso machine":9900,"best espresso machine under 500":6600,"espresso machine under $500":4400}'::jsonb,- 39000, 0.150, 5850, 2840, 'en', now() - interval '2 days'),+ 8250, 0.450, 3713, 2840, 'en', now() - interval '2 days'),('88888888-8888-8888-8888-888888888805', 'comparison','["best espresso machine for beginners","beginner espresso machine","home espresso machine comparison"]'::jsonb,'{"best espresso machine for beginners":5400,"beginner espresso machine":2400,"home espresso machine comparison":720}'::jsonb,- 8520, 0.150, 1278, 2840, 'en', now() - interval '2 days'),+ 2400, 0.450, 1080, 2840, 'en', now() - interval '2 days'),('88888888-8888-8888-8888-888888888806', 'vs-review','["manual vs automatic espresso machine","manual espresso machine","automatic espresso machine"]'::jsonb,'{"manual vs automatic espresso machine":1900,"manual espresso machine":3600,"automatic espresso machine":4400}'::jsonb,- 9900, 0.150, 1485, 2840, 'en', now() - interval '2 days')+ 3600, 0.450, 1620, 2840, 'en', now() - interval '2 days')ON CONFLICT (prompt_id) DO NOTHING;-- ─── Competitors ─────────────────────────────────────────────────────────────