cosine similarity
Applied AI interview questions tagged cosine similarity, across every topic.
2 questions · 1 unlocked for you
Concepts behind "cosine similarity"
The curriculum that explains the ideas these questions test.
Foundational
EmbeddingsAn embedding maps text (or an image) to a dense vector so that semantic similarity becomes geometric closeness, similar meanings land near each other, measured by cosine similarity. Embeddings power semantic search, retrieval, clustering, recommendation, and the vector index behind RAG. Applied-AI interviews probe them because they are the bridge between unstructured content and everything you can compute over it, and because their failure modes (domain mismatch, drift, the wrong similarity metric) quietly degrade retrieval.🧠 Foundations of LLMs & GenAI
Core
Vector Search and ANN IndexesVector search finds the embeddings nearest to a query vector. Exact nearest-neighbor is O(n) per query and does not scale, so production uses Approximate Nearest Neighbor (ANN) indexes (HNSW, IVF, product quantization) that trade a little recall for massive speedups. The real-world challenges are the recall-vs-latency-vs-memory trade-off, metadata filtering, and handling updates. Applied-AI interviews probe it because it is the engine under RAG and semantic search, and its tuning directly sets retrieval quality and cost.🤖 Retrieval & AgentsSign in
