Home/AI LLM Engineering/indexion-segment
I

indexion-segment

by @trkbt10v
4.4(120)

This skill intelligently splits text into contextually meaningful chunks using window, TF-IDF, punctuation, or hybrid strategies. It is primarily designed for preparing data for RAG (Retrieval Augmented Generation) and embedding pipelines, ensuring text content is effectively organized. This enhances AI models' ability to understand and process long documents, improving the quality and relevance of generated responses or semantic search results.

text-segmentationragllm-optimizationdata-preparationnlpGitHub
Installation
npx skills add https://github.com/trkbt10/indexion-skills --skill indexion-segment
compare_arrows

Before / After Comparison

1
Before

Before this skill, users had to manually or use simple scripts to segment long texts for RAG or embedding models. This process was time-consuming and often resulted in poor contextual quality, leading to AI models misinterpreting complex documents and affecting the final generation quality.

After

This skill automatically and intelligently segments text into contextually meaningful chunks, significantly reducing the time and effort required for data preprocessing. By optimizing the quality of text blocks, this skill enhances the retrieval accuracy of RAG systems and AI models' understanding of long documents, thereby improving overall application performance.

SKILL.md

indexion segment

Split text into contextual segments using divergence-based, TF-IDF, or punctuation strategies.

When to Use

  • User needs to chunk text for RAG or embedding pipelines
  • User wants to split a document into meaningful sections
  • User asks to segment text for processing
  • Preparing text for similarity analysis at sub-document level

Usage

# Default window divergence strategy
indexion segment <input-file> <output-dir>

# TF-IDF based segmentation
indexion segment --strategy=tfidf <input-file> <output-dir>

# Punctuation-based segmentation
indexion segment --strategy=punctuation <input-file> <output-dir>

# Custom segment sizes
indexion segment --min-size=200 --max-size=3000 --target-size=800 document.txt output/

# Custom divergence threshold
indexion segment --threshold=0.5 document.txt output/

# Adaptive threshold mode (default)
indexion segment --adaptive document.txt output/

# Hybrid NCD+TF-IDF mode
indexion segment --hybrid --ncd-weight=0.6 --tfidf-weight=0.4 document.txt output/

# Custom window size
indexion segment --window-size=5 document.txt output/

# Custom output prefix
indexion segment --prefix=chunk document.txt output/

Options

OptionDefaultDescription
--strategy=NAMEwindowStrategy: window, tfidf, punctuation
--min-size=INT100Minimum segment characters
--max-size=INT2000Maximum segment characters
--target-size=INT500Target segment characters
--threshold=FLOAT0.42Divergence threshold
--window-size=INT3Window size
--adaptivetrueAdaptive threshold mode
--hybridfalseNCD+TF-IDF hybrid mode
--ncd-weight=FLOAT0.5NCD weight in hybrid mode
--tfidf-weight=FLOAT0.5TF-IDF weight in hybrid mode
--prefix=NAMEsegmentOutput file prefix

Strategies

StrategyDescription
window (default)Sliding window divergence detection
tfidfTF-IDF based topic change detection
punctuationPunctuation/sentence boundary based

Workflow

  1. Run indexion segment <input-file> <output-dir> to split text with defaults
  2. Adjust --threshold and --target-size to tune segmentation granularity
  3. Use --hybrid mode for better accuracy on mixed-content documents

User Reviews (0)

Write a Review

Effect
Usability
Docs
Compatibility

No reviews yet

Statistics

Installs4.9K
Rating4.4 / 5.0
Version
Updated2026年6月30日
Comparisons1

User Rating

4.4(120)
5
37%
4
43%
3
13%
2
5%
1
2%

Rate this Skill

0.0

Compatible Platforms

🤖claude-code

Timeline

Created2026年6月9日
Last Updated2026年6月30日
🎁 Agent Knowledge Cards
Survey