Cosine similarity compares vectors by their angular alignment, making it useful for finding semantically related document chunks without emphasizing embedding magnitude. section 12.2.4
In production retrieval, FAISS can use cosine similarity alongside L2 distance and inner product. Choose retrieval count and thresholds carefully: too few results reduce coverage, while too many add noise. section 12.2.4













