This question evaluates understanding of vector-space similarity and text representation by asking for a cosine similarity computation over string-derived vectors, testing coding and algorithmic skills relevant to data science and text processing.
Technical phone screen in Python; assess ability to implement similarity metric.
Implement a Python function that computes the cosine similarity between two strings (treat each string as a bag-of-words vector).
Tokenize, count word frequencies, form vectors, dot product divided by magnitudes; handle empty inputs.