ConTra

ConTra: Context That Travels A Training Framework for Effective Contextual Retrieval via Prefix Generation

The same context prefix travels with a chunk through writing, retrieval, and reranking.
85.25ConTEB ConTra-2B · reranked nDCG@10 × 100
66.92RealContextBench ConTra-2B · reranked nDCG@10 × 100
7.74×Faster indexing ConTra-2B vs. prompted 9B · short documents · H100 80GB

Method

ConTra uses reinforcement learning (RL) to train Qwen3.5 models to write compact, source-supported context prefixes. At indexing time, the model reads the target chunk and its surroundings. Its prefix travels with the chunk through embedding retrieval and reranking, and is reused across queries.

RealContextBench

Five application collections naturally mix self-contained and context-dependent passages. Each collection has a shared retrieval corpus with targets mapped from human-annotated answers or evidence.

Sizes of RealContextBench application collections
CollectionDomainQueriesDocsChunks
Natural QuestionsWeb search5,4995,18199,096
TechQATechnical support1491391,036
FairytaleQAStory comprehension1,00723342
QMSumMeetings244352,140
FinanceBenchFinancial analysis1468445,049

NanoBEIR context conditions

Across 13 tasks, queries, targets, and relevance annotations stay fixed.

Original
Target chunk alone
Random
Four randomly sampled passages
Topical
Four generated passages on the topic, about unrelated subjects or events

Retrieval results

Macro-averaged nDCG@10 after top-15 reranking with Qwen3-Reranker-4B.

Macro-averaged results after reranking
MethodConTEBRealContextBench
Qwen3-Embedding-4B · original text0.64830.6373
InSeNT0.63810.5291
PPLX-context-0.6B0.71100.6083
PPLX-context-4B0.73100.6542
Voyage-context-30.72920.6636
Voyage-context-40.73000.6608
Qwen3.5-0.8B0.65310.6384
Qwen3.5-2B0.75850.6456
Qwen3.5-4B0.81100.6553
Qwen3.5-9B0.82790.6632
ConTra-0.8B0.73460.6471
ConTra-2B0.85250.6692
ConTra-4B0.84650.6669

ConTEB averages eight tasks. RealContextBench averages five application collections and three NanoBEIR conditions. Contextual encoders supply original chunks to the reranker. Prefix-based pipelines supply the prefix and original chunk.

Enlarged comparison of prefix-based and contextual-encoder retrieval pipelines.