← Back to Concept Contrast

Concept Contrast Fable

Segmenting by Meaning vs. Segmenting by Sliding Window

Conclusion first:Document chunking directly affects whether RAG can retrieve the correct evidence. Chunking by meaning is more like reading the material before cutting, while sliding-window chunking is more like covering the full text with a fixed ruler; contracts, manuals, and chat logs suit different strategies.

Document chunking directly affects whether RAG can retrieve the correct evidence. Chunking by meaning is more like reading the material before cutting, while sliding-window chunking is more like covering the full text with a fixed ruler; contracts, manuals, and chat logs suit different strategies.

Fable

The two paper cutters and the promise that was cut apart

The archive shop in the city received a batch of old contracts. The shopkeeper wanted to cut the thick paper rolls into small pieces so the assistants could retrieve them according to customers' questions. The first paper cutter read the roll first, saw a section about the lease term, a section about breach of contract, and a section about renewal, and cut along the boundaries of meaning. Each sheet was a different size and the edges were uneven, but it read like a complete short story.

The second paper cutter thought this was too slow, so he took out a bronze ruler and cut once every equal length, then moved back a little for the next cut, leaving an overlapping edge. The shop floor quickly piled up with neat paper slips, clearly numbered, with few blanks. The shopkeeper looked at it comfortably and thought finding things would be more reliable in the future.

In the first few days, both kinds of paper slips proved useful. When someone asked about the lease term for a certain street, the first person's cut slip happened to explain the full cause and effect; when someone asked about a certain number, the second person's cut slip could always cover the nearby area. The manager therefore had both work at the same time, using whichever was faster.

The trouble came from a compensation contract. The key promise was written in a long sentence, with the first half stating the trigger condition and the second half stating the compensation cap. The bronze ruler cut right through the middle, and retrieval returned only the second half, so the clerk thought full compensation was owed for any damage. The customer nearly went to negotiate with the wrong interpretation.

The first paper cutter also made mistakes. The paper pieces he cut by meaning varied in length, and with messy chat records, boundaries were often uncertain, mixing idle talk with decisions. When a clerk looked for a short reply, they were instead slowed down by the entire background passage.

The shopkeeper later changed the rules. Legal clauses, product manuals, and meeting minutes were first segmented by meaning by people who understood the content; ledgers, receipts, long chat strings, and materials lacking clear headings were passed steadily through with a bronze ruler, with overlap preserved. For high-risk clauses, they also checked whether the cut severed conditions from conclusions.

The shop no longer argued about whose scissors were more advanced. The manager only asked what the paper roll looked like, how the customer would ask, and whether the retrieved paper slips should be handed directly to the interpreter. The quality of paper cutting was not in a pretty blade edge, but in whether the key words landed on the same sheet of paper. Later a new assistant joined the shop, and the manager had him first review three types of old cases: one-sentence questions about values, whole-paragraph questions about responsibility, and cross-page questions about exceptions. The new assistant quickly understood that the same pair of scissors would leave different wounds on different case files.

Semantic chunking

Semantic chunking splits content according to paragraphs, topics, sentence meaning or structural boundaries, prioritizing complete meaning. It suits contracts, knowledge articles, process descriptions and other material with clear semantic boundaries.

Sliding Window Chunking

Sliding window chunking splits by fixed length and uses overlapping regions to reduce the risk of breaks. It suits long texts or record streams with loose formatting, unclear boundaries, and a need for stable coverage.

Story Mapping

  • Cut the paper by paragraph meaning: semantic chunking relies on content structure and meaning boundaries
  • The bronze ruler fixes the cut and leaves overlapping edges: sliding window chunking uses fixed windows and overlap to provide stable coverage
  • A compensation promise cut apart: mechanical splitting can break apart conditions, conclusions, and qualifiers
  • Chat history boundaries are hard to pin down: semantic chunking can also be unstable when facing messy materials
  • Choose scissors by material and question type: real RAG projects must choose a chunking strategy by document type, risk, and query pattern

Landing in a RAG project

For contracts, policies, and technical manuals, test semantic chunking first, because answers often depend on complete clauses; for customer service chats, logs, transaction records, and low-structure long texts, you can start with sliding windows to ensure coverage. Before launch, don't just look at chunk count—spot-check high-risk questions: are conditions, exceptions, amounts, and time limits being split apart?

京ICP备2026014272号