document-extraction
यह क्या करती है
यह स्किल LandingAI की Agentic Document Extraction सेवा से दस्तावेज़ पढ़ती है और आपको चाहिए वह जानकारी निकालती है। यह उन लोगों के लिए है जो फ़ॉर्म, इनवॉइस या टेबल से हाथ से टाइप किए बिना डेटा चाहते हैं।
कब इस्तेमाल करें
- ✓जब आपको PDF या स्कैन को संरचित Markdown टेक्स्ट में बदलना है।
- ✓जब आप दस्तावेज़ों से इनवॉइस नंबर या कुल जैसे खास फ़ील्ड निकलवाना चाहते हैं।
- ✓जब आपको मिश्रित दस्तावेज़ों के समूह को प्रकार के हिसाब से छाँटना है।
Skill का लिंक
https://github.com/andrewyng/context-hub/blob/main/content/landingai/skills/ade/document-extraction/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं यह इनवॉइस PDF पढ़वाना चाहता हूँ और इनवॉइस नंबर, तारीख और कुल एक टेबल में चाहिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट आपकी API key से ADE टूल सेट करता है, दस्तावेज़ सेवा को भेजता है, और आपके माँगे टेक्स्ट या फ़ील्ड लौटाता है। काम करने के लिए ADE API key चाहिए।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Document Extraction (ADE)
Overview
LandingAI's Agentic Document Extraction (ADE) is a document processing SaaS that parses, extracts, and classifies documents without requiring templates or training. It provides three main capabilities:
- Parse: Convert documents into structured Markdown with hierarchical JSON representation
- Extract: Pull specific structured data using JSON schemas or Pydantic models
- Split: Classify and separate multi-document batches by type
Key Benefits:
- No ML training or templates required
- Layout-agnostic parsing (works with any document structure)
- Supports 20+ file formats (PDF, images, spreadsheets, presentations)
- Precise visual grounding (bounding boxes, page numbers)
- Multiple models optimized for different document types
Quick Start
1. Installation
Never install packages globally without user approval. Always check for a local Python environment first.
1. .venv/bin/python — uv-managed (this project)
2. venv/bin/python — standard Python venv
3. uv run python — if pyproject.toml exists
4. poetry run python — if poetry.lock exists
5. python3 — system fallback; warn the user
Use the local environment to install: landingai-ade, python-dotenv
2. API Key Setup
The user may have already setup a .env file in the same directory as the document-extraction skill with the API key. You MUST check this path first (ls -la .*/skills/document-extraction/.env). Also try checking on the same directory as this SKILL.md file.
If not, provide instructions to create one. The script below will search for .env in common locations and load it.
.venv/bin/python - << 'EOF'
import os
from pathlib import Path
from dotenv import load_dotenv
# Load API key: prefer existing env var, then .env file lookup
if os.environ.get("VISION_AGENT_API_KEY"):
print("API key found in existing environment variable")
else:
def _find_env():
for d in [Path.cwd().resolve(), *Path.cwd().resolve().parents]:
for candidate in [
# ADD the directory where the document-extraction skill is located
d / '.env',
d / 'document-extraction/.env',
d / 'skills/document-extraction/.env',
]:
if candidate.is_file():
return candidate
return None
env = _find_env()
if env:
load_dotenv(env)
print(f"API key loaded from: {env}")
else:
print("Warning: VISION_AGENT_API_KEY not set and no .env found")
EOF
If not key is found instruct the user to get an API key from https://va.landing.ai/settings/api-key
Copy .env-sample to .env and add your API key:
cp .env-sample .env
Edit .env and add your key:
VISION_AGENT_API_KEY=your_actual_api_key_here
Note: The .env file is gitignored for security. Advanced users can also set the environment variable directly: export VISION_AGENT_API_KEY=<your-key>
EU Endpoint: If using the EU endpoint, set environment="eu" when initializing the client.
3. Basic Parse Example
from dotenv import load_dotenv
load_dotenv() # Load API key from .env
from landingai_ade import LandingAIADE
from pathlib import Path
client = LandingAIADE()
# Parse a document
response = client.parse(
document=Path("document.pdf"),
model="dpt-2-latest"
)
# Access results
print(f"Pages: {response.metadata.page_count}")
print(f"Chunks: {len(response.chunks)}")
print("\nMarkdown output:")
print(response.markdown[:500]) # First 500 chars
# Save Markdown for extraction
with open("output.md", "w", encoding="utf-8") as f:
f.write(response.markdown)
4. Basic Extract Example
from dotenv import load_dotenv
load_dotenv()
from landingai_ade import LandingAIADE
from landingai_ade.lib import pydantic_to_json_schema
from pydantic import BaseModel, Field
from pathlib import Path
# Define extraction schema using Pydantic
class Invoice(BaseModel):
invoice_number: str = Field(description="Invoice number")
invoice_date: str = Field(description="Invoice date")
total_amount: float = Field(description="Total amount in USD")
vendor_name: str = Field(description="Vendor name")
# Convert to JSON schema
schema = pydantic_to_json_schema(Invoice)
client = LandingAIADE()
# Extract from parsed markdown
response = client.extract(
s
अक्सर पूछे जाने वाले सवाल
कौन-से फ़ाइल प्रकार चलते हैं?
स्किल बताती है कि यह PDF, इमेज, स्प्रेडशीट और प्रेज़ेंटेशन के साथ 20 से ज़्यादा फ़ॉर्मेट में काम करती है।
क्या हर दस्तावेज़ के लिए टेम्पलेट चाहिए?
नहीं। स्किल कहती है कि यह हर लेआउट के लिए टेम्पलेट या ट्रेनिंग के बिना काम करती है।
मेरी API key कहाँ रहती है?
स्किल उसे प्रोजेक्ट फ़ोल्डर की एक लोकल .env फ़ाइल से पढ़ती है।
जानकारी
लेखक का मूल विवरण
Use this skill for intelligent document processing and content extraction using LandingAI's Agentic Document Extraction (ADE). Trigger when users need to (1) Parse documents (PDFs, images, spreadsheets, presentations) into structured Markdown with layout understanding, (2) Extract specific structured data from documents using schemas (invoice fields, form data, table data, etc.), (3) Classify and separate multi-document batches by type (invoices vs receipts, statements vs forms, etc.), (4) Process large documents asynchronously (up to 1GB/1000 pages), (5) Get visual grounding (bounding boxes,
repo: andrewyng/context-hub
लोकप्रियता
- GitHub स्टार
- 14k
- रैंकिंग में स्थान
- #11271
- लाइसेंस
- MIT
- अपडेट की गई
- 31/5/2026
कमेंट
- …
इस repository की और skills
get-api-docs
14kयह आपके एजेंट को कोड लिखने से पहले तीसरे पक्ष के API और लाइब्रेरी का ताज़ा दस्तावेज़ लाने में मदद करती है, पुरानी याददाश्त पर भरोसा करने के बजाय।
bloc-cubit
14kयह आपके एजेंट को Bloc या Cubit से Flutter ऐप की स्थिति संभालना सिखाती है, कब कौन-सा चुनें और टेस्टिंग के लिए सुरक्षित डिफ़ॉल्ट क्या हों।
riverpod
14kयह आपके एजेंट को Riverpod से Flutter ऐप की स्थिति संभालना सिखाती है, providers, async डेटा और टेस्टिंग सहित, हर स्थिति के लिए ठीक डिफ़ॉल्ट के साथ।
document-workflows
14kयह आपके एजेंट को ऐसी दोहराई जा सकने वाली पाइपलाइन बनाने में मदद करती है जो एक साथ कई दस्तावेज़ प्रोसेस करें, उन्हें खोज टूल के लिए तैयार करें, और नतीजे डेटाबेस में लोड करें।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।