juniorNLP

What is TF-IDF?

Updated May 17, 2026

Short answer

TF-IDF measures word importance based on frequency in a document and rarity across documents.

Deep explanation

TF-IDF combines term frequency and inverse document frequency to highlight important words while down-weighting common ones.

Real-world example

Search engines rank documents using TF-IDF scores.

Common mistakes

  • Assuming TF-IDF captures semantics.

Follow-up questions

  • What is IDF?
  • When is TF-IDF insufficient?

More NLP interview questions

View all →