chunking
Skill8 starsChanged 7 months agoMITView on GitHub
Route RAG chunking decisions across semantic, hierarchical, sliding-window, contextual-header, and framework-selection strategies.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rag-skillsSkill
- choosing-a-chunking-frameworkSkill
- contextual-chunk-headersSkill
- hierarchical-chunkingSkill
- semantic-chunkingSkill
- sliding-window-chunkingSkill
- rag-for-code-documentationSkill
- rag-for-multimodal-contentSkill
- data-type-handlingSkill
- index-versioning-and-reindexingSkill
- production-rag-deploymentSkill
- deploymentSkill
- generation-evaluation-metricsSkill
- rag-evaluation-frameworksSkill
- retrieval-evaluation-metricsSkill
- evaluation-metricsSkill
- optimize-retrieval-latencySkill
- performance-optimizationSkill
- agentic-rag-routingSkill
- multi-agent-rag-orchestrationSkill
- rag-agentsSkill
- adaptive-retrievalSkill
- context-enrichment-windowSkill
- crag-corrective-ragSkill
- explainable-retrievalSkill
- graph-ragSkill
- hybrid-search-bm25-denseSkill
- hyde-hypothetical-document-embeddingsSkill
- hype-hypothetical-prompt-embeddingsSkill
- multi-pass-retrieval-with-rerankingSkill
- query-transformation-strategiesSkill
- raptor-hierarchical-retrievalSkill
- self-ragSkill
- retrieval-strategiesSkill
- choosing-vector-db-by-datatypeSkill
- qdrant-for-production-ragSkill
- qdrant-setup-ragSkill
- vector-databasesSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use this parent skill when the main RAG problem is how to split source material into retrievable units.
- Distinctive: line 24
Overlap: Add controlled neighboring context across chunk boundaries.
- Distinctive: line 30
Use semantic chunking for prose, hierarchical chunking for structured documents, and code-specific guidance for APIs or source repositories.
- Distinctive: line 33
Use sliding windows when answers cross boundaries, contextual headers when chunks lack source context, and semantic chunking when fixed …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Chunking
Overview
Use this parent skill when the main RAG problem is how to split source material into retrievable units. Route to the child skill that best matches the document shape, retrieval failure, and production constraints.
Problem Statement
Poor chunking causes retrieval misses, fragmented answers, duplicated context, and weak citations. RAG systems need chunking strategies that preserve meaning while staying efficient for indexing and retrieval.
Key Concepts
- Semantic boundaries: Split where ideas naturally change.
- Hierarchy: Preserve document, section, and subsection relationships.
- Overlap: Add controlled neighboring context across chunk boundaries.
- Context headers: Attach inherited titles and metadata to chunks.
Implementation Guide
Step 1: Identify the Corpus Shape
Use semantic chunking for prose, hierarchical chunking for structured documents, and code-specific guidance for APIs or source repositories.
Step 2: Match the Retrieval Failure
Use sliding windows when answers cross boundaries, contextual headers when chunks lack source context, and semantic chunking when fixed windows split ideas.
Step 3: Validate Chunk Quality
Measure retrieval recall, answer groundedness, duplicate context rate, and citation usefulness before changing embeddings or vector databases.
When to Use This Skill
- Choosing a chunking strategy for a new RAG pipeline
- Debugging poor recall caused by fragmented source content
- Improving citations and source traceability
When NOT to Use This Skill
- The bottleneck is ranking after retrieval
- The issue is vector database operations or deployment
- Source documents are already chunked and validated
Related Skills
- Semantic Chunking
- Hierarchical Chunking
- Sliding Window Chunking
- Contextual Chunk Headers
- Choosing a Chunking Framework
Metrics & Success Criteria
- Higher recall on chunk-boundary questions
- Lower duplicate or irrelevant context in prompts
- Better source citations and more coherent retrieved passages
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

