Mental model
Module 04: Split knowledge without losing meaning- Learn why chunking exists, how chunk size and overlap change retrieval, and how structure-aware chunking preserves context.
Learn why chunking exists, how chunk size and overlap change retrieval, and how structure-aware chunking preserves context.
Engineering focus: Split knowledge without losing meaning
Learn why chunking exists, how chunk size and overlap change retrieval, and how structure-aware chunking preserves context.
You are not expected to know the engineering vocabulary before using the idea. Formal terminology comes after the mental model.
Carry one evidence-grounded knowledge assistant through all 18 modules. Preserve source IDs, retrieval evidence, evaluation cases, authority decisions and security assumptions so every improvement is measurable.
Chunking is like cutting a manual into index cards. Cards that are too small lose meaning; cards that are too large bury the useful sentence.
There is no universal chunk size; choose it from document structure and evaluation.
Long documents are difficult to search and expensive to place into model context. Chunking creates smaller retrieval units.
Very small chunks can lose meaning; very large chunks can dilute relevance and waste context.
Headings, sections, paragraphs and tables often provide better boundaries than arbitrary character counts.
The best strategy depends on question style, source structure and retrieval model. Use evaluation questions rather than intuition alone.
Module 04: Split knowledge without losing meaningBAD
[Restart only after health]
[checks fail twice on port 8080]
BETTER
# Recovery
Restart only after health checks fail twice.
# Network
The API listens on port 8080.The right document is found but the useful sentence is missing or split.
Treat chunking as an evaluated retrieval parameter.
Goal: Compare fixed-size and paragraph-aware chunks on the same short runbook.
python3 - <<'PY2'
text='''# API\nThe API listens on 8080.\n\n# Recovery\nRestart only after health checks fail twice.'''
fixed=[text[i:i+35] for i in range(0,len(text),35)]
paras=[p for p in text.split('\n\n') if p.strip()]
print('fixed=',fixed); print('paragraph=',paras)
PY2Record the intermediate source IDs, ranks, metadata or state produced by the baseline. Explain which pipeline layer this evidence belongs to.
Reduce the fixed chunk size until a key sentence is split. Compare the broken chunk to the paragraph-aware result and note which query would fail.
Treat chunking as an evaluated retrieval parameter. State the failing layer, change only that layer, then repeat the verification checks.
Record: hypothesis → evidence → change → observed result → remaining limitation. Keep this note with the running Evidence Desk project.
Production RAG improves when every change can be traced to evidence at a specific pipeline layer. In production, retain the before/after evidence so the same failure can become a regression test.
Chunk strategy documented
Stable chunk IDs present
Chunking compared on labelled queries
They may remove surrounding context needed to interpret the fact.
They dilute relevance and consume more context.
To preserve continuity across chunk boundaries, but too much creates duplication.
By evaluating retrieval performance on representative questions.
Progress is saved in this browser immediately. When you sign in to My Learning, it can also sync across devices.
Attempt the core lab and knowledge checks before marking the module complete.