@whyshouldaicareone AI disaster a day, and the fix

Embeddings, with code you can run

An embedding turns text into a point on a map of meaning. Close points mean similar meaning.

Try it (Python)

copy and paste
pip install sentence-transformers

from sentence_transformers import SentenceTransformer, util
m = SentenceTransformer("all-MiniLM-L6-v2")
a, b, c = m.encode(["refund", "money back", "cat"])
print(util.cos_sim(a, b), util.cos_sim(a, c))

What it's for

Search that understands typos and synonyms, duplicate detection, RAG (finding the right page before the model answers).

Follow @whyshouldaicare

A new disaster and its fix every day. Comment the word under a reel to get its guide.