๐๐ผ๐ฟ ๐ฎ ๐ฅ๐๐ ๐ฝ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ, ๐ฑ๐ผ ๐๐ผ๐ ๐ฐ๐ต๐๐ป๐ธ ๐ณ๐ถ๐ฟ๐๐ ๐ผ๐ฟ ๐ฒ๐บ๐ฏ๐ฒ๐ฑ ๐ณ๐ถ๐ฟ๐๐? The...

TL;DR ยท AI ๆ่ฆ
Milvus on X: "๐๐ผ๐ฟ ๐ฎ ๐ฅ๐๐ ๐ฝ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ, ๐ฑ๐ผ ๐๐ผ๐ ๐ฐ๐ต๐๐ป๐ธ ๐ณ๐ถ๐ฟ๐๐ ๐ผ๐ฟ ๐ฒ๐บ๐ฏ๐ฒ๐ฑ ๐ณ๐ถ๐ฟ๐๐? The standard RAG pipeline chunks documents before e...
ๆ ธๅฟ่ฆ็น
- ไธป้ข่็ฆ๏ผ๐๐ผ๐ฟ ๐ฎ ๐ฅ๐๐ ๐ฝ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ, ๐ฑ๐ผ ๐๐ผ๐ ๐ฐ๐ต๐๐ป๐ธ ๐ณ๐ถ๐ฟ๐๐ ๐ผ๐ฟ ๐ฒ๐บ๐ฏ๐ฒ๐ฑ
- ๆฅๆบ๏ผMilvus(@milvusio)๏ผๅปบ่ฎฎ็ปๅๅๆๅคๆญ็ป่ใ
- AI ๅๆๆไธๅฏ็จ๏ผๆฌๆกไธบไฟๅบ่ฏๅไธๆ่ฆใ
Milvus on X: "๐๐ผ๐ฟ ๐ฎ ๐ฅ๐๐ ๐ฝ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ, ๐ฑ๐ผ ๐๐ผ๐ ๐ฐ๐ต๐๐ป๐ธ ๐ณ๐ถ๐ฟ๐๐ ๐ผ๐ฟ ๐ฒ๐บ๐ฏ๐ฒ๐ฑ ๐ณ๐ถ๐ฟ๐๐? The standard RAG pipeline chunks documents before embedding them. ๐ ๐ฑ๐ถ๐ณ๐ณ๐ฒ๐ฟ๐ฒ๐ป๐ ๐ฝ๐ฎ๐๐๐ฒ๐ฟ๐ป ๐ถ๐ ๐๐๐ฎ๐ฟ๐๐ถ๐ป๐ด ๐๐ผ ๐๐ต๐ผ๐ ๐๐ฝ: ๐ฒ๐บ๐ฏ๐ฒ๐ฑ ๐ฎ๐น๐น ๐๐ฒ๐ป๐๐ฒ๐ป๐ฐ๐ฒ๐ https://t.co/1Nqv9TyaGN" / X
Milvus
@milvusio
๐๐ผ๐ฟ ๐ฎ ๐ฅ๐๐ ๐ฝ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ, ๐ฑ๐ผ ๐๐ผ๐ ๐ฐ๐ต๐๐ป๐ธ ๐ณ๐ถ๐ฟ๐๐ ๐ผ๐ฟ ๐ฒ๐บ๐ฏ๐ฒ๐ฑ ๐ณ๐ถ๐ฟ๐๐? The standard RAG pipeline chunks documents before embedding them. ๐ ๐ฑ๐ถ๐ณ๐ณ๐ฒ๐ฟ๐ฒ๐ป๐ ๐ฝ๐ฎ๐๐๐ฒ๐ฟ๐ป ๐ถ๐ ๐๐๐ฎ๐ฟ๐๐ถ๐ป๐ด ๐๐ผ ๐๐ต๐ผ๐ ๐๐ฝ: ๐ฒ๐บ๐ฏ๐ฒ๐ฑ ๐ฎ๐น๐น ๐๐ฒ๐ป๐๐ฒ๐ป๐ฐ๐ฒ๐ ๐ณ๐ถ๐ฟ๐๐, ๐๐ต๐ฒ๐ป ๐๐๐ฒ ๐๐ต๐ฒ๐ถ๐ฟ ๐๐ฒ๐บ๐ฎ๐ป๐๐ถ๐ฐ ๐๐ถ๐บ๐ถ๐น๐ฎ๐ฟ๐ถ๐๐ ๐๐ผ ๐ฑ๐ฒ๐ฐ๐ถ๐ฑ๐ฒ ๐๐ต๐ฒ๐ฟ๐ฒ ๐๐ผ ๐ฐ๐ต๐๐ป๐ธ. Max-Min Semantic Chunking is one example. ๐ช๐ต๐ ๐ฒ๐บ๐ฏ๐ฒ๐ฑ ๐ณ๐ถ๐ฟ๐๐? Because the standard RAG pipeline chunks documents before embedding them, which means boundaries are usually drawn without embedding-based similarity signals. Embedding all sentences upfront gives the algorithm similarity data to work with, so boundaries can follow actual shifts in meaning. ๐๐ป ๐บ๐ฎ๐ป๐ ๐ฅ๐๐ ๐ฝ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ๐, ๐ฐ๐ต๐๐ป๐ธ๐ถ๐ป๐ด ๐ต๐ฎ๐ฝ๐ฝ๐ฒ๐ป๐ ๐ฏ๐ฒ๐ณ๐ผ๐ฟ๐ฒ ๐ฒ๐บ๐ฏ๐ฒ๐ฑ๐ฑ๐ถ๐ป๐ด, ๐ฎ๐ป๐ฑ ๐ฐ๐ต๐๐ป๐ธ ๐พ๐๐ฎ๐น๐ถ๐๐ ๐๐๐ฟ๐ผ๐ป๐ด๐น๐ ๐ฎ๐ณ๐ณ๐ฒ๐ฐ๐๐ ๐ฟ๐ฒ๐๐ฟ๐ถ๐ฒ๐๐ฎ๐น ๐พ๐๐ฎ๐น๐ถ๐๐. The conventional sequence runs: chunk โ embed โ index in a vector database like Milvus โ retrieve โ generate. But at the chunking step, fixed-length and recursive splitting do not fully remove the tradeoff. Smaller chunks tend to improve precision but can lose context. Larger chunks preserve more context but can introduce noise. ๐ ๐ฎ๐ -๐ ๐ถ๐ป ๐ฆ๐ฒ๐บ๐ฎ๐ป๐๐ถ๐ฐ ๐๐ต๐๐ป๐ธ๐ถ๐ป๐ด ๐ถ๐ ๐ผ๐ป๐ฒ ๐บ๐ฒ๐๐ต๐ผ๐ฑ ๐ด๐ฎ๐ถ๐ป๐ถ๐ป๐ด ๐๐ฟ๐ฎ๐ฐ๐๐ถ๐ผ๐ป ๐๐ถ๐๐ต ๐๐ต๐ฒ ๐ฒ๐บ๐ฏ๐ฒ๐ฑ-๐ณ๐ถ๐ฟ๐๐ ๐ฎ๐ฝ๐ฝ๐ฟ๐ผ๐ฎ๐ฐ๐ต. It treats chunking as a sequential clustering problem: walk through the document in order, decide at each sentence whether it joins the current chunk or starts a new one. ๐ฆ๐ฒ๐ป๐๐ฒ๐ป๐ฐ๐ฒ๐ ๐บ๐๐๐ ๐๐๐ฎ๐ ๐ฐ๐ผ๐ป๐๐ฒ๐ฐ๐๐๐ถ๐๐ฒ, ๐ฎ๐ป๐ฑ ๐๐ต๐ฒ ๐ฎ๐น๐ด๐ผ๐ฟ๐ถ๐๐ต๐บ ๐ป๐ฒ๐๐ฒ๐ฟ ๐ฟ๐ฒ๐ฎ๐ฟ๐ฟ๐ฎ๐ป๐ด๐ฒ๐ ๐๐ฒ๐ ๐. ๐๐ฒ๐ฟ๐ฒ'๐ ๐ต๐ผ๐ ๐ถ๐ ๐๐ผ๐ฟ๐ธ๐, ๐๐๐ฒ๐ฝ ๐ฏ๐ ๐๐๐ฒ๐ฝ: โข ๐๐บ๐ฏ๐ฒ๐ฑ ๐๐ต๐ฒ ๐๐ฒ๐ป๐๐ฒ๐ป๐ฐ๐ฒ๐ ๐ณ๐ถ๐ฟ๐๐: A text embedding model maps all sentences to high-dimensional space. Suppose the first nโk sentences have been assigned to the current chunk C. The decision now is whether sentence nโk+1 joins C or starts a new chunk. โข ๐๐ผ๐บ๐ฝ๐๐๐ฒ ๐บ๐ถ๐ป๐ถ๐บ๐๐บ ๐๐ถ๐บ๐ถ๐น๐ฎ๐ฟ๐ถ๐๐ ๐๐ถ๐๐ต๐ถ๐ป ๐๐ต๐ฒ ๐ฐ๐ต๐๐ป๐ธ: Calculate the minimum pairwise cosine similarity among all sentence vectors in C. This identifies the most semantically dissimilar pair, measuring how tightly the group holds together, and sets the bar for whether the new sentence belongs. โข ๐๐ผ๐บ๐ฝ๐๐๐ฒ ๐บ๐ฎ๐ ๐ถ๐บ๐๐บ ๐๐ถ๐บ๐ถ๐น๐ฎ๐ฟ๐ถ๐๐ ๐๐ผ ๐๐ต๐ฒ ๐ป๐ฒ๐ ๐๐ฒ๐ป๐๐ฒ๐ป๐ฐ๐ฒ: Calculate the maximum cosine similarity between the new sentence and every sentence in C. This captures the strongest connection the incoming sentence has to the existing group. โข ๐ง๐ต๐ฒ ๐ฑ๐ฒ๐ฐ๐ถ๐๐ถ๐ผ๐ป ๐ฟ๐๐น๐ฒ: If the new sentence's strongest connection to the chunk beats the chunk's weakest internal link, it joins. Otherwise, a new chunk begins. โข ๐จ๐๐ฒ ๐๐ถ๐๐ฒ ๐น๐ถ๐บ๐ถ๐๐ ๐ฎ๐ป๐ฑ ๐๐ถ๐บ๐ถ๐น๐ฎ๐ฟ๐ถ๐๐ ๐๐ต๐ฟ๐ฒ๐๐ต๐ผ๐น๐ฑ๐ ๐๐ผ ๐ธ๐ฒ๐ฒ๐ฝ ๐ฐ๐ต๐๐ป๐ธ๐ ๐ณ๐ฟ๐ผ๐บ ๐ด๐ฟ๐ผ๐๐ถ๐ป๐ด ๐๐ผ๐ผ ๐น๐ผ๐ผ๐๐ฒ: To control intra-chunk coherence, dynamically adjust chunk size limits and similarity thresholds. โข ๐๐ป๐ถ๐๐ถ๐ฎ๐น๐ถ๐๐ฎ๐๐ถ๐ผ๐ป: When the chunk has only one sentence, there's no internal minimum to compute. Compare the similarity between the first and second sentence against a preset threshold constant. Above it, they chunk together. Below it, they split. ๐ ๐ฎ๐ -๐ ๐ถ๐ป ๐ต๐ฎ๐ ๐ถ๐๐ ๐๐ฟ๐ฎ๐ฑ๐ฒ๐ผ๐ณ๐ณ: because it clusters sequentially and locally, it can miss long-range context dependencies in long documents. Important information spread across distant sections may end up in separate chunks. Full walkthrough with code:
milvus.io/blog/embeddingโฆ
3:30 PM ยท Jul 9, 2026
255
Views
1
2