RAG Chunking Strategies: Size, Overlap, and Metadata

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/17

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering chunk sizes, overlap trade-offs, storage calculations, and metadata types in RAG systems.

18 Terms

1
New cards

Small Chunks (100100 to 300300 tokens)

A chunk size configuration that yields high retrieval precision and higher recall, but loses context due to idea fragmentation.

2
New cards

Large Chunks (500500 to 1,5001,500 tokens)

A chunk size configuration that preserves more context and requires fewer chunks for storage, but suffers from lower precision and introduces more noise per chunk.

3
New cards

General Sweet Spot Chunk Size

A baseline guideline of approximately 400400 to 800800 tokens that balances precision, context, and storage across general retrieval use cases.

4
New cards

Q&A Chunk Size

An optimal chunk size range of 200200 to 400400 tokens designed to yield precise answers in question-and-answer retrieval systems.

5
New cards

Summarization Chunk Size

A recommended chunk size range of 500500 to 1,0001,000 tokens, chosen because summarization tasks require full context.

6
New cards

Code Chunk Size

A recommended chunk size range of 300300 to 500500 tokens, balancing high precision with structural code context.

7
New cards

Legal and Technical Document Chunk Size

A recommended baseline range of 400400 to 800800 tokens, selected because content in these documents is typically clause-sized.

8
New cards

Chunk Overlap

The repetition of tokens across adjacent chunk boundaries designed to prevent information loss and avoid splitting ideas across split points.

9
New cards

Storage Increase Formula

The calculation for extra vector storage costs resulting from chunk overlap: chunks with overlapchunks without overlap−1\frac{\text{chunks with overlap}}{\text{chunks without overlap}} - 1.

10
New cards

Rule of Thumb for Overlap Storage

A large-document heuristic stating that a 10%10\% overlap increases storage by ≈11%\approx 11\%, a 20%20\% overlap by ≈25%\approx 25\%, and a 50%50\% overlap doubles storage (2×2\times or 100%100\% increase).

11
New cards

Boundary Effect

The reason small documents experience lower overlap storage penalties than the rule of thumb, caused by the first chunk covering tokens without overlap and fixed boundary savings representing a larger fraction of total chunks.

12
New cards

Recommended Overlap Percentage

A standard baseline recommendation of 10%10\% to 20%20\% overlap of the chunk size (such as 2020 to 4040 tokens for a 200200-token chunk).

13
New cards

Structural Metadata

Metadata describing where a chunk resides in a document, including source name, file path, section, subsection, and positional index (e.g., chunk NN of MM).

14
New cards

Semantic Metadata

Metadata describing what a chunk is about, including model-generated summaries, keywords, and named entities.

15
New cards

Retrieval Metadata

Metadata used for chunk indexing and search operations, such as vector embeddings and creation timestamps (created_at).

16
New cards

Pre-filtering (Filtering Before Search)

Using metadata attributes to narrow down candidate chunks prior to vector similarity matching, avoiding full scans across all chunks.

17
New cards

Hybrid Retrieval

A retrieval strategy that combines semantic search with keyword and metadata filtering to produce more precise matches.

18
New cards

Source Attribution

The capability of a large language model to reference exact document sources and sections (e.g., policy document and section number) using attached chunk metadata.