Compute the cosine similarity of two vectors to measure how closely their directions agree. Common in text matching, recall and embedding comparison.
取值 −1 到 1,越接近 1 越相似。