Repository navigation
Closed
Labels
Description
Problem
Content opportunities are generated per prompt, and the generator only looks at the 25 highest-scoring prompts on each nightly run. On a brand with 709 active prompts:
- Only 82 prompts have any open opportunity.
- Those 82 prompts hold 748 open opportunities between them, and one prompt alone has 38.
- The opportunities cover 10 of the brand's 22 topics.
User feedback put it directly: suggesting 44 pieces of content for a single prompt makes no sense. Related prompts should be grouped first, and content suggested per group.
There are two problems here:
- Pile-up. The same prompts win the ranking every night and the model rewords the same idea each time. This is tracked in fix(content): stop opportunities piling up on the same prompts #837.
- Wrong unit. One piece of content answers many closely related prompts. A guide on "the benefits of open-source AEO for startups" can earn visibility across 8–10 prompts that ask the same thing in different words. Generating per prompt suggests the same article over and over and leaves most prompts uncovered.
Proposal
1. Cluster prompts within each topic
Topics are too broad to act as clusters: the median topic has 24 prompts and the largest has 91. They are a good boundary, though.
- Within each topic, group prompts by intent into clusters of roughly 3–8 prompts.
- An LLM call per topic is the simplest start. The brand above would need 22 calls. Embeddings are a later option; we have no vector infrastructure today.
- Store the clusters, for example
prompt_clusters(id, brand_id, topic_id, label) with prompt membership. - Recompute a topic's clusters only when its prompts change: added, removed, or moved to another topic.
2. Generate per cluster
- Rank clusters by the combined opportunity of their member prompts: estimated AI volume, visibility gap and competitor gap.
- Generate for the best clusters that have no open opportunity yet, and allow at most 1–2 open opportunities per cluster.
- Over successive runs this reaches every cluster, and with them every prompt, instead of the same top 25 prompts.
3. Opportunity ↔ cluster
- An opportunity belongs to a cluster and lists the cluster's prompts.
- The content brief treats those prompts as the questions the piece must answer, for example as FAQ entries or section headings.
4. Knock-on changes
- The prompt filter on the Content page (feat(content): filter opportunities by prompt #836) and the opportunities card on the prompt detail page (feat(prompts): show a prompt's content opportunities on its detail page #838) show a prompt's opportunities. After this change they should match opportunities whose cluster contains the prompt.
- fix(content): stop opportunities piling up on the same prompts #837 caps open opportunities per prompt. This design replaces that cap with a per-cluster one, but fix(content): stop opportunities piling up on the same prompts #837 is still worth landing first as a stopgap.
- The existing backlog of per-prompt opportunities needs a migration plan: archive them, or map each one to its prompt's cluster.
Open questions
- Cluster size bounds, and whether a prompt can belong to more than one cluster. The proposal assumes exactly one.
- Whether users can see or rename clusters, or whether they stay internal to generation.
- How often to re-cluster, and whether reassigning a prompt should move its open opportunities with it.
Activity
gkhngyk commentedon Oct 2, 2026
Decisions on the open questions:
Order. This starts after #869 lands, which stops the per-prompt pile-up now. The per-prompt cap there becomes a per-cluster cap here. Most of the work is data-model and pipeline changes, so we'll build this one ourselves.
gkhngyk commentedon Oct 4, 2026
Updated plan
This issue now also covers a wider spec for Content Opportunities. The spec's core asks for the same thing as the proposal above: turn many prompt and fan-out signals into a few opportunity baskets, instead of one opportunity per prompt. The plan below folds the spec into phases. Each phase ships on its own.
Phase 1: clusters as the unit (this issue)
topic_idis null) are clustered in their own "unassigned" scope. They are not dropped.prompt_clusters(brand_id, topic_id, label, primary intent, secondary intents) with prompt membership. Each prompt belongs to exactly one cluster.Phase 2: existing content and assets
Phase 3: company-aware relevance
Phase 4: measurement loop
Not planned for now
feat(content): cluster prompts by intent within each topic (#925)
feat(content): generate one opportunity per prompt cluster (#930)
feat(content): read the opportunity list through prompt clusters (#932)
feat(content): keep an inventory of each brand's site pages (#936)
feat(content): decide create, optimize or expand from the site's pages (
feat(content): recommend several assets per opportunity (#940)
feat(content): send an opportunity or one of its assets to the Action…
feat(content): follow an opportunity through its Action Center work
feat(content): follow an opportunity through its Action Center work (#…
feat(action-center): measure opportunity actions on their own basket (#…
feat(content): re-open finished opportunities when their signals move (…
gkhngyk commentedon Oct 7, 2026
Phases 1, 2 and 4 have shipped (#925, #930, #932, #936, #939, #940, #943, #952, #956, #960). Phase 3, the brand profile, continues in #964.
gkhngyk commentedon Oct 7, 2026
Closing: the plan is done except Phase 3, which was dropped.