chunking-strategies

Guide document chunking strategies for RAG systems with code examples.

5|1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/latestaiagents/agent-skills --skill chunking-strategies-latestaiagents
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: chunking-strategies
Source: https://github.com/latestaiagents/agent-skills/tree/main/plugins/rag-architect/skills/chunking-strategies
Command: npx skills add https://github.com/latestaiagents/agent-skills --skill chunking-strategies-latestaiagents

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of effectively splitting documents into meaningful chunks for retrieval-augmented generation (RAG) systems, ensuring better retrieval accuracy and context preservation.

Core Features & Use Cases

  • Diverse Chunking Methods: Supports fixed-size, recursive, semantic, and document-specific (Markdown, Code, HTML) chunking.
  • Optimized Chunk Sizing: Provides guidelines for token counts and overlap based on content type.
  • Advanced Techniques: Includes implementation details for parent-child chunking.
  • Metadata Enrichment: Demonstrates how to add crucial metadata to chunks for better filtering and context.
  • Use Case: When building a RAG system for technical documentation, use this skill to select the most appropriate chunking strategy (e.g., recursive for prose, language-specific for code) to maximize the relevance of retrieved information.

Quick Start

Use the chunking-strategies skill to apply recursive character splitting with a chunk size of 1000 tokens and an overlap of 200 tokens to the provided document.

Frequently Asked Questions about chunking-strategies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to chunk documents for a RAG system?▼

The best chunking strategy for RAG depends on content type, utilizing fixed-size, recursive, semantic, or document-specific splitting to optimize retrieval accuracy and context preservation.

How do I split mixed content types like code and Markdown for retrieval?▼

To split mixed content types for retrieval, apply document-specific methods, using recursive splitting for prose and language-specific rules for code to maintain structural integrity.

How much overlap should I use when chunking text for embeddings?▼

Overlap for text chunking in embeddings should be adjusted based on content type, with specific token count guidelines provided to balance context preservation against retrieval redundancy.

When should I use semantic chunking instead of fixed-size text splitting?▼

Use semantic chunking over fixed-size text splitting when meaning and context boundaries are critical, whereas fixed-size splitting suits uniform prose where consistent token counts matter.

How do I add metadata to chunks to improve RAG retrieval quality?▼

Metadata enrichment improves RAG retrieval quality by attaching crucial contextual information to chunks, enabling better filtering and more accurate context preservation during retrieval.

What is parent-child chunking and when should I use it?▼

Parent-child chunking links smaller retrieved chunks to larger parent chunks, improving retrieval accuracy by providing broader context without sacrificing search precision.