Compare chunking strategies
Chunk the same text with all eight strategies and read count, mean, deviation and time.
Eight interactive labs: text chunking, embeddings, semantic search, vector databases, the RAG pipeline, advanced retrieval, chat with your documents and evaluation, plus an assistant builder for your own documents and experiments that run in the browser.
Compare eight chunking strategies on a real text: size, overlap, sentence and heading boundaries, and their effect on retrieval, with special handling of Arabic text.
Chunk the same text with all eight strategies and read count, mean, deviation and time.
See each chunk's boundaries, heading and length on the text.
Measure Hit@k and MRR at five sizes over the built-in question set.
Count sentences split across two chunks at different overlap values.
Normalisation, light stemming and tokens while keeping the original text for citations.
Chunk size trades context against precision: a small chunk matches the question closely but loses its surroundings, a large one keeps context but mixes topics and dilutes the signal.
Read the lessonOverlap repeats the end of one chunk at the start of the next so that a sentence or fact is not cut at the boundary.
Read the lessonFixed cuts by character count, recursive tries separators in order (paragraph, line, sentence, word), structural respects headings, and semantic cuts where the topic changes according to the similarity of neighbouring sentences.
Read the lesson| Algorithm / concept | Lab | Nature | Complexity | Note |
|---|---|---|---|---|
| Fixed-size chunking | Text Chunking Lab | Real local execution | O(n) | Cuts every N characters with optional overlap, ignoring sentences. |
| Recursive chunking | Text Chunking Lab | Real local execution | O(n) | Tries graded separators (paragraph, line, sentence, word) until the size fits. |
| Sentence chunking | Text Chunking Lab | Real local execution | O(n) | Groups whole sentences up to the maximum size. |
| Structure-aware chunking | Text Chunking Lab | Real local execution | O(n) | Cuts at headings and keeps the section name with each chunk. |
| Semantic chunking (lexical) | Text Chunking Lab | Real local execution | O(n·d) | Cuts where neighbouring-sentence similarity drops; similarity here uses lexical vectors. |
| Overlap | Text Chunking Lab | Real local execution | O(n) | Repeats the end of a chunk at the start of the next to keep boundary sentences. |
| Arabic normalisation | Text Chunking Lab | Real local execution | O(n) | Removes diacritics and tatweel, unifies alef/yeh/teh-marbuta and digits, keeping the original. |
| Light Arabic/English stemmer | Text Chunking Lab | Real local execution | O(n) | Strips common prefixes and suffixes; not a morphological analyser. |
Sections
No section has this name. Press “Search” to search all site content.
Favourites
My results & certificates
My academy progressMy quiz resultsKids’ progressAcademy certificatesQuiz certificatesStart any lesson or quiz and it will show up here so you can get back to it quickly.
Settings
I am RAG Mentor. Ask me about chunking, embeddings, vector databases, the RAG pipeline and evaluation, or ask me to explain your experiment results.
Database mode: answers from the lab content on this site's server, with no external service; your conversation is not stored.
The assistant can make mistakes, so check the attached sources.
Welcome! I am Dr. Alaa Taima, and this is my smart assistant on “Deep Learning in Arabic”. Ask it about any term or topic in artificial intelligence, and it will answer from the site's content with links to the sources.
Enter to send · Shift + Enter for a new line · The assistant can make mistakes, so check the sources.