﻿# DPR training data: positive passages, hard negatives and candidate provenance

Understand DPR question-context records, positive and hard-negative roles, corpus identifiers and the difference between retrieval recall and answer generation.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/data-guide-dpr-positive-hard-negative-context/
Language: en

Dense Passage Retrieval, or DPR, provides a dual-encoder approach and associated question-context resources for open-domain answering. Its training records distinguish positive passages, ordinary negatives and hard negatives. That structure is useful when building a retriever, but it should be preserved as training provenance rather than flattened into an unexplained list of unrelated text pairs.

## Keep each context's role

A positive passage supplies the intended evidence relationship for the question. A hard negative is a challenging alternative selected by a mining procedure. Preserve the role and source of each context when exporting examples. Otherwise a later trainer cannot tell whether a confusing candidate was deliberately mined or merely added by a local conversion script.

## Retain passage identity and title

Question-context resources can include passage identifiers, text and titles. Keep those fields distinct when mapping them into a corpus index. A title may help identify the entity discussed, while the passage text carries the evidence. A matching text snippet is insufficient to establish that two artifacts use the same corpus snapshot or segmentation rule.

## Inspect negative ambiguity

For an illustrative question about an entity's birthplace, a mined alternative might mention the answer incidentally or describe a similarly named person. Review ambiguous examples before treating every selected negative as a timeless semantic fact. The mining label describes the training construction; false negatives and entity confusion require their own checks in a new task.

## Separate retriever and reader scores

Retrieving a passage containing an accepted answer is different from producing the correct final answer. Evaluate retrieval coverage and the downstream reader separately. Record candidate depth, corpus revision and answer-matching rule. Otherwise a stronger reader or changed answer normalization can be mistaken for a better dual encoder.

## Use the archived implementation deliberately

The original DPR repository is archived and read-only. It remains primary evidence for data layout and the original experiments, but does not promise maintenance for a new software stack. Pin resources, inspect the actual loader and test a small conversion against known question-context records. DPR data are useful for studying learned retrieval when role labels, mining history and corpus identity remain traceable through training and evaluation.

## Primary references

[DPR original paper](https://arxiv.org/abs/2004.04906).

[DPR author repository](https://github.com/facebookresearch/DPR).

[DPR biencoder data loader](https://github.com/facebookresearch/DPR/blob/main/dpr/data/biencoder_data.py).

Related explanations: [evaluating retrieval embeddings](/journal/embeddings-russian-retrieval/); [the limits of negative labels](/journal/beir-qrels-unjudged-retrieval-evaluation/).
