# Search results for: "how does PoolDPP avoid near-duplicate prompts"

## https://dejan.ai/blog/pooldpp-map-diverse-sampling-gemini-embeddings-decision-1/ (score: 1.000)

Title: PoolDPP-MAP cuts near-duplicate prompts by 89% in app.dejan.ai using Gemini embeddings and Decision 1
Section: The original paper: PoolDPP (NeurIPS 2026)

## The original paper: PoolDPP (NeurIPS 2026)

Our implementation builds on [*A Model of Diverse Sampling from Language Models*](https://arxiv.org/pdf/2611.25003) (Manuel Prada-Corral, Yahya Emara, Timothy J. O'Donnell, Ryan Cotterell, and Tim Vieira, NeurIPS 2026; code at [rycolab/pool-dpp](https://github.com/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](/concepts/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.

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.

---

## https://dejan.ai/blog/pooldpp-map-diverse-sampling-gemini-embeddings-decision-1/ (score: 0.984)

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

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.

---

## https://dejan.ai/blog/pooldpp-map-diverse-sampling-gemini-embeddings-decision-1/ (score: 0.968)

Title: PoolDPP-MAP cuts near-duplicate prompts by 89% in app.dejan.ai using Gemini embeddings and Decision 1
Section: What it does in app.dejan.ai

## 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.

---

## https://dejan.ai/blog/pooldpp-map-diverse-sampling-gemini-embeddings-decision-1/ (score: 0.953)

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

> **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 →](/tools/diverse-prompts/)

---

## https://dejan.ai/blog/pooldpp-map-diverse-sampling-gemini-embeddings-decision-1/ (score: 0.938)

Title: PoolDPP-MAP cuts near-duplicate prompts by 89% in app.dejan.ai using Gemini embeddings and Decision 1
Section: Adapting PoolDPP to closed-source models

## 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)\).

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.

---

## https://dejan.ai/blog/pooldpp-map-diverse-sampling-gemini-embeddings-decision-1/ (score: 0.924)

Title: PoolDPP-MAP cuts near-duplicate prompts by 89% in app.dejan.ai using Gemini embeddings and Decision 1
Section: Side-by-side example: dejan.ai Project Context (\(K = 20\))

### 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](/concepts/selection-rate-optimization/) (SRO), information gain, AI crawler E-E-A-T signals, LLM [hallucination](/concepts/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.*

---

## https://dejan.ai/blog/pooldpp-map-diverse-sampling-gemini-embeddings-decision-1/ (score: 0.910)

Title: PoolDPP-MAP cuts near-duplicate prompts by 89% in app.dejan.ai using Gemini embeddings and Decision 1
Section: Parameter sweep: choosing defaults

## 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.

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.135****0.3214****4****0.9418****0.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.

---

## https://dejan.ai/blog/pooldpp-map-diverse-sampling-gemini-embeddings-decision-1/ (score: 0.897)

Title: PoolDPP-MAP cuts near-duplicate prompts by 89% in app.dejan.ai using Gemini embeddings and Decision 1
Section: Live public tool example (5-lens proposal + PoolDPP-MAP): “Looking for an AI SEO agency in Australia” (\(K = 20\))

### 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](/tools/diverse-prompts/), 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)111**3**
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)

---

## https://dejan.ai/blog/pooldpp-map-diverse-sampling-gemini-embeddings-decision-1/ (score: 0.884)

Title: PoolDPP-MAP cuts near-duplicate prompts by 89% in app.dejan.ai using Gemini embeddings and Decision 1
Section: Benchmark results across three input modes

## 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](/concepts/grounding/) via URL context). Every pool method selected 20 prompts from the same 100-prompt pool generated by `gemini-4-hydrogen`.

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.360****0.3673****0.7718****0****0.9242****0.8691**
**PoolDPP-MAP (\(\beta = 2\))****-18.880****0.3597****0.7922****0****0.9300****0.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.522****0.2693****0.8220****5****0.9602****0.8723**
**PoolDPP-MAP (\(\beta = 2\))****-23.933****0.2636****0.8351****4****0.9677****0.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.235****0.3703****0.7818****0****0.9392****0.8353**
**PoolDPP-MAP (\(\beta = 2\))****-19.127****0.3571****0.8095****1****0.9556****0.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.

---

## https://dejan.ai/blog/pooldpp-map-diverse-sampling-gemini-embeddings-decision-1/ (score: 0.871)

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

## Related concepts

- [Vector Embedding](/concepts/vector-embedding/)
- [AI Visibility](/concepts/ai-visibility/)
- [Selection Rate Optimization](/concepts/selection-rate-optimization/)
- [Query Fanout](/concepts/query-fanout/)
- [Grounding](/concepts/grounding/)
- [Hallucination](/concepts/hallucination/)

---
