Skip to content

Contextual Embeddings Beyond the Gold Chunk (pplx-embed-v2-context)

optionalcorefrontierpaperrubric 12/122026 · arXiv (Perplexity AI, turbopuffer), Oct 28, 2026 · ~45 min

Sedigheh Eslami, Markus Krimmel, William Barber, Antoine Chaffin, Maximilian Schall, Jonas Golde, Louis Milliken, Ekaterina Glazkova, Denis Bykov, Bo Wang

Read first: Late Chunking: contextual chunk embeddings with long-context encoders · ConTEB and InSeNT: Context is Gold to find the Gold Passage

Status

TL;DR. Contextual embedding models are usually trained and evaluated as if each relevant document had exactly one relevant chunk. This paper argues that in RAG a retriever must find answers spread across chunks and surface the evidence needed to verify them. It contributes three things:

  • Training: pplx-embed-v2-context (9B and 0.6B, with compatible embedding spaces) learns from graded chunk relevance distilled from a query-aware context-compression model. No gold-chunk labels are needed.
  • Evaluation: two benchmarks that label both answer and evidence chunks. Context-bench is a controlled diagnostic; Q2D-Chunk is built from real search queries and has a public leaderboard.
  • Multimodal: the vision-language backbone lets images be “chunked” too, giving state-of-the-art dense retrieval on ViDoRe-V3.

Why it matters now. This is the current frontier of the section. It moves the field from “find the gold passage” to “find everything the reader needs”, which is the nugget-style view of relevance applied to chunk retrieval.

For a query qq with positive document dd, chunk relevance is the mean of its top-kk teacher token scores ρ(v)\rho(v):

r(c)=1k∑v∈Topk(c)ρ(v),pT(c)∝exp⁡ ⁣(r(c)/τT) for c∈d, 0 otherwiser(c)=\tfrac{1}{k}\textstyle\sum_{v\in\mathrm{Top}_k(c)}\rho(v),\qquad p^{T}(c)\propto \exp\!\big(r(c)/\tau^{T}\big)\ \text{for } c\in d,\ 0\ \text{otherwise}

The student’s distribution pSp^{S} is a softmax of q⊤c/τS\mathbf{q}^\top\mathbf{c}/\tau^{S} over all chunks of all documents in the batch. The loss is KL(pT∥pS)\mathrm{KL}(p^{T}\Vert p^{S}) plus a document-level contrastive term. Each training document gets a randomly sampled chunking, with separator tokens marking boundaries, and is encoded in one pass (late-chunking style). The 9B model starts from Perplexity’s vision-language ColBERT (pplx-embed-v2-late, 2610.29523); the 0.6B model is distilled from the 9B one.

Beyond the Gold Chunk: teacher, graded chunk labels, student, evaluation Four stages in a row. One: a query-aware context-compression teacher scores every token of the positive document. Two: each chunk gets a relevance r(c), the mean of its top-k token scores, and a softmax over the document's chunks gives a graded target distribution rather than one gold chunk. Three: the student encodes the document in one pass with a randomly sampled chunking and produces a softmax over all chunks in the batch; the loss is the KL divergence from teacher to student plus a document-level contrastive term. Four: evaluation labels answer groups and evidence groups and reports Answer@10, evidence recall and alpha-nDCG@10. Bottom: an illustrative comparison of targets over four chunks of one document. A gold-chunk target puts all mass on the answer chunk and treats the definition and evidence chunks as negatives; a graded target gives them partial credit. A note says the teacher is not public. 1 · Teacher query-aware context compressor scores each token ρ(v) in positive doc d 2 · Chunk labels r(c) = mean of the top-k token scores p_T ∝ exp(r(c)/τ_T) graded, not 1 gold 3 · Student random chunking, one encoder pass p_S: softmax over all chunks in batch 4 · Evaluation answer groups + evidence groups Answer@10, evidence recall, α-nDCG@10 Loss: KL(p_T ‖ p_S) + a document-level contrastive term The teacher is a production compressor that is not public. Training target over four chunks of one document (illustrative values) Gold-chunk target Graded target c1 c2 c3 c4 1.0 c1 c2 c3 c4 c1 defines the entity · c2 states the answer · c3 holds supporting evidence · c4 is unrelated. Gold-chunk training treats c1 and c3 as negatives; graded targets give them partial credit.
Original sketch. A query-aware compressor teacher turns token scores into graded chunk targets; the student matches them by KL over every chunk in the batch, and evaluation counts answer and evidence groups rather than one gold chunk. Target values in the lower panel are illustrative.
  • Teacher dependence: the teacher is a production compressor that is not public, so the recipe is hard to reproduce openly.
  • Benchmarks by the same authors: two of the three headline benchmarks come from the paper itself. ConTEB is the independent check. The Q2D-Web post makes a similar in-distribution caveat about Perplexity traffic.
  • What counts as evidence is defined by the label pipeline. How well it agrees with human “needed to verify” judgments is not reported.
  • Index cost: a 9B contextual encoder at web scale is expensive. The 0.6B model trails on Context-bench (21.9 Answer@10).

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    The teacher gives a positive document's three chunks target probabilities p^T = (0.6, 0.3, 0.1) and zero to every chunk of the other documents in the batch. Student A puts (0.30, 0.15, 0.05) on those chunks and 0.5 on other documents; student B puts (0.3, 0.3, 0.3) on them and 0.1 elsewhere. Using KL(p^T ‖ p^S) = KL(p^T ‖ p̃^S) − log Σ_{c∈d} p^S(c), where p̃^S is the student renormalised over the positive document, compute both losses. Compare with a gold-chunk cross-entropy that treats chunk 1 as the only positive. What does each loss reward?

    What a strong answer covers
    • Student A: p̃^S = (0.6, 0.3, 0.1) = p^T, so the within-document term is 0, and the document term is −ln 0.5 ≈ 0.693. Total ≈ 0.693.
    • Student B: within-document KL = 0.6 ln 1.8 + 0.3 ln 0.9 + 0.1 ln 0.3 ≈ 0.201; document term −ln 0.9 ≈ 0.105. Total ≈ 0.306.
    • KL prefers B: it is right about the document but wrong about the order inside it. A has the right order but leaks half its mass to other documents.
    • Gold-chunk cross-entropy is −ln 0.3 ≈ 1.204 for both, so it cannot tell them apart. It also pushes chunks 2 and 3 down as negatives, although the teacher rates them as supporting.
    • This is why distillation alone keeps most document-level quality: the second term is already a document-level contrastive signal.
  2. Derive / compute

    A Q2D-Chunk-style query has two answer groups: A, with four accepted chunks on page P1, and B, with one accepted chunk on page P2. System X ranks the four A chunks at 1–4 and does not retrieve B. System Y ranks one A chunk at 1, the B chunk at 2, and irrelevant chunks below. Compute binary chunk nDCG@10 (all five chunks relevant), Answer@10, and α-nDCG@10 with α = 0.5 (answer groups weight 2, ideal ranking built greedily). Which system does each metric prefer?

    What a strong answer covers
    • Binary nDCG: IDCG = 1 + 0.631 + 0.5 + 0.431 + 0.387 ≈ 2.949. X: 2.562/2.949 ≈ 0.87. Y: 1.631/2.949 ≈ 0.55. nDCG prefers X.
    • Answer@10 (share of answer groups with at least one chunk in the top 10): X = 0.5, Y = 1.0.
    • α-nDCG gains for X: 2, 1, 0.5, 0.25 → α-DCG ≈ 2 + 0.631 + 0.25 + 0.108 ≈ 2.99. Y: 2, 2 → ≈ 3.26. Ideal (A, B, A, A, A) ≈ 4.07, so X ≈ 0.73 and Y ≈ 0.80.
    • nDCG rewards redundant hits on the same fact. Answer@10 and α-nDCG reward covering every part of the question, which is what a RAG reader needs.
  3. Mechanism

    The 9B training step chunks each positive document with a randomly sampled strategy, encodes it in one pass with separator tokens, scores chunks with the teacher's token-level relevance (mean of the top-k token scores per chunk), and scores documents for the contrastive term by max over chunks. Explain why each design choice is there, and what the max operator implies for the gradient.

    What a strong answer covers
    • Token-level teacher scores can be aggregated into any chunking at training time, so random chunk strategies need no new labels. That makes the student robust to the chunker used at inference.
    • Top-k mean rather than mean over all tokens: a long chunk with one answer-bearing sentence is not diluted by filler; rather than max over tokens, it is less sensitive to a single noisy token. k sets how much evidence a chunk needs to score high.
    • Separator tokens mark chunk boundaries inside one forward pass, so the encoder knows which span each embedding stands for while still seeing the whole document.
    • Max over chunks in the contrastive term: the gradient reaches only the best-matching chunk of each document, so the other chunks get no negative signal from it. Within-document ordering has to come from the distillation term.
  4. What if…

    Table 7 trains three 9B models that differ only in the objective (contrastive only, distillation only, both; w_dist = 1, w_con = 2) and compares them at step 687 of 1,600. Removing distillation costs 15.2 points on Q2D-Chunk and 14.6 on ConTEB. Interpret the three results, and say what this design can and cannot establish about the final released model.

    What a strong answer covers
    • Contrastive only learns document-level relevance via max over chunks but gives no within-document ranking, hence the large losses on chunk-level benchmarks.
    • Distillation only keeps most document-level quality because the batch-wide KL contains a document-level term; the contrastive term still adds on all three benchmarks.
    • Matched backbone, batch size, schedule and step make it a fair component comparison.
    • Limits: comparing at step 687 tests early training; the ranking could change by step 1,600. Run-to-run variance is not reported, so small differences between combined and distillation-only are hard to read.
  5. Critique

    Q2D-Chunk queries come from Perplexity's production search logs, the 9B training mixture includes PII-filtered production search logs, and the teacher was trained on LLM labels of vital, relevant and irrelevant sentences, while Q2D-Chunk's answer and evidence labels also come from LLM labelers. Critique what these overlaps could inflate, say which checks in the paper reduce the concern, and propose an outside check.

    What a strong answer covers
    • Distribution overlap: queries and pages from the same product traffic as part of the training data favour the authors' model over baselines trained elsewhere, even without exact leakage. The paper states that the training and test data are disjoint and from different dates.
    • Label-family overlap: the teacher learned LLM sentence judgments, and the benchmark rewards LLM-judged answer and evidence chunks. A student distilled from that teacher could match the labeler's notion of evidence rather than what humans need.
    • Mitigations: context-bench was run blind by turbopuffer and is kept private; ConTEB is an independent public benchmark on which the model, which saw no ConTEB data, still leads.
    • Outside check: retrain the recipe on public data only and evaluate on human-judged chunk sufficiency for a sample of Q2D-Chunk-style queries; see whether the margin over baselines holds.
  6. Research idea

    The recipe depends on Perplexity's in-house context compressor as the teacher. Design a study to find out whether an open, weaker teacher (for example a Provence-style compressor) gets most of the gain over gold-chunk training, and how the teacher's top-k and temperature τ^T matter.

    What a strong answer covers
    • Arms on the same backbone and data: gold-chunk InSeNT-style training; KL to an open teacher; KL to a stronger teacher (an LLM sentence labeler run offline on a subset) as an upper bound.
    • Sweeps: top-k from 1 (max) to large (near mean) and τ^T from sharp to flat, to map how much of the gain needs graded rather than near-one-hot targets.
    • Measure answer retrieval, evidence recall and α-nDCG on Q2D-Chunk-style or public evidence-labelled data, plus ConTEB, and the teacher's own agreement with human evidence labels.
    • Falsifier: if the open teacher is no better than gold-chunk training on evidence recall, the gain depends on teacher quality rather than on graded supervision as such.

Done with this page?

Status