1.
Which Python library provides the SentenceTransformer class used in this post?
Select the correct answer.
The SentenceTransformer class comes from the sentence-transformers library. The import is: from sentence_transformers import SentenceTransformer. It is built on top of the HuggingFace transformers library.
2.
Which of the following best describes the difference between keyword search and semantic search?
Select the correct answer.
Keyword search (BM25, TF-IDF) matches documents containing the exact words in the query. Semantic search uses embedding vectors and similarity metrics (cosine, dot product, Euclidean) to match based on meaning — so 'how to lose weight fast' matches 'quick fat loss strategies' even though no words overlap.
3.
Which statement correctly compares One-Hot Encoding and modern transformer-based embeddings?
Select the correct answer.
One-Hot Encoding produces a sparse vector (one 1, rest are 0s) the size of the full vocabulary. It treats every word as equally different from every other word — no semantic relationships. Transformer-based embeddings produce dense, lower-dimensional vectors that cluster semantically similar words near each other in vector space.