
Explanation:
Cosine Similarity is the correct answer because:
Vector-based similarity search: When both queries and documents are converted into vectors (embeddings), cosine similarity is commonly used to measure the similarity between these vectors.
How it works: Cosine similarity measures the cosine of the angle between two vectors in a multi-dimensional space. It ranges from -1 to 1, where:
Advantages for text similarity:
Why not the other options:
Real-world application: This scenario describes a typical semantic search or vector similarity search system, which is commonly implemented using cosine similarity with vector embeddings from models like BERT, Word2Vec, or other transformer-based models.
Key takeaway: When working with vector representations of text (embeddings), cosine similarity is the standard metric for measuring semantic similarity and finding the closest matches in vector space.
Ultimate access to all questions.
A university uses an AI model to find research papers related to a student's query. The model converts the query and all papers into vectors, then finds the closest match. Which algorithm is used for this similarity search?
A
Decision Trees
B
Cosine Similarity
C
Random Forest
D
Token Merging
No comments yet.