All jobs / Data science / ML / AI / NLP

Data science / ML / AI interview question · 1–3 years

Before transformers, why did people use recurrent networks for text instead of a bag-of-words model, and what was their weakness?

The strongest answer

Bag-of-words discards order, so “not good” looks like “good”; an RNN reads tokens in order and carries a state — but that state fades over long spans and training cannot run in parallel across the sequence

Why it works

Right — order and state were the win; fading long-range memory and sequential training were the price transformers removed.

What a good answer covers

Answers that fall short

Who gets asked this

More NLP questions