AI dictionary · LLMs and GenAI

What is Cosine similarity?Cosine similarity kya hai?

Cosine similarity: A measure of how similar two vectors point, used to compare the meaning of embeddings.Do vectors ki direction kitni milti hai uska naap, embeddings ka matlab compare karne mein use hota hai.

🧸 Think of it likeAise samjho

Like checking if two people are pointing in the same direction: it doesn't matter how long their arms are, only where they point.Jaise check karna ki do log ek hi disha mein ishaara kar rahe hain ya nahi: haath kitna lamba hai farak nahi padta, sirf disha.

📘 ExplainedVistaar se

It's the cosine of the angle between two vectors: 1 means same direction (very similar meaning), 0 unrelated. Vector databases use it (or the closely related dot product) to find the chunks closest in meaning to a question.Yeh do vectors ke beech ke angle ka cosine hai: 1 matlab same direction (bahut milta julta matlab), 0 matlab koi rishta nahi. Vector databases ise (ya jude hue dot product ko) use karke sawaal ke matlab ke sabse paas ke chunks dhoondhte hain.

💡 Real exampleAsli example

'reset my password' and 'forgot login' have high cosine similarity.'reset my password' aur 'forgot login' ki cosine similarity zyaada hai.

📖 Learn it step by stepStep by step seekho

🔗 Related termsJude hue shabd

Questions people ask

What is Cosine similarity?

A measure of how similar two vectors point, used to compare the meaning of embeddings. It's the cosine of the angle between two vectors: 1 means same direction (very similar meaning), 0 unrelated. Vector databases use it (or the closely related dot product) to find the chunks closest in meaning to a question.

How can I understand Cosine similarity in simple words?

Like checking if two people are pointing in the same direction: it doesn't matter how long their arms are, only where they point.

What is an example of Cosine similarity?

'reset my password' and 'forgot login' have high cosine similarity.

Cosine similarity ka matlab kya hai?

Do vectors ki direction kitni milti hai uska naap, embeddings ka matlab compare karne mein use hota hai. Jaise check karna ki do log ek hi disha mein ishaara kar rahe hain ya nahi: haath kitna lamba hai farak nahi padta, sirf disha.

See Cosine similarity in the full A to Z dictionary · Start a free AI course