သဘောတရား
Embeddings and vectors
Meaning turned into a list of numbers, so a computer can tell which texts are similar.
ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။
- 1You send text to an embedding model.
- 2It returns a vector.
- 3You store the vector so you can search by meaning later.
အဆင့်ဆင့်
- 1You send text to an embedding model.
- 2It returns a vector.
- 3You store the vector so you can search by meaning later.
Text goes in, a vector comes out, and the vector is kept for later searches.
dog and puppy
- Meaning
- Almost the same
- Vectors are
- Close together
refund and send back an order
- Meaning
- Same idea, other words
- Vectors are
- Close together
dog and invoice
- Meaning
- Unrelated
- Vectors are
- Far apart
| Pair of texts | Meaning | Vectors are |
|---|---|---|
| dog and puppy | Almost the same | Close together |
| refund and send back an order | Same idea, other words | Close together |
| dog and invoice | Unrelated | Far apart |
ဘာလဲ
An embedding is a way to store the meaning of text (or an image) as numbers. The list of numbers is called a vector. An embedding model reads the text and returns its vector. Texts with similar meaning get vectors that sit close together. Texts with different meaning sit far apart.
This lets a computer search by meaning instead of by exact words. A search for "send back my order" can find a page about refunds, even though no word matches. Embeddings are also the base of Retrieval Augmented Generation (RAG): documents are turned into vectors and stored, and the vectors closest to a question are fetched to help the model answer.
ဘာလဲ
Vectors are kept in a vector database or a vector store. Chunking decides which pieces of a document get their own vector.
မှတ်ထားရန်
- An embedding stores meaning as numbers. The list of numbers is a vector.
- Similar meaning means vectors that are close together.
- An embedding model makes the vectors. It is a different model from the one that writes answers.
- Embeddings power semantic search, which matches meaning and not exact words.
မှတ်ထားရန်
- RAG uses embeddings to find the text that is most relevant to a question.
စာမေးပွဲမှာ
- “Search by meaning, not by keyword” points to embeddings.
- “Numeric representation of text that captures meaning” points to an embedding or a vector.
- “Where do embeddings get stored for similarity search?” points to a vector database.
ဒါတွေနဲ့ မရောပါနဲ့
- ChunkingSplitting long documents into smaller pieces before they are turned into embeddings.
- Tokens and the context windowThe small pieces of text a model reads and writes, and the limit on how many fit in one request.
- Retrieval Augmented Generation (RAG)Look up facts first, add them to the prompt, then let the model answer from them.