document-workflows
यह क्या करती है
यह स्किल पढ़ने, निकालने और छाँटने के चरणों को पूरे workflows में जोड़ना दिखाती है, फ़ाइलों के बैच के लिए। यह उन डेवलपर्स के लिए है जो बड़ी मात्रा में इनवॉइस, फ़ॉर्म या दूसरे दस्तावेज़ प्रोसेस करने वाले सिस्टम बनाते हैं।
कब इस्तेमाल करें
- ✓जब आपको एक बैच में बहुत सारे दस्तावेज़ प्रोसेस करने हैं।
- ✓जब आप chunking के साथ दस्तावेज़ AI खोज सिस्टम के लिए तैयार करना चाहते हैं।
- ✓जब आप निकाले गए दस्तावेज़ नतीजे डेटाबेस में लोड करना चाहते हैं।
Skill का लिंक
https://github.com/andrewyng/context-hub/blob/main/content/landingai/skills/ade/document-workflows/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं अपने फ़ोल्डर के सारे इनवॉइस प्रोसेस करना और उनका कुल अपने डेटाबेस में डालना चाहता हूँ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल पढ़ने, निकालने और छाँटने वाले चरणों के लिए तैयार पैटर्न देती है, जिनमें एरर हैंडलिंग और समानांतर प्रोसेसिंग है। एजेंट कोड लिखने से पहले एक नमूना दस्तावेज़ जाँचता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Document Workflows — ADE Pipeline Patterns
Overview
This skill provides reusable building blocks for composing LandingAI ADE
primitives (parse, extract, split) into production-ready document processing
pipelines. It complements the document-extraction skill:
| Concern | document-extraction |
document-workflows |
|---|---|---|
| Scope | ADE SDK API: parse, extract, split, grounding | End-to-end pipelines: batch, RAG, DB, classify-route |
| When | Need to call a single ADE operation | Need to compose operations into a workflow |
| Code | SDK method calls with parameters | Complete functions with error handling, parallelism |
| Deps | landingai-ade only |
+ workflow-specific libs (pandas, chromadb, etc.) |
Philosophy: Organize by workflow pattern (batch, RAG, DB insertion), not by document type. The same pattern applies whether documents are invoices, utility bills, or medical forms.
Step 0 (mandatory) — Pre-Flight Document Exploration {#pre-flight}
Run this before writing any pipeline code whenever working with documents whose internal structure has not already been inspected in this session.
Rule: never write section-detection, heading-matching, or text-search code without first running Tool 2 (diagnostic parse) on the sample document. Heading format is document-specific and cannot be inferred from the task description or document type alone — the only reliable way to know it is to look at the actual ADE output.
Common surprises: a paper's "Introduction" heading may appear as
1. Introduction(plain text, no#),## Introduction,INTRODUCTION(all-caps), or embedded inside a text chunk with body copy. Getting this wrong means a silent failure (zero chunks matched) that requires a full re-parse to debug.
Run Tool 1 (visual render) and Tool 2 (diagnostic parse) on 1–3 representative sample documents before writing any code. This takes under a minute and prevents debugging iterations that a pre-flight would have avoided.
Tool 1 — Visual page render
Render 1–2 pages as PNG and read them as visual context. No ADE credits used, but each PNG consumes context tokens. Use when layout is ambiguous or document origin is unknown (handwriting? scan? form?).
.venv/bin/python - << 'EOF'
import pymupdf
from pathlib import Path
from PIL import Image
pdf = Path('path/to/sample.pdf')
out_dir = Path('/tmp/ade_preflight'); out_dir.mkdir(exist_ok=True)
doc = pymupdf.open(pdf)
for pg in range(min(2, len(doc))): # first 2 pages only
pix = doc[pg].get_pixmap(matrix=pymupdf.Matrix(1.5, 1.5)) # 108 DPI
img = Image.frombytes("RGB", [pix.width, pix.height], pix.samples)
out = out_dir / f"{pdf.stem}_page{pg + 1}.png"
img.save(out)
print(out)
doc.close()
EOF
Then read the saved PNGs. Immediately answers:
- Are headings bold text (→ ADE may output plain-text heading, not
# Heading) - Is the document handwritten or scanned? → Tesseract OCR needed, not PyMuPDF
- Single-column or two-column layout?
- Any noise: running headers, page numbers, watermarks, stamps?
Tool 2 — ADE diagnostic parse
Parses 1 sample and prints markdown structure + chunk inventory. Uses ADE credits — keep to 1–3 samples only, never the full corpus.
.venv/bin/python - << 'EOF'
import os
from pathlib import Path
from collections import Counter
from dotenv import load_dotenv
# Load API key: prefer existing env var, then .env file lookup
load_dotenv() # Load API key from .env. Add a path to the .env if needed.
from landingai_ade import LandingAIADE
client = LandingAIADE()
pr = client.parse(document=Path('path/to/sample.pdf'))
print("=== MARKDOWN (first 80 lines) ===")
for i, ln in enumerate(pr.markdown.splitlines()[:80], 1):
print(f"{i:3}: {ln}")
print("\n=== CHUNKS ===")
for ch in pr.chunks:
txt = (ch.markdown or '').replace('\n', ' ')[:70]
b = ch.grounding.box
print(f"p{ch.grounding.page} {ch.type:12} "
f"l={b.left:.2f} t={b.top:.2f} r={b.right:.2f} b={b.bottom:.2f} | {txt}")
print(f"\nPages: {pr.metadata.page_count} "
f"Chunks: {len(pr.chunks)} "
f"Types: {dict(Counter(ch.type for ch in pr.chunks))}")
EOF
Cost note: Save the parse result with
pr.model_dump()to a JSON file after the first run. Load it for later development instead of callingclient.parse()again. Only re-parse when the document set changes.
What to look for
|
अक्सर पूछे जाने वाले सवाल
क्या पहले नमूना दस्तावेज़ देखना ज़रूरी है?
हाँ। स्किल सेक्शन या हेडिंग का कोड लिखने से पहले नमूना दस्तावेज़ जाँचना ज़रूरी बताती है।
कौन-से डेटाबेस बताए गए हैं?
नतीजे Snowflake जैसे डेटाबेस में लोड करने का ज़िक्र है।
यह दस्तावेज़ निकालने वाली स्किल से कैसे अलग है?
वह स्किल एकल सेवा कॉल कवर करती है, जबकि यह कई चरणों से बने पूरे workflows कवर करती है।
जानकारी
लेखक का मूल विवरण
Use this skill for building end-to-end document processing workflows and pipelines using LandingAI ADE. Trigger when users need to: (1) Process batches of documents in parallel or async, (2) Build classify-then-extract pipelines for mixed document types, (3) Prepare parsed documents for RAG systems with chunking and vector DB ingestion, (4) Load extraction results into databases like Snowflake or export to CSV/DataFrames, (5) Visualize extraction results: draw bounding box overlays on pages, crop chunk images, or highlight/annotate specific words or phrases found in documents, (6) Build Stream
repo: andrewyng/context-hub
लोकप्रियता
- GitHub स्टार
- 14k
- रैंकिंग में स्थान
- #11272
- लाइसेंस
- MIT
- अपडेट की गई
- 31/5/2026
कमेंट
- …
इस repository की और skills
get-api-docs
14kयह आपके एजेंट को कोड लिखने से पहले तीसरे पक्ष के API और लाइब्रेरी का ताज़ा दस्तावेज़ लाने में मदद करती है, पुरानी याददाश्त पर भरोसा करने के बजाय।
bloc-cubit
14kयह आपके एजेंट को Bloc या Cubit से Flutter ऐप की स्थिति संभालना सिखाती है, कब कौन-सा चुनें और टेस्टिंग के लिए सुरक्षित डिफ़ॉल्ट क्या हों।
riverpod
14kयह आपके एजेंट को Riverpod से Flutter ऐप की स्थिति संभालना सिखाती है, providers, async डेटा और टेस्टिंग सहित, हर स्थिति के लिए ठीक डिफ़ॉल्ट के साथ।
document-extraction
14kयह आपके एजेंट को PDF, इमेज और स्प्रेडशीट पढ़ने, उन्हें साफ़ टेक्स्ट में बदलने, और LandingAI की ADE सेवा से इनवॉइस कुल जैसे फ़ील्ड निकालने में मदद करती है।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।