Unfortunately, however, the cosine distance is not strictly metric but semimetric since the triangle inequality is not satisfied.
we cannot directly use the cosine distance because the triangle inequality is a key element for efficient indexing in a metric space.