Logo: Rag Data Curator

Rag Data Curator

Communautéit
leichu0612-byte
rag-data-curator

Inspect, normalize, structurally chunk, enrich, and validate Markdown or text corpora before embedding or vector-store ingestion. Use when preparing RAG datasets, diagnosing chunk quality, or producing traceable chunk JSON and a quality report; do not use it to invent missing source metadata or claim retrieval gains without an evaluation.

Iwwersiicht

Editeurleichu0612-byte
RepositoryRAG-Data-Curator-Agent-Skill
Skill-Nummrag-data-curator
Stären
85
Forks
5
Matgeliwwert Dateien
15
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 15 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    leichu0612-byte huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Rag Data Curator an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/leichu0612-byte/RAG-Data-Curator-Agent-Skill/tree/main
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/leichu0612-byte/RAG-Data-Curator-Agent-Skill.git \
  .claude/skills/rag-data-curator
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Rag Data Curator an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Rag Data Curator automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Rag Data Curator net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

RAG Data Curator

Purpose

Turn raw Markdown or plain-text documents into reviewable chunks that are ready for embedding and vector-store ingestion. Treat curation as a data-quality workflow: inspect before transforming, preserve semantic structure, record provenance, and report measured results separately from recommended settings.

Tools determine what an agent can do; this skill defines how the agent should do document curation consistently.

When to use

Use this skill to:

  • prepare .md, .markdown, or .txt corpora for a RAG pipeline;
  • replace blind fixed-window splitting with structure-aware chunking;
  • generate chunk-level provenance and quality evidence;
  • inspect an existing chunk dataset for fragmentation, duplication, or metadata gaps.

Do not treat this workflow as a retrieval benchmark. Chunk quality signals cannot establish answer quality without downstream evaluation.

Goals

  • Preserve headings, paragraphs, sentences, fenced code, and useful blockquotes where possible.
  • Keep each accepted chunk within the configured token maximum.
  • Carry only metadata declared by the source or derived through documented deterministic rules.
  • Produce stable identifiers, normalized text hashes, and a measured quality report.
  • Leave a clear audit trail from each chunk to its source document and section.

Workflow

Follow these stages in order:

  1. Inspect. Count headings, paragraphs, sentences, fenced code blocks, blockquotes, exact repeated blocks, known boilerplate, and malformed code fences. Decide whether code and quotes have retrieval value before dropping them.
  2. Normalize. Normalize line endings and prose whitespace. Remove only conservative boilerplate and exact repeated substantive blocks. Preserve headings and paragraph boundaries. Keep code and blockquotes by default.
  3. Chunk. Split at section, heading, paragraph, and sentence boundaries in that order. Use the token limit only as a fallback for a single oversized semantic unit.
  4. Add overlap. For adjacent chunks in the same section, copy up to the last two complete sentences from the previous chunk. Aim for the configured overlap target and skip overlap if no full sentence fits.
  5. Enrich metadata. Record provenance, title, section, index, token count, tags, and keywords. Add optional domain fields only when they appear in source frontmatter.
  6. Validate. Check empty, short, oversized, duplicated, fallback-split, heading-only, metadata-deficient, and excessive-overlap chunks. Reject empty, oversized, and exact duplicate chunks; report nonfatal findings.
  7. Deliver. Write chunk JSON plus a Markdown quality report, and state the tokenizer and run configuration used for every measured size.

Before changing the rules for a corpus, read references/chunking-strategy.md. Before mapping source fields, read references/metadata-schema.md. Use references/quality-checklist.md when reviewing the output or designing a downstream gate.

Chunking rules

Start with these recommended defaults:

  • target chunk size: 400 tokens;
  • maximum chunk size: 600 tokens;
  • minimum chunk size: 80 tokens;
  • overlap target: 60 tokens.

These values are tunable starting points, not industry standards. Prefer ending near the target at a complete semantic boundary. Never exceed the maximum; if a single sentence or code block exceeds it, use a tokenizer-based fallback split and report that fallback. Merge an undersized prose fragment with a neighbor in the same section when the combined chunk remains within the maximum. A naturally complete short section may remain independent.

Metadata rules

Every chunk must include:

  • source, filename, document_title, and section_title;
  • chunk_index and measured token_count;
  • tags and keywords, which may be empty arrays when the source provides no reliable values.

The bundled implementation derives document_title from declared title, then the first H1, then the filename. It derives section_title from the nearest heading, and uses declared tags/keywords plus document and section titles. It copies author, category, and dynasty only when those fields exist in frontmatter. Do not infer identities, dates, categories, or domain attributes from unstated assumptions.

Quality checks

Apply the acceptance rules and interpretations in references/quality-checklist.md. A clean report means the configured structural checks passed; it does not prove good retrieval, ranking, or generation performance.

Output format

Emit one JSON object per accepted chunk with this shape:

json
{
  "chunk_id": "stable-content-derived-id",
  "content": "chunk text",
  "metadata": {
    "source": "relative/path.md",
    "filename": "path.md",
    "document_title": "Document title",
    "section_title": "Section title",
    "chunk_index": 0,
    "token_count": 386,
    "overlap_token_count": 0,
    "tags": [],
    "keywords": []
  },
  "token_count": 386,
  "normalized_text_hash": "sha256:..."
}

The quality report must include document count, accepted chunk count, measured average/minimum/maximum size, duplicate count and rate, rejected count, metadata completeness, inspection counts, configuration, and individual findings.

Run the bundled implementation

Install and curate a corpus:

bash
python -m pip install -e .
python scripts/curate.py docs/ \
  --output build/chunks.json \
  --report build/quality-report.md \
  --source-root docs/

Review both outputs before embedding. Adjust parameters only with a corpus-specific reason, then record the configuration and compare downstream retrieval behavior.

Failure and fallback behavior

  • If no supported documents are found, stop and report the paths checked.
  • If the configured tokenizer is unavailable, stop and install/configure it; do not silently substitute character counts.
  • If a semantic unit exceeds the maximum, apply the measured token fallback, flag broken_sentence_fallback, and keep the source traceable.
  • If source metadata is absent or ambiguous, leave optional values absent and required list fields empty.
  • If parsing reveals an unclosed code fence or widespread noise, include it in inspection results and request human review before ingestion.
  • If clean chunking is impossible without losing important structure, preserve the source and report the limitation rather than hiding it.

Important constraints

  • Analyze structure before splitting.
  • Prefer semantic boundaries; use token limits as a safety bound.
  • Never fabricate metadata, benchmarks, user counts, performance gains, or downstream retrieval claims.
  • Distinguish configured recommendations from measurements observed in the current run.
  • Preserve source text fidelity except for declared normalization and overlap.
  • Treat successful preprocessing and successful RAG retrieval as separate claims requiring separate evidence.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Rag Data Curator?

Inspect, normalize, structurally chunk, enrich, and validate Markdown or text corpora before embedding or vector-store ingestion. Use when preparing RAG datasets, diagnosing chunk quality, or producing traceable chunk JSON and a quality report; do not use it to invent missing source metadata or claim retrieval gains without an evaluation.

Firwat Rag Data Curator op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Rag Data Curator besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Rag Data Curator an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/leichu0612-byte/RAG-Data-Curator-Agent-Skill/tree/main an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Rag Data Curator benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Rag Data Curator benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Rag Data Curator domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Rag Data Curator gratis?

Jo. leichu0612-byte huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇