GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
arXiv preprint

Context is Gold to find the Gold Passage: Evaluating and Training Contextual Document Embeddings

ConTEB and InSeNT show why a passage needs its document context, and why training must still distinguish neighboring passages that answer different questions.

Breakdown by FDE Interviews · 9 min read · Updated

About the original · 2025
AUTHORS
Conti, Faysse, Viaud, Bosselut, Hudelot, Colombo
FROM
Illuin Technology, Equall.ai, CentraleSupélec, EPFL
PUBLISHED
May 2025 · arXiv preprint
IN THIS BREAKDOWN · 10 SECTIONS

You can read 17% of this breakdown.

01

The paper in one minute

A passage can be meaningful to a reader while looking incomplete to an embedding model. A pronoun may refer to an entity named earlier. A short policy clause may depend on a heading. If the system embeds each passage independently, it discards those relationships before retrieval begins.

This paper introduces ConTEB, a benchmark designed to expose that problem, and InSeNT, a post-training method for contextual embeddings. InSeNT combines late chunking with two contrastive objectives. One helps identify the correct document; the other helps distinguish the correct passage from nearby passages in that document.

Late chunking first encodes a document together, then pools the token representations belonging to each chunk. Context can therefore influence a chunk vector without being copied into its displayed text. InSeNT adds training pressure to preserve both that contextual information and the chunk's specific meaning.

The June 2025 revision reports substantial contextual-retrieval gains. It also contains regressions on some individual tasks and on a non-contextual benchmark. The official project provides the benchmark, models and training artifacts. Its strongest practical lesson is to evaluate contextual and self-contained queries separately rather than treating one embedding score as complete evidence.

THE IDEA, VISUALLY
THE RIGHT DOCUMENT CAN STILL CONTAIN THE WRONG PASSAGE Synthetic query: how long is the Acme support response window? Encode the Acme document together Title and neighboring context inform each chunk Encode another document Different customer policy Response: four hours Correct passage Retention: thirty days Same document; wrong passage Response: one day Other-document negative In-sequence loss distinguishes the two Acme clauses. In-batch loss distinguishes the relevant document from other documents. Original teaching example. Context propagation must preserve passage specificity and permission boundaries.
Our support-policy example separates two retrieval problems: identifying the right document and locating the right clause within it. InSeNT trains with both same-document and other-document alternatives.
Research notes: the problem, approach and results
61.0 → 75.6

ModernBERT late chunking → InSeNT average nDCG@10, Table 2

63.2 → 60.4

ModernBERT baseline → InSeNT NanoBEIR, Table 2

0.1

selected in-sequence loss weight, section 5

THE PROBLEM

Independent chunk embeddings lose document context, while contextual encoding can blur the distinctions between neighboring chunks.

THE IDEA

Combine late chunking with separate contrastive terms for same-document and other-document alternatives.

THE RESULT

InSeNT improves the contextual benchmark substantially, with task-specific regressions that still require a customer-level evaluation.

02

Why it matters to an FDE

Many enterprise corpora repeat a template across customers, years or products. A clause saying “coverage lasts twelve months” may be useful only when paired with the correct contract header. Another clause in that same contract may discuss a completely different obligation.

These are two distinct errors: confusing similar documents and confusing passages within the right document. Better context propagation may help the first while making the second harder if all chunk vectors become too similar. The paper gives a training objective and benchmark design for examining both.

Use chunking strategies to define meaningful boundaries and RAG evaluation to label the actual answer-bearing passages. Contextual embeddings become worth testing when a reviewed failure set shows that missing document context, rather than absent source data or incorrect permissions, is the retrieval bottleneck.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 199 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>2 runnable code blocks
  • ▦3 results tables
  1. 03Key takeaways

    Six practical lessons about contextual encoding, negative examples and benchmark scope

    Free account
  2. 04How it works

    Follow document encoding into two complementary contrastive objectives

    Premium
  3. 05The numbers that matter

    Read the contextual gains alongside the regressions and indexing-time definition

    Premium
  4. 06Try it yourself

    Show why other-document negatives cannot detect the wrong clause in the right document

    Premium
  5. 07Where it breaks

    Watch for context noise, false negatives, document boundaries and overgeneralized averages

    Premium
  6. 08Using it on a deployment

    Compare contextual retrieval on template-heavy documents with a controlled migration plan

    Premium
  7. 09Interview angles

    Explain the two failure modes without claiming that more context always helps

    Premium
Back to the paper library →