원클릭으로
choosing-a-chunking-framework
Select the right chunking framework based on document type, pipeline architecture, and retrieval goals.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Select the right chunking framework based on document type, pipeline architecture, and retrieval goals.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use this skill when building, debugging, or improving Retrieval-Augmented Generation systems, including chunking, vector database selection, hybrid search, reranking, multimodal RAG, code documentation RAG, retrieval latency, and production RAG architecture.
Chunk nested documents into parent-child levels so retrieval can move from broad sections to fine-grained passages.
Use semantic boundaries and embedding similarity to chunk text for higher-relevance retrieval.
Route RAG chunking decisions across semantic, hierarchical, sliding-window, contextual-header, and framework-selection strategies.
Use overlapping windows to preserve context across chunk boundaries while controlling retrieval size.
Reduce retrieval latency with caching, batching, and index-level optimization.
| name | choosing-a-chunking-framework |
| title | Choosing a Chunking Framework |
| description | Select the right chunking framework based on document type, pipeline architecture, and retrieval goals. |
| allowed-tools | ["Read","Grep","Glob","Bash"] |
| category | chunking |
| tags | ["framework-selection","chonkie","langchain","llamaindex","haystack","unstructured"] |
Chunking quality depends as much on the framework as on the strategy itself. This guide helps a coding agent choose between chunking frameworks based on the shape of the data, the surrounding RAG stack, and whether the main need is speed, structure-awareness, retrieval quality, or integration simplicity.
Teams often pick a chunking framework for the wrong reason:
Decide whether the corpus is mostly plain text, structured documents, code, or messy extracted files.
Why: Chunking frameworks differ most sharply in how they handle document structure. The right choice for markdown docs is often wrong for scanned PDFs or source code.
Use this default mapping:
Determine whether chunking itself is a strategic part of the system or just one preprocessing step.
Why: If chunking is central to recall quality, code structure, or high-throughput ingestion, you want a framework with deeper chunking specialization. If it is incidental, use the framework already governing the RAG pipeline.
Choose this way:
Choose a framework whose chunking model supports the retrieval pattern you intend to use.
Why: Some frameworks are built around plain chunks, while others are better for hierarchical retrieval, metadata-enriched nodes, or section-preserving document flows.
Recommended fit by retrieval pattern:
Pick the framework whose strengths best match the workload.
Why: A framework should be chosen by tradeoff, not popularity.
| Framework | Best At | Choose It When | Avoid It When |
|---|---|---|---|
| Chonkie | Specialized chunking strategies, high throughput, semantic and code-aware chunking | Chunking is a first-class problem, you need semantic/code chunkers, or ingestion speed matters | You want the simplest possible default inside an existing LangChain or Haystack app |
| LangChain Text Splitters | Simple, reliable general-purpose chunking tightly integrated with LangChain apps | You already use LangChain or LangGraph and need practical default chunking with minimal extra tooling | You need deeply specialized code, layout, or semantic chunking beyond standard splitter patterns |
| LlamaIndex Node Parsers | Metadata-rich nodes, sentence windows, hierarchical parsing, retrieval-aware chunking | You use LlamaIndex ingestion/query pipelines or need chunking that preserves node relationships and retrieval metadata | You only need straightforward standalone chunking without adopting LlamaIndex concepts |
| Haystack Preprocessors | Deterministic pipeline-based splitting for production search systems | You are building around Haystack pipelines and want predictable document preprocessing components | You need more advanced semantic or code-aware chunking than Haystack's built-in preprocessors provide |
| Unstructured Chunking | Partition-first chunking for PDFs, Office docs, HTML, tables, and layout-heavy content | Your main challenge is document parsing and structural preservation before chunking | Your corpus is already clean text and you do not need layout-aware parsing |
Once the matrix points to a framework, use its chunking primitives directly. Adopt a framework's chunker only where it has a clear advantage, and avoid mixing ingestion frameworks without a reason.
by_title): chunking, API strategies