The chunking step | in Retrieval-Augmented Generation | (RAG) involves breaking down
Bước chunking | trong Retrieval-Augmented Generation | (RAG) bao gồm việc chia nhỏ
large documents or | data sources into | smaller, manageable chunks. | This
các tài liệu lớn hoặc | các nguồn dữ liệu thành | các phần nhỏ, dễ quản lý. | Điều này
is done to | ensure that the | retriever can efficiently search
được thực hiện để | đảm bảo rằng | bộ truy xuất có thể tìm kiếm hiệu quả
through large volumes | of data while | staying within the token
thông qua các khối lượng | dữ liệu lớn trong khi | vẫn nằm trong giới hạn token
or input limits | of the model. | Each chunk, typically | a paragraph or section,
hoặc giới hạn đầu vào | của mô hình. | Mỗi phần, thường là | một đoạn văn hoặc phần,
is converted into | an embedding, and | these embeddings are stored
được chuyển đổi thành | một embedding, và | các embedding này được lưu trữ
in a vector | database. | When a | query is made, the
trong một cơ sở | dữ liệu vector. | Khi một | truy vấn được thực hiện, bộ
retriever searches for | the most relevant | chunks rather than the
truy xuất tìm kiếm | các phần liên quan nhất | thay vì toàn bộ
entire document, enabling | faster and more | accurate retrieval. |
tài liệu, cho phép | việc truy xuất nhanh hơn | và chính xác hơn. |
Resources
- Understanding LangChain’s RecursiveCharacterTextSplitter (article)
- Chunking Strategies for LLM Applications (article)
- A Guide to Chunking Strategies for Retrieval Augmented Generation (article)
References
- https://roadmap.sh/ai-engineer (Node: Chunking)