← back
PoolDPP-MAP cuts near-duplicate prompts by 89% in app.dejan.ai using Gemini embeddings and Decision 1

PoolDPP-MAP cuts near-duplicate prompts by 89% in app.dejan.ai using Gemini embeddings and Decision 1

Oversampling with PoolDPP-MAP, gemini-embedding-2, and gemini-decision-1 cut near-duplicate prompts from 38 to 4 across three input modes in app.dejan.ai while raising mean quality to 0.9418.

Across three input modes on dejan.ai (Project Context, Single Entity, and Website URL), oversampling candidate outputs and selecting a subset with a quality-weighted Determinantal Point Process (PoolDPP-MAP) reduced near-duplicate prompt pairs (cosine similarity above 0.80) from 38 to 4 while raising mean quality from 0.9011 to 0.9418 and lifting the lowest-scoring prompt from 0.5605 to 0.8865. The pipeline runs on closed-source models without generator log-probabilities by pairing gemini-embedding-2 for semantic repulsion with gemini-decision-1 for calibrated quality scoring, at a scoring and embedding cost of $0.001 per 100 candidates in 0.4 seconds. It is now live as an opt-in option in two app.dejan.ai tools: Diverse mode in Prompt Generator and Diverse subjects in Content Writer.

Test it on your own topic or page: Compare 20 standard single-shot prompts against 20 PoolDPP-selected prompts side by side, with live duplicate, semantic spread, and Decision 1 quality scores.

Try the Diverse Prompt Generator →

What it does in app.dejan.ai

Language models generate each completion independently. Asking a model for 20 prompts or 5 article titles in one call produces outputs that cluster around the same high-probability phrasing. In citation tracking, near-duplicate prompts burn API runs testing the same intent multiple times; in content planning, overlapping subjects produce articles that compete against each other and against posts already on the site.

Two opt-in controls in app.dejan.ai address this directly:

  1. Prompt Generator (Diverse mode): Oversamples 5× candidate prompts for counts of 10 or 20 (3× for 50 or 100), deduplicates exact matches, embeds every unique prompt with gemini-embedding-2, scores buyer relevance in one gemini-decision-1 call, and selects the final \(K\) prompts with greedy K-DPP MAP (\(\beta = 1.5\)).
  2. Content Writer (Diverse subjects): Requests 4× candidate {title, angle} pairs (12 to 20 ideas) inside the existing single Subject pick call, projects those candidates onto the orthogonal complement of existing Content Library titles, scores editorial quality with gemini-decision-1, and ranks the shortlist by conditioned PoolDPP-MAP. When Pick title is checked, the top \(N\) diverse subjects appear pre-selected at the top of the list.

Side-by-side example: dejan.ai Project Context (\(K = 20\))

In a benchmark on property 82 (dejan.ai, 271 entities, gemini-4-hydrogen, non-branded mode), single-shot generation repeated variations of hiring or evaluating an AI SEO agency five times (items 1, 3, 9, 16, and 20). PoolDPP-MAP (\(\beta = 1\)) kept one agency-selection prompt and filled the remaining slots with distinct topics from the entity graph that single-shot generation omitted: Selection Rate Optimization (SRO), information gain, AI crawler E-E-A-T signals, LLM hallucination auditing, and LLM search volume prediction.

Slot Traditional single-shot (20 prompts) PoolDPP-MAP (\(\beta = 1\), from pool of 100)
1 What are the best AI SEO agencies in Australia for enterprise e-commerce brands looking to improve visibility in generative search? What are the best AI SEO agencies in Australia for enterprise e-commerce brands?
2 What should I look for when hiring a technical SEO agency to handle a large-scale website migration and AI search optimization? What is selection rate optimization (SRO), and how does it differ from traditional click-through rate optimization?
3 What is the difference between traditional SEO and Generative Engine Optimization (GEO), and how should we budget for an agency? How can I measure information gain and information density in my existing content to make it more likely to be cited by AI?
4 Can you recommend top-tier Australian digital marketing agencies that specialize in data-driven technical SEO rather than basic link building? How do AI crawlers evaluate source authority and E-E-A-T signals compared to traditional search engine crawlers?
5 What are the key criteria for evaluating an enterprise Answer Engine Optimization agency with a monthly retainer between $5,000 and $20,000? What tools or methodologies exist for predicting LLM search volume and emerging purchase-intent prompts?
6 What metrics should be included in an executive AI SEO reporting dashboard for a global e-commerce business? How can we audit and fix brand association or veracity issues when an LLM hallucinates information about our company?

Excerpt of 6 slots from the 20-prompt runs; zero brand leaks occurred in any method.

Live public tool example (5-lens proposal + PoolDPP-MAP): “Looking for an AI SEO agency in Australia” (\(K = 20\))

On a narrow 7-word query in the public Diverse Prompt Generator, the pipeline combines a 5-lens buyer-journey proposal (100-prompt pool, 30.6 seconds) with PoolDPP-MAP selection (distinct from the unsteered, identical-prompt benchmarks in Figures 1 and 4 below). Single-shot generation produced 111 near-duplicate pairs above 80% cosine similarity out of 190 total pairs; the 5-lens proposal plus PoolDPP-MAP reduced that to 3 near-duplicate pairs (a 97.3% drop) while raising average semantic spread from 19.2% to 29.2% and lifting the lowest Decision 1 relevance score from 63.2% to 86.7%.

Metric (\(K = 20\), 100 unique candidates) Standard (single-shot 20) 5-lens proposal + PoolDPP-MAP
Near-duplicate pairs (>80% cosine similarity)1113
Average semantic spread (mean pairwise distance)19.2%29.2%
Tightest duplicate pair (max cosine similarity)91.0%82.5%
Buyer relevance mean (gemini-decision-1)90.3%93.2%
Buyer relevance minimum (weakest prompt)63.2%86.7%
# Standard (single-shot 20) Diverse (PoolDPP from 100-prompt pool)
1What are the best digital marketing agencies in Australia that specialize in AI-driven SEO?I run an Australian e-commerce store and want to optimize for ChatGPT and Perplexity as well as Google. What type of agency handles this?
2How much do Australian agencies typically charge per month for AI SEO and automated content optimization?What are the pros and cons of using an AI SEO agency to handle technical site architecture audits compared to a veteran technical SEO consultant?
3Can you recommend Sydney or Melbourne SEO agencies that focus on generative engine optimization (GEO) and AI search visibility?What questions should be added to our agency tender to test an Australian partner's actual expertise in Generative Engine Optimization (GEO)?
4What should I look for when evaluating an agency in Australia that claims to use AI for search engine optimization?I need an Australian agency capable of automating metadata and alt-tag generation via computer vision and multimodal AI for an apparel retailer with 50,000 images.
5What are the key differences between a traditional Australian SEO agency and a modern AI-powered search agency?What should be included in an executive business case to convince our board to switch from a legacy SEO agency to an AI-first search partner?
6Are there Australian SEO agencies that specialize in AI optimization specifically for B2B SaaS companies?Our website has thousands of thin AI-generated landing pages dragging down domain authority. How do specialist recovery agencies audit and prune this content?
7How do Australian AI SEO agencies prevent search penalty risks when using generative AI for large-scale content creation?How should I calculate the expected payback period and ROI for a $10,000 per month AI search optimization retainer in Australia?
8I run an Australian e-commerce store and want to optimize for ChatGPT and Perplexity as well as Google. What type of agency handles this?Which technical SEO providers in Melbourne or Sydney have experience managing complex JavaScript framework migrations using automated pre-rendering and AI log file analysis?
9What vetting questions should I ask an Australian SEO agency to verify they use real AI data modeling rather than just basic ChatGPT prompts?What contractual safeguards and quality assurance SLAs should we demand regarding Google algorithmic penalties when contracting an AI SEO firm?
10Can you list boutique digital agencies based in Australia that integrate programmatic SEO and machine learning into their strategy?Can you provide an RFP checklist and scoring rubric for procuring an AI SEO agency for an Australian national brand?
11Is hiring an AI SEO agency worth the cost for an Australian small business compared to a standard freelance SEO consultant?What are the trade-offs of outsourcing programmatic content creation to an AI SEO agency versus keeping human copywriters in-house for quality control?
12What metrics do Australian AI SEO agencies use to report on ROI now that AI Overviews are reducing traditional organic clicks?What technical vetting questions should a CMO ask to verify an Australian agency uses sophisticated AI workflows rather than just basic ChatGPT wrappers?
13Where can I find case studies or reviews of Australian businesses that hired an AI search marketing agency?What specific ROI metrics and attribution models should I use to evaluate an AI-driven SEO campaign versus traditional SEO?
14Which search marketing firms in Brisbane or Queensland have proven expertise in AI-assisted technical SEO audits?What deliverables and reporting cadences are standard for a mid-tier Australian AI SEO agency charging $5,000 to $8,000 monthly?
15What does a standard monthly service package look like when working with an Australian AI search agency?Which Australian agencies have specialized case studies for international SEO migrations involving multi-region hreflang architecture and automated AI localization between AU, NZ, and US markets?
16How are top Australian search agencies adapting local SEO strategies for voice search and conversational AI agents?What red flags should I look for in an Australian SEO agency proposal that guarantees rapid organic traffic scaling solely through generative AI?
17What are the risks of Australian businesses outsourcing their organic content completely to an AI-first marketing firm?What hidden costs frequently arise with AI SEO contracts, such as API usage fees, LLM token costs, or third-party monitoring tools?
18Are enterprise AI SEO retainers in Australia generally more expensive or cheaper than traditional organic search contracts?Our internal marketing team used generative AI for meta tags and now click-through rates have collapsed. Can an agency troubleshoot AI prompt drift?
19I need an Australian agency that understands semantic search, knowledge graphs, and entity-based SEO using AI. Who fits this profile?I need an Australian technical SEO consultancy that uses machine learning models to analyze internal linking architecture at scale. Who should I look at?
20What is the realistic timeline to see measurable organic growth when partnering with an Australian AI SEO firm?How should Australian enterprise marketing teams budget for human-in-the-loop editorial review when negotiating an AI SEO retainer?

Benchmark results across three input modes

We benchmarked five selection methods on dejan.ai (property 82) at \(K = 20\) across three input types: Project Context (271 database entities, locations, and objectives), Single Entity (ai seo agency), and Website URL (https://dejan.ai with live grounding via URL context). Every pool method selected 20 prompts from the same 100-prompt pool generated by gemini-4-hydrogen.

Three-mode benchmark comparison across Project Context, Single Entity, and Website URL showing Log-Det diversity, near-duplicate pairs above 0.80 cosine similarity, and minimum gemini-decision-1 quality score
Figure 1: Comparison of five selection methods at \(K = 20\) across Project Context, Single Entity, and Website URL on dejan.ai.

1. Project Context (271 entities)

Method (\(K = 20\)) Gram Log-Det Mean Cos Dist Max Pair Sim Pairs > 0.80 Mean Quality Min Quality
Traditional (single-shot)-20.6110.33450.806310.91920.8141
k-Means (\(N = 100\))-23.3160.31110.855980.94340.9126
PoolDPP-MAP pure diversity (\(\beta = 0\))-17.7700.37460.728700.89250.7103
PoolDPP-MAP (\(\beta = 1\))-18.3600.36730.771800.92420.8691
PoolDPP-MAP (\(\beta = 2\))-18.8800.35970.792200.93000.8844

2. Single Entity (ai seo agency)

Method (\(K = 20\)) Gram Log-Det Mean Cos Dist Max Pair Sim Pairs > 0.80 Mean Quality Min Quality
Traditional (single-shot)-28.5410.21770.9012600.95930.9293
k-Means (\(N = 100\))-28.0330.22300.9247400.97240.9427
PoolDPP-MAP pure diversity (\(\beta = 0\))-23.4360.26870.823210.94550.8566
PoolDPP-MAP (\(\beta = 1\))-23.5220.26930.822050.96020.8723
PoolDPP-MAP (\(\beta = 2\))-23.9330.26360.835140.96770.9480

3. Website URL (https://dejan.ai, live url_context)

Method (\(K = 20\)) Gram Log-Det Mean Cos Dist Max Pair Sim Pairs > 0.80 Mean Quality Min Quality
Traditional (single-shot)-20.7650.33280.813920.89620.4702
k-Means (\(N = 100\))-20.9510.34090.851360.95670.8929
PoolDPP-MAP pure diversity (\(\beta = 0\))-17.0780.39190.730400.85620.4277
PoolDPP-MAP (\(\beta = 1\))-18.2350.37030.781800.93920.8353
PoolDPP-MAP (\(\beta = 2\))-19.1270.35710.809510.95560.8929
  • k-Means reduced diversity relative to PoolDPP-MAP. Picking the highest-scoring item inside each k-Means cluster pulls adjacent cluster winners toward the same high-quality region, yielding 8 near-duplicate pairs on Project Context and 40 on Single Entity (where Max Pair Sim reached 0.9247).
  • Pure-diversity DPP (\(\beta = 0\)) pulled in low-quality outliers. Without a quality term, the maximum-volume objective rewarded unusual phrasing regardless of usefulness, dropping Min Quality to 0.7103 on Project Context and 0.4277 on Website URL. Weighting the kernel with gemini-decision-1 (\(\beta = 1\) to \(2\)) raised Min Quality to 0.8353–0.9480 while keeping near-duplicate counts at 0 to 5.

The original paper: PoolDPP (NeurIPS 2026)

Our implementation builds on A Model of Diverse Sampling from Language Models (Manuel Prada-Corral, Yahya Emara, Timothy J. O'Donnell, Ryan Cotterell, and Tim Vieira, NeurIPS 2026; code at rycolab/pool-dpp).

The paper formalizes diverse generation as selecting a size-\(K\) subset \(S\) of complete strings from a K-Determinantal Point Process (K-DPP). Each string \(y\) is represented by a unit-norm vector embedding \(\phi(y) \in \mathbb{R}^D\) (\(\|\phi(y)\|_2 = 1\)) and a scalar quality score \(\kappa(y) \ge 0\). The kernel matrix \(L\) is:

$$L(x, y) = \sqrt{\kappa(x)}\,\phi(x)^\top \phi(y)\,\sqrt{\kappa(y)}$$

The probability of selecting subset \(S\) of size \(K\) is proportional to the determinant of its principal submatrix \(L_S\), which factorizes into a quality product and a geometric diversity volume:

$$\det(L_S) = \left(\prod_{y \in S} \kappa(y)\right) \det\!\left(\Phi_S^\top \Phi_S\right)$$

Geometrically, \(\det(L_S)\) equals the squared volume of the \(K\)-dimensional parallelepiped spanned by the quality-scaled vectors \(\{\sqrt{\kappa(y)}\,\phi(y)\}_{y \in S}\). When two strings are nearly identical, their vectors point in almost the same direction and the volume collapses toward zero regardless of individual quality.

Geometric illustration of DPP volume comparing spread versus clustered candidates and Content Library orthogonal projection
Figure 2: Panel A shows how two nearly parallel high-quality vectors span near-zero area while spread vectors span large area. Panel B shows how orthogonal projection onto the Content Library complement shrinks the residual norm of overlapping candidates.

Exact inference over all possible strings \(\Sigma^*\) is intractable, so the paper proposes PoolDPP: draw a finite candidate pool of size \(N\) from a tractable proposal distribution \(q\), build the finite pool kernel, and run K-DPP inference on the pool. The paper defines two inference modes:

  • PoolDPP-Sampling: Importance-weights each pool item by \(w^{(n)} = \kappa(y^{(n)}) / q(y^{(n)})\) and draws an exact stochastic K-DPP sample via the \(D \times D\) dual kernel at cost \(O(D^2 N + D^3 + DNK)\). The authors prove an explicit finite-sample bound showing that the KL divergence to the intractable population K-DPP decays as \(O(1/N)\), with Lean 4 machine-checked proofs in the repository.
  • PoolDPP-MAP: Targets the single size-\(K\) subset in the pool that maximizes \(\det(L_S)\) via greedy orthogonal projection. Because MAP maximizes \(\det(L_S)\) over the realized pool rather than approximating a distribution over \(\Sigma^*\), it requires no proposal density \(q(y)\) and no importance weights.

Adapting PoolDPP to closed-source models

In the paper's experiments on open-weight models (Gemma-2-9B, Qwen3-8B, Llama-3.1-8B), quality is defined as globally annealed sequence likelihood \(\kappa(y) = p(y)^{1/T}\), extracted via a patched vLLM build that logs token probabilities at temperature \(T'\) and \(T = 1\).

Closed-source models such as Gemini 4 do not expose generator log-probabilities. Without \(q(y)\) or \(p(y)\), importance-weighted PoolDPP-Sampling cannot be computed. PoolDPP-MAP needs only two external ingredients:

  1. Unit-norm semantic vectors \(\phi(y)\) from gemini-embedding-2 (3072 dimensions, already used by Image Optimizer in app.dejan.ai).
  2. Calibrated scalar quality scores \(\kappa(y)\) from gemini-decision-1 (Google's Decisions API), which evaluates up to 1,000 typed questions against a shared context in a single HTTP request and returns calibrated probabilities \(p_i \in (0, 1)\).
Closed-source PoolDPP-MAP pipeline diagram in app.dejan.ai using Gemini 4, gemini-embedding-2, gemini-decision-1, optional Content Library orthogonal projection, and greedy K-DPP MAP
Figure 3: Production PoolDPP-MAP pipeline in app.dejan.ai.

Replacing sequence log-probabilities with gemini-decision-1 changes the quality signal in a useful way: sequence log-probability favors short, high-frequency strings, whereas gemini-decision-1 scores each candidate directly against a task-specific rubric (buyer realism and specificity for Prompt Generator; editorial originality and site fit for Content Writer).

Greedy K-DPP MAP in log space

In modules/prompt_generator/pool_dpp.py, we run the greedy MAP algorithm directly on the quality-scaled residuals without forming an \(N \times N\) Gram matrix. Setting \(\log s_i = \beta \log p_i\) (where \(p_i\) is the gemini-decision-1 probability clipped to \([10^{-6}, 1]\) and \(\beta\) controls quality strength), each step selects:

$$i^* = \arg\max_{i \notin S} \left(2 \log s_i + \log \|r_i\|_2^2\right)$$

Here \(r_i\) is the component of \(\phi(y_i)\) orthogonal to all previously selected vectors. After picking \(i^*\), every remaining residual is updated in one rank-1 Gram-Schmidt step:

$$v = \frac{r_{i^*}}{\|r_{i^*}\|_2}, \qquad r_j \leftarrow r_j - (r_j^\top v)\,v$$

Selecting \(K = 20\) items from \(N = 100\) vectors in 3072 dimensions takes under 10 milliseconds on CPU in NumPy.

Content Library repulsion via conditional orthogonal projection

For Content Writer (modules/content_agent/subject_dpp.py), preventing overlap within a single batch is only half the requirement; new articles must also stay clear of topics already in the property's Content Library.

Before running greedy_map, we fetch up to 100 recent own-content titles for the property (from outreach_articles in website mode and manual content_entries), embed them alongside the candidate {title, angle} pairs, and compute an orthonormal basis \(Q\) for the library span via thin SVD (retaining singular values above \(10^{-6}\)). Projecting each candidate onto the orthogonal complement gives:

$$r_i^{(0)} = \phi(y_i) - (\phi(y_i)^\top Q)\,Q^\top$$

The projected vectors are passed into greedy_map without re-normalization. Because greedy_map folds \(\log \|r_i^{(0)}\|_2\) into \(\log s_i\), a candidate that closely mirrors an existing Library article starts with \(\|r_i^{(0)}\|_2 \approx 0\) and receives a large negative log-volume penalty, while a candidate orthogonal to the Library starts with \(\|r_i^{(0)}\|_2 \approx 1\) and pays no penalty. This is exact conditional K-DPP MAP inference given the existing Library.

Parameter sweep: choosing defaults

To select default values for the pool multiplier (\(N / K\)) and quality weight (\(\beta\)), we ran a nested sweep across all three input modes on dejan.ai (\(K = 20\)), evaluating multipliers 1× through 5× and \(\beta \in \{0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0\}\) on the same generated pools.

Quality-diversity Pareto frontier and near-duplicate counts across pool multipliers 1x to 5x and beta 0 to 4
Figure 4: Three-mode average quality–diversity frontier (Panel A) and total near-duplicate pairs above 0.80 similarity (Panel B) across pool multipliers and \(\beta\).
Config (\(K = 20\), 3-mode average) Avg Log-Det Avg Cos Dist Total Pairs > 0.80 Avg Quality Worst Min Quality
1× baseline (single-shot)-22.4310.3068380.90110.5605
2×, \(\beta = 1.0\)-21.5040.3162120.92880.8253
3×, \(\beta = 1.0\)-21.1390.3217140.93010.8253
4×, \(\beta = 1.5\)-21.2120.320580.93820.8253
5×, \(\beta = 1.0\)-20.6920.327950.93460.8453
5×, \(\beta = 1.5\) (production default)-21.1350.321440.94180.8865
5×, \(\beta = 2.0\)-21.2800.321070.94350.8865
5×, \(\beta = 4.0\)-22.1240.3099180.95030.8999

At \(\beta \ge 3.0\) on 2× to 4× pools, quality weighting overpowered volume repulsion and pushed Avg Log-Det below the 1× baseline. Production defaults are set to \(\beta = 1.5\) in both tools, with a 5× pool for Prompt Generator at \(K \le 20\) (3× at \(K \ge 50\)) and a 4× pool (12 to 20 subjects) for Content Writer.

Cost, latency, and implementation scope

Every extra stage in PoolDPP-MAP is metered through the existing app.dejan.ai credit ledger (own-key BYO properties ride their own Google API key and are not charged platform credits).

Component Model List Rate Typical Cost (\(K = 20, N = 100\)) Measured Latency
Candidate pool (Prompt Generator)gemini-4-hydrogen$1.50 / 1M in, $7.50 / 1M out~$0.03–$0.04 (5 batches, 2-way parallel)25–35 s
Candidate pool (Content Writer)Antigravity agent~$0.20 per Subject pick~$0.20 (same single picker call)~60 s
Embeddingsgemini-embedding-2$0.20 / 1M input tokens~$0.0005 (~2.5k tokens)3.3–4.3 s
Quality scoringgemini-decision-1$0.10 / 1M input tokens, $0 out~$0.0005 (~5k tokens, 1 call)0.4 s
Greedy K-DPP MAP + SVDLocal NumPy (CPU)$0$0< 0.01 s

PoolDPP-MAP selects only from candidates present in the generated pool. On broad inputs (Project Context and Website URL), 5× sampling eliminated all pairs above 0.80 cosine similarity; on a narrow single entity (ai seo agency), 4 to 5 pairs above 0.80 remained because all five pool batches shared the same prompt template. All measurements above were collected on property 82 (dejan.ai) using gemini-4-hydrogen, gemini-embedding-2, and gemini-decision-1 on 24 November 2026.

Related concepts

AI SEO DEJAN 0291

Comments