ConTra: Context That Travels A Training Framework for Effective Contextual Retrieval via Prefix Generation
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.
| Collection | Domain | Queries | Docs | Chunks |
|---|---|---|---|---|
| Natural Questions | Web search | 5,499 | 5,181 | 99,096 |
| TechQA | Technical support | 149 | 139 | 1,036 |
| FairytaleQA | Story comprehension | 1,007 | 23 | 342 |
| QMSum | Meetings | 244 | 35 | 2,140 |
| FinanceBench | Financial analysis | 146 | 84 | 45,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.
| Method | ConTEB | RealContextBench |
|---|---|---|
| Qwen3-Embedding-4B · original text | 0.6483 | 0.6373 |
| InSeNT | 0.6381 | 0.5291 |
| PPLX-context-0.6B | 0.7110 | 0.6083 |
| PPLX-context-4B | 0.7310 | 0.6542 |
| Voyage-context-3 | 0.7292 | 0.6636 |
| Voyage-context-4 | 0.7300 | 0.6608 |
| Qwen3.5-0.8B | 0.6531 | 0.6384 |
| Qwen3.5-2B | 0.7585 | 0.6456 |
| Qwen3.5-4B | 0.8110 | 0.6553 |
| Qwen3.5-9B | 0.8279 | 0.6632 |
| ConTra-0.8B | 0.7346 | 0.6471 |
| ConTra-2B | 0.8525 | 0.6692 |
| ConTra-4B | 0.8465 | 0.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.