skills/rag-document-ingestion-pipeline/SKILL.md
Build production document ingestion pipelines with chunking, embedding, and vector DB storage. Activate on: document ingestion, chunking strategy, embedding pipeline, vector DB ingestion, RAG indexing. NOT for: LLM prompt design (prompt-engineer), retrieval query logic (ai-engineer), or vector DB ops/migration (vector-database-migration-tool).
npx skillsauth add curiositech/windags-skills rag-document-ingestion-pipelineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build production-grade document ingestion pipelines that chunk, embed, and store documents in vector databases for retrieval-augmented generation.
Activate on: "document ingestion", "chunking strategy", "embedding pipeline", "vector DB ingestion", "RAG indexing", "ingest PDFs", "build knowledge base", "semantic chunking", "recursive chunking"
NOT for: LLM prompt design or retrieval query tuning (prompt-engineer, ai-engineer), vector DB operational migration (vector-database-migration-tool), or fine-tuning data preparation (fine-tuning-dataset-curator)
unstructured or docling for parsing.text-embedding-3-large (OpenAI), embed-v4 (Cohere), or BAAI/bge-m3 (local). Match dimensionality to your vector DB plan.| Domain | Technologies | Notes | |--------|-------------|-------| | Document Parsing | unstructured, docling, PyMuPDF, markitdown | Handles PDF, DOCX, HTML, Markdown, images with OCR | | Chunking | LangChain splitters, semantic-chunkers, chonkie | Recursive, semantic, markdown-header, code-aware | | Embedding Models | OpenAI text-embedding-3, Cohere embed-v4, BGE-M3, Nomic Embed | Local or API; 256-3072 dimensions | | Vector Databases | Pinecone, Qdrant, Weaviate, pgvector, Milvus | Managed or self-hosted; HNSW or IVF indexing | | Orchestration | LangChain, LlamaIndex, Haystack, custom Python | Pipeline DAGs with retry and checkpointing |
Document Type?
├── Structured (Markdown, HTML, code)
│ └── Structure-aware chunking (headers, functions)
│ └── Preserve hierarchy as metadata
├── Semi-structured (PDF with tables)
│ └── docling/unstructured → table extraction + text chunking
│ └── Embed tables as markdown, text as paragraphs
└── Unstructured (plain text, transcripts)
└── Semantic chunking (embedding similarity breakpoints)
└── Fallback: recursive character split (512-1024 tokens, 10% overlap)
Sources ──→ [Parser] ──→ [Chunker] ──→ [Enricher] ──→ [Embedder] ──→ [Vector DB]
│ │ │ │ │ │
│ unstructured recursive/ add metadata: batch embed upsert with
│ docling semantic source, date, (batch=256) namespace
│ section, hash partitioning
│
└── Dedup by content hash before embedding (saves 30-50% cost)
# Production ingestion skeleton
from langchain_text_splitters import RecursiveCharacterTextSplitter
from hashlib import sha256
def ingest_documents(docs: list[str], collection: str):
splitter = RecursiveCharacterTextSplitter(
chunk_size=512, chunk_overlap=64,
separators=["\n\n", "\n", ". ", " "]
)
seen_hashes = set()
chunks = []
for doc in docs:
for chunk in splitter.split_text(doc):
h = sha256(chunk.encode()).hexdigest()[:16]
if h not in seen_hashes:
seen_hashes.add(h)
chunks.append({"text": chunk, "hash": h})
# Batch embed and upsert
embeddings = embed_batch([c["text"] for c in chunks], batch_size=256)
vector_db.upsert(collection, chunks, embeddings)
Always store metadata alongside vectors for filtered retrieval:
metadata = {
"source": "docs/api-reference.md",
"section": "Authentication",
"chunk_index": 3,
"total_chunks": 12,
"ingested_at": "2026-03-20T00:00:00Z",
"content_hash": "a1b2c3d4",
"token_count": 487,
}
data-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.