179 questions
No questions match those filters.
What's actually different between a bag-of-words repres...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansBag-of-words representations (like TF-IDF) encode a document as term counts or weighted term frequencies, with zero notion of meaning — “bank” the river and “bank” the financial institution look identical, and word order is thrown away entirely. It’s purely a matching mechanism, not a semantic one.
Static word embeddings (the word2vec/GloVe era) fixed the total blindness to meaning by learning one dense vector per word from co-occurrence patterns across a large corpus — similar words end up with similar vectors. But each word still gets exactly one vector no matter the context it appears in, so “bank” still has a single fixed representation whether it’s next to “river” or “loan.”
Contextual embeddings (transformer-based, the basis of modern sentence embedding models) produce a different vector for the same word depending on its surrounding sentence — “bank” near “river” and “bank” near “loan” get genuinely different representations, because the model actually encodes context, not just the word in isolation. That property is precisely what makes contextual embeddings usable for real semantic search: a query and a passage can match on meaning even when they share no words at all, something neither bag-of-words nor static embeddings can do.