Chunking Strategy: Sliding Window
Overview
RAGv2 uses a “Sliding Window” strategy. This prevents text from being split awkwardly mid-sentence. It moves back a defined “overlap” amount before starting the next chunk.
Flow / Behavior
graph TD Text["📜 Raw Document Text"] --> Parent["✂️ Split into Parent Chunks"] Parent --> Child["✂️ Split Parents into Child Chunks"] Child --> Vector["🔢 Convert Children to Vectors"]
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
PARENT_CHUNK_SIZE | int | 2000 | Context given to the AI. Contains full paragraphs. |
PARENT_OVERLAP | int | 250 | Overlap for Parents to ensure smooth transitions. |
CHILD_CHUNK_SIZE | int | 250 | Specific target size for FAISS vectors. |
CHILD_OVERLAP | int | 75 | Overlap for Children. |
TOP_K | int | 4 | Number of Parent chunks retrieved. |
Related Components
Last Updated: 2026-05-01