TF-IDF weighting — formula and rationale.
easyAnswer
- TF: term frequency in document (raw, log, or sublinear).
- IDF: — downweights common words appearing in many documents.
- Product TF-IDF highlights terms specific to a document.
- Uses: bag-of-words features, BM25 (probabilistic IDF variant, dominant in classical IR).
- Modern hybrid: BM25 + dense embeddings for retrieval → Elasticsearch does this natively (kNN + BM25 rrf).
Check yourself — multiple choice
- Random
- TF × IDF with IDF = log(N/df); downweights common terms; foundation of BM25 + still core of hybrid BM25 + dense retrieval
- Same as bag-of-words
- Not real
TF-IDF: term × ; foundation of BM25 and hybrid retrieval.
#nlp#text
Practise Unsupervised Learning
214 interview questions in this topic.