Logo von Rag Data Curator

Rag Data Curator

Community
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.

Übersicht

Herausgeberleichu0612-byte
RepositoryRAG-Data-Curator-Agent-Skill
Skill-Namerag-data-curator
Sterne
85
Forks
5
Mitgelieferte Dateien
15
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 15

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von leichu0612-byte auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Rag Data Curator in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/leichu0612-byte/RAG-Data-Curator-Agent-Skill/tree/main
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/leichu0612-byte/RAG-Data-Curator-Agent-Skill.git \
  .claude/skills/rag-data-curator
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Rag Data Curator in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Rag Data Curator automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Rag Data Curator nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

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.

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der 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.

Warum Rag Data Curator in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Rag Data Curator besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Rag Data Curator in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/leichu0612-byte/RAG-Data-Curator-Agent-Skill/tree/main ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Rag Data Curator nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Rag Data Curator verwenden?

So viele Sie möchten. In TypingMind können Sie Rag Data Curator mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Rag Data Curator kostenlos?

Ja. Der Skill wird von leichu0612-byte auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇