NATURAL LANGUAGE PROCESSING · INTERVIEW QUESTION
What are hard negatives in retrieval?
🟢 beginner · NLP
Hint: Focus on the decision rule, assumptions, and failure mode behind nlp.
Answer
Hard negatives are incorrect items that look similar to the query. Training with them improves discrimination more than easy random negatives.
Interview reasoning
Hard negatives share plausible vocabulary or meaning with a query but are not relevant under the label policy. They teach distinctions random negatives rarely expose.
Semantic relevance requires a task-specific definition, not merely topic similarity. Create query-document judgments with realistic ambiguity and hard negatives, keeping documents and query families appropriately separated. A passage mentioning the same entity may fail to answer the query, so measure evidence sufficiency alongside ranking.
Worked example. A passage about disease B can be a hard negative for disease A treatment.
Validation
Review mined pairs and compare held-out near-miss retrieval.
Report recall/ranking by query type, audit false negatives and annotation agreement, and compare lexical and embedding baselines.
Common pitfalls
Unlabeled relevant documents are false negatives and can be pushed away incorrectly.
Click logs encode incumbent exposure and position. Random irrelevant negatives can make a retrieval benchmark unrealistically easy.
Likely follow-up: Review mined pairs and compare held-out near-miss retrieval.