သဘောတရား
Chunking
Splitting long documents into smaller pieces before they are turned into embeddings.
ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။
- 1Documents are split into chunks.
- 2Each chunk goes to an embedding model.
- 3The vectors are stored for search.
အဆင့်ဆင့်
- 1Documents are split into chunks.
- 2Each chunk goes to an embedding model.
- 3The vectors are stored for search.
Chunking sits between your documents and the embedding model.
Match to a question
- Small chunks
- Precise
- Large chunks
- Less sharp
Surrounding context
- Small chunks
- Can be lost
- Large chunks
- Kept
Tokens in the prompt
- Small chunks
- Fewer per chunk
- Large chunks
- More per chunk
| Compare | Small chunks | Large chunks |
|---|---|---|
| Match to a question | Precise | Less sharp |
| Surrounding context | Can be lost | Kept |
| Tokens in the prompt | Fewer per chunk | More per chunk |
ဘာလဲ
Chunking means cutting a document into smaller pieces called chunks. Each chunk gets its own embedding. When someone asks a question, the system fetches only the few chunks that match, not the whole document.
Chunks are needed because embedding models and context windows have limits, and because one vector for a whole book would blur many topics into one. A small chunk about one topic matches a question more precisely.
ဘာလဲ
Chunk size is a tradeoff. Small chunks match precisely but may lose the surrounding context. Large chunks keep context but match less sharply, and they use more tokens in the prompt. Many teams let chunks overlap a little so a sentence is not cut in half.
မှတ်ထားရန်
- A chunk is one piece of a split document. Each chunk gets its own embedding.
- Chunking comes before embedding in a RAG pipeline.
- Small chunks: precise matches, less context.
- Large chunks: more context, vaguer matches, more tokens per prompt.
- Overlap between chunks stops ideas being cut at the edge.
စာမေးပွဲမှာ
- “Break long documents into smaller pieces before creating embeddings” points to chunking.
- “Chunks that are too large” points to vague matches and higher token use.
- “Chunks that are too small” points to lost context.
ဒါတွေနဲ့ မရောပါနဲ့
- Embeddings and vectorsMeaning turned into a list of numbers, so a computer can tell which texts are similar.
- 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.