AI engineering glossary · NLP embeddings

What is hard negative mining?

Hard negative mining (also called Hard negatives): Choosing negative examples that look similar to the positive but are wrong, instead of random ones. These challenging cases force the model to learn finer distinctions and usually improve embedding quality.

Level: advancedTopic: NLP embeddings

Hard negative mining: an example

For the question "capital of Karnataka", a passage about Karnataka's population is a hard negative, unlike a random passage about cricket.

Related terms

More NLP embeddings terms

Where you learn it

Hard negative mining is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.