This handles the RAG chunking problem systematically, walking you through five strategy levels from basic fixed-size splits to semantic boundary detection with embedding similarity. It includes validation commands you can actually run to check coherence scores and retrieval precision, plus concrete parameter recommendations like starting at 512 tokens with 15% overlap. The iterative tuning guidance is solid: if precision drops below 0.7, reduce chunk size by 25%. What's useful here is the decision tree for matching strategies to document types, whether you're processing unstructured text, code with AST parsing, or complex documents with thematic shifts. It won't magically solve retrieval quality issues, but it gives you a methodical framework instead of guessing at chunk sizes.

skills.sh installs
4K
GitHub stars
369
last updated
Aug 21, 2026

Install

$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill chunking-strategy --agent claude-code

Installs into .claude/skills of the current project.

Files

Chunking Strategy for RAG Systems

Overview

Provides chunking strategies for RAG systems, vector databases, and document processing. Recommends chunk sizes, overlap percentages, and boundary detection methods; validates semantic coherence; evaluates retrieval metrics.

When to Use

Use when building or optimizing RAG systems, vector search pipelines, document chunking workflows, or performance-tuning existing systems with poor retrieval quality.

Instructions

Choose Chunking Strategy

Select based on document type and use case:

  1. Fixed-Size Chunking (Level 1)

    • Use for simple documents without clear structure
    • Start with 512 tokens and 10-20% overlap
    • Adjust: 256 for factoid queries, 1024 for analytical
  2. Recursive Character Chunking (Level 2)

    • Use for documents with structural boundaries
    • Hierarchical separators: paragraphs → sentences → words
    • Customize for document types (HTML, Markdown, JSON)
  3. Structure-Aware Chunking (Level 3)

    • Use for structured content (Markdown, code, tables, PDFs)
    • Preserve semantic units: functions, sections, table blocks
    • Validate structure preservation post-split

Sponsors

Details

Repository
github.com/giuseppe-trisciuoglio/developer-kit
Category
AI & Agent Building
First seen
May 16, 2026

More from giuseppe-trisciuoglio/developer-kit

All 102
1giuseppe-trisciuoglio avatarlangchain4j-spring-boot-integrationgiuseppe-trisciuoglio/developer-kitProvides integration patterns for LangChain4j with Spring Boot. Configures AI model beans, sets up chat memory with Spring context, integrates RAG pipelines wit3.9Kskills.sh installs
2giuseppe-trisciuoglio avatarqdrantgiuseppe-trisciuoglio/developer-kitProvides Qdrant vector database integration patterns with LangChain4j. Handles embedding storage, similarity search, and vector management for Java applications3.9Kskills.sh installs
3giuseppe-trisciuoglio avatarlangchain4j-testing-strategiesgiuseppe-trisciuoglio/developer-kitProvides unit test, integration test, and mock AI patterns for LangChain4j applications. Creates mock LLM responses, tests retrieval chains, validates RAG workf3.8Kskills.sh installs
4forcedotcom avatardeveloping-agentforceforcedotcom/sf-skillsBuild, modify, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates, modifies, or asks about .agent files or aiAuthoringBundle meta3.8Kskills.sh installs
5openai avatarsentryopenai/skillsUse when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry CLI; perform read3.8Kskills.sh installs
6browser-use avataropen-sourcebrowser-use/browser-useDocumentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or T3.7Kskills.sh installs