Skip to content
Skills Library
AI & agents · Planning

knowledge-ingestion-planner

/knowledge-ingestion-planner

Design a knowledge ingestion pipeline for RAG: source connectors, parsing, chunking handoff, metadata enrichment, and incremental sync. Use when onboarding documents, building knowledge bases, or scaling RAG corpora.

Repository
APES ↗
Licence
MIT
Last repository change
03.07.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 03.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Design a knowledge ingestion pipeline for RAG: source connectors, parsing, chunking handoff, metadata enrichment, and incremental sync. Use when onboarding documents, building knowledge bases, or scaling RAG corpora.

Original author description

Design a knowledge ingestion pipeline for RAG: source connectors, parsing, chunking handoff, metadata enrichment, and incremental sync. Use when onboarding documents, building knowledge bases, or scaling RAG corpora.

How it works

  1. Step 1: Inventory sources
  2. Step 2: Design connector layer
  3. Step 3: Define parsing and extraction
  4. Step 4: Metadata enrichment
  5. Step 5: Hand off to chunking and indexing
  6. Step 6: Incremental sync and deletion
  7. Step 7: Validate
Original SKILL.md headings · 186 lines, 814 words
SKILL.md preview
---
name: knowledge-ingestion-planner
description: >
  Design a knowledge ingestion pipeline for RAG: source connectors, parsing, chunking handoff, metadata enrichment, and incremental sync. Use when onboarding documents, building knowledge bases, or scaling RAG corpora.
metadata:
  apes-version: "1.1"
  category: rag
---

# Knowledge Ingestion Planner

# Purpose

Design a knowledge ingestion pipeline: how documents enter the system, are parsed, enriched, chunked, and indexed with reliable incremental updates.

**Input:** Source types (PDF, wiki, API, DB), volume, update frequency, access control requirements  
**Output:** Ingestion Pipeline Specification with connector map, parsing rules, metadata schema, and sync strategy  
**Examples:** See [examples.md](examples.md) for worked input/output.

---

# Workflow

## Step 1: Inventory sources

| Source | Format | Volume | Update freq | ACL |
|--------|--------|--------|-------------|-----|
| Confluence | HTML | 5k pages | Daily | Per-space |
| S3 PDFs | PDF | 200 files | Weekly | Bucket policy |
| GitHub README | Markdown | 50 repos | On push | Public |

Identify authoritative vs supplemental sources; flag duplicates across sources.

## Step 2: Design connector layer

| Pattern | Use when |
|---------|----------|
| Batch pull | Scheduled full/incremental sync |
| Webhook push | Real-time wiki/git updates |
| CDC stream | Database knowledge tables |
| Upload API | User-generated documents |

Each connector outputs normalized `RawDocument` with provenance:

```text
source_id, uri, mime, fetched_at, acl_principal, raw_bytes
```

## Step 3: Define parsing and extraction

| Format | Parser approach | Pitfalls |
|--------|-----------------|----------|
| PDF | Layout-aware OCR if scanned | Tables split wrong |
| HTML/wiki | DOM + boilerplate removal | Nav/footer noise |
| Office | Structured extraction | Hidden text layers |
| Code | AST or markdown-aware | License headers |

Document fallback when parsing confidence is low (quarantine queue).

## Step 4: Metadata enrichment

Required metadata per chunk parent document:

| Field | Purpose |
|-------|---------|
| `doc_id` | Stable ID across reindexes |
| `title` | Display and filtering |
| `source_system` | Provenance |
| `updated_at` | Freshness ranking |
| `acl` | Retrieval filter |
| `language` | Routing / embedding model |
| `tags` | Faceted search |

Optional: auto-summary, entity extraction, section headings.

## Step 5: Hand off to chunking and indexing

Define contract with `chunking-strategy-advisor`:

- Send cleaned markdown + structure hints (headings, tables)
- Chunk size/overlap per doc type
- Parent-child chunk linking for citations

Indexing pipeline:

```text
Parse → Enrich → Chunk → Embed → Upsert vector store → Verify count
```

## Step 6: Incremental sync and deletion

| Event | Action |
|-------|--------|
| New document | Full ingest path |
| Updated document | Re-chunk changed sections or full replace |
| Deleted / ACL revoked | Hard delete vectors + tombstone log |
| Source drift | Reconciliation job weekly |

Idempotency key: `source_id + content_hash`.

## Step 7: Validate

Run Validation checklist.

---

# Decision Rules

| Condition | Action |
|-----------|--------|
| ACL per document | Propagate to vector metadata; filter at query time |
| >1M documents | Partition by tenant/source; async queue |
| Scanned PDF majority | OCR pipeline + human QA sample |
| Duplicate content across sources | Canonical URL + dedupe hash |
| Real-time requirement <5 min | Push webhooks, not nightly batch |
| PII in corpus | Scan pre-index; block or redact |

---

# Validation

- [ ] Source inventory with volume and update frequency
- [ ] Connector pattern per source
- [ ] Parsing rules per MIME type
- [ ] Metadata schema with ACL fields
- [ ] Chunking handoff documented
- [ ] Incremental sync and delete behavior defined
- [ ] Idempotency and reconciliation plan
- [ ] Ingestion SLA and error quarantine queue

---

# Anti-patterns

- **Reindex everything nightly** — wasteful at scale; misses true incremental.
- **Ignore ACL at ingest** — retrieval leaks across tenants.
- **Chunk before clean** — boilerplate pollutes every chunk.
- **No deletion path** — stale content forever in answers.
- **Single parser for all PDFs** — table-heavy docs need layout models.

---

# Best Practices

- Store raw originals in object storage; derived chunks reproducible.
- Log ingest lineage: chunk → doc → source fetch timestamp.
- Sample 1% of ingested docs for human QA each week.
- Pair with `embedding-strategy-advisor` for model/version pinning.
- Monitor ingest lag and embedding failure rate.

---

# Output Structure

```markdown
# Ingestion Pipeline: [Knowledge Base Name]

## Sources
| Source | Connector | Schedule | ACL |
|--------|-----------|----------|-----|

## Architecture
[Diagram: sources → queue → parse → enrich → chunk → index]

## Parsing Rules
| MIME | Parser | Fallback |
|------|--------|----------|

## Metadata Schema
[Field definitions]

## Sync Strategy
[Incremental rules]

## SLAs & Monitoring
| Metric | Target |
|--------|--------|

## Error Handling
[Quarantine, retry]
```

---

# Next Skills

| Outcome | Recommended Skill |
|---------|-------------------|
| Chunking parameters | `rag/chunking-strategy-advisor` |
| Embedding model choice | `rag/embedding-strategy-advisor` |
| End-to-end RAG design | `rag/rag-architecture-designer` |
| Retrieval tuning | `rag/retriever-optimizer` |
| Hybrid search setup | `rag/hybrid-search-advisor` |
Files in this package (3)
  • README.md 1 KB
  • examples.md 1 KB
  • skill.md 5 KB

Versions

The database has no other skills named knowledge-ingestion-planner.

Database snapshot: 13.11.2026 · package version 0d53cd77312c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100vector-database-ingestion-pipeline-for-rag
    Builds and operates the ingestion pipeline that feeds a vector database for RAG — document chunking as a pipeline stage, batch embedding jobs, idempotent/resumable upserts, and re-indexing triggered by source-document updates. Use when a user asks to "build a pipeline to embed…
  • 100knowledge-connect
    Manage knowledge integration via MCP, Vector DBs, and A2A connectors. Use when: Connect to knowledge base, Ingest documentation, Query vector database, Setup RAG pipeline, Index project files.
  • 100langchain4j-rag-implementation-patterns
    Provides Retrieval-Augmented Generation (RAG) implementation patterns with LangChain4j for Java. Generates document ingestion pipelines, embedding stores, vector search, and semantic search capabilities. Use when building chat-with-documents systems, document Q&A over PDFs or…
  • 100rag-systems
    Designs, builds and debugs retrieval-augmented generation (RAG) - ingestion and parsing, chunking, embeddings, hybrid search with reranking, access control at retrieval time, grounded answers with citations, and retrieval and answer evaluation. Use when building search or Q&A…
  • 100rag-review
    Use when reviewing or auditing a RAG pipeline end-to-end against production best practices. Covers all 8 stages — ingestion/chunking, versioning/updates, embedding/indexing, query routing, retrieval/fusion/reranking, generation/abstention, security, and eval/observability.…
  • 100rag-architect
    Design RAG pipelines: chunking, retrieval evaluation, and architecture. Use when building a RAG system, selecting a chunking strategy, choosing a vector database, optimizing retrieval quality, or evaluating with RAGAS metrics.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.