본문으로 건너뛰기
cccskills
무료GitHub에 공개

document-parser

Building robust document ingestion — chunking, metadata, and multi-format pipelines for search and RAG.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Overview

Modern applications ingest documents for search, retrieval-augmented generation (RAG), and analytics. A document parser pipeline turns heterogeneous files (PDF, DOCX, HTML, spreadsheets, images) into clean, chunked, metadata-rich units ready for indexing. This skill covers the architecture and the details that determine retrieval quality.

When to use

  • Building RAG ingestion over PDFs, Office docs, and web pages
  • Designing chunking strategies (size, overlap, semantic boundaries)
  • Extracting metadata (titles, dates, authors, page numbers, source URLs)
  • Handling tables, figures, and scanned content in parsing
  • Evaluating and improving retrieval quality end-to-end

Core concepts

Parse → clean → chunk → enrich. The pipeline stages: extract raw text with structure (headings, tables, lists); clean (fix hyphenation, normalize whitespace, drop boilerplate like repeated headers/footers); chunk into retrieval units; enrich each chunk with metadata (source, section, page, date). Skipping cleaning poisons everything downstream.

Chunking strategy drives retrieval quality. Fixed-size chunks with overlap are the baseline (e.g. ~500 tokens, 10–20% overlap). Better: respect document structure — chunk by section, keep tables intact, never split a table across chunks. A chunk should be self-contained enough to make sense out of context, which is why prepending section headings to each chunk helps enormously.

Metadata is a retrieval multiplier. Filters on metadata (date ranges, document type, source) often beat pure semantic search for precision. Capture rich metadata at ingest: title, section path, page numbers, author, date, URL, document version. Store it alongside embeddings, not just in them.

Tables need special handling. Serialize tables as Markdown or HTML within the chunk, keep them whole, and consider generating a textual summary of key figures ("Q3 revenue was $4.2M, up 12%") as an additional chunk — dense numeric tables embed poorly on their own.

Format routing. Detect file type and route to the right extractor (native PDF text vs OCR for scans, structure-aware DOCX parsing, readability extraction for HTML). One generic path for all formats produces mediocre results for every format.

Practical workflow

  1. Inventory your corpus: formats, sizes, languages, scan-vs-native ratio, update frequency — the pipeline design follows from this.
  2. Build per-format extractors with structure preservation (headings, tables, lists); add OCR routing for image-only PDFs.
  3. Implement cleaning: de-hyphenate, normalize whitespace/unicode, strip running headers/footers and page numbers, detect and drop boilerplate.
  4. Chunk by structure with fallback to sized chunks; prepend breadcrumb context (document title › section) to each chunk; keep tables atomic.
  5. Attach metadata at ingest and expose it as filters in retrieval; version chunks so re-ingestion is idempotent (hash content, upsert by ID).
  6. Evaluate retrieval, not just parsing: build a question set with known answers, measure hit rate / recall@k, and iterate on chunking and metadata — parser quality is proven by retrieval quality.

Common pitfalls

  • Chunking by fixed size across table boundaries — half a table in each of two chunks retrieves as nonsense; keep structural units atomic.
  • No dedup / idempotent re-ingestion — re-running the pipeline duplicates chunks and corrupts results; content-hash IDs solve this.
  • Dropping page numbers and section context — users can't verify answers without citations; metadata is a feature, not overhead.
  • Indexing boilerplate (headers, footers, legal disclaimers on every page) — pollutes retrieval with repeated near-identical chunks; strip it.
  • One chunk size for all content — dense technical prose and sparse slides need different strategies; tune per document type.
  • Evaluating the embedder while the parser is broken — if chunks are dirty, no embedding model saves you; fix the pipeline bottom-up.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills242026년 10월 10일 업데이트

Create 3D visuals with modeling, texturing, lighting, rendering, and optimization for web and product.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills242026년 10월 10일 업데이트

Create 3D web experiences: scene setup, models, materials, lighting, animation, scroll-driven scenes, and performance budgets. Use when adding 3D to websites beyond basic demos.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills242026년 10월 10일 업데이트

Writing abstracts that get papers read — structured content, the 5-sentence core, and journal-specific constraints.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills242026년 10월 10일 업데이트

Learn effectively from courses and academies: choosing programs, studying actively, and converting courses into skills. Use when investing time/money in structured learning.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills242026년 10월 10일 업데이트

Audit designs for accessibility with WCAG checklists covering color, type, focus, motion, and content.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills242026년 10월 10일 업데이트

aicodedecode의 스킬 모두 보기

이 스킬의 문제 신고