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)
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).
A new disaster and its fix every day. Comment the word under a reel to get its guide.