Skip to main content
Challenges Cosine similarity between embeddings
Artificial Intelligence Easy Embedding and similarity Solves: 7

Cosine similarity between embeddings

Author: CyberSamSU
Points
15

Embedding is the conversion of a word, sentence, or image into a vector of numbers. The most commonly used method to measure how "similar" two embeddings are is cosine similarity: the cosine of the angle between the vectors (independent of their lengths, depending only on their direction).

cos(u, v) = (u . v) / (||u|| * ||v||)
u . v      = u1*v1 + u2*v2 + ... (skalyar ko'paytma)
||u||      = sqrt(u1^2 + u2^2 + ...)  (Yevklid uzunligi)

Two embedding vectors are given:

u = [0, 3, 5, 5]
v = [4, 5, 2, -4]

Find the cosine similarity between these two vectors.

Answer: only the number, without other characters (for example 0.1234 or -3).

Enter with 4 decimal places of precision (for example -0.1234 or 0.9876).

Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −1 pts Log in
Hint 2 −3 pts Log in
Hint 3 −4 pts Log in
To submit a flag, log in.

First solvers

1. Лазиз 04.10.2026
2. 11111tttt 09.10.2026
3. Абдул 09.10.2026
4. Mirjaxon Qaxxarov 26.10.2026
5. Odam 05.11.2026
6. Doston Allayarov 12.11.2026
7. AGENT X 28.11.2026