xberg-picking-a-format
यह क्या करती है
यह स्किल बताती है कि दस्तावेज़ों से टेक्स्ट निकालते समय कौन सा आउटपुट फ़ॉर्मेट चुनें। यह उन लोगों के लिए है जो नतीजे AI टूल, सर्च डेटाबेस या दूसरे सॉफ़्टवेयर में डालते हैं।
कब इस्तेमाल करें
- ✓जब आप निकाला गया टेक्स्ट AI मॉडल को भेज रहे हों और साफ़ आउटपुट चाहिए।
- ✓जब आप दस्तावेज़ वेक्टर स्टोर या सर्च इंडेक्स में डाल रहे हों।
- ✓जब आपको संरचित आउटपुट चाहिए जिसे कोई दूसरा प्रोग्राम पढ़ सके।
Skill का लिंक
https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-picking-a-format/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं अपने AI चैटबॉट के लिए दस्तावेज़ निकाल रहा हूँ। मुझे कौन सा आउटपुट फ़ॉर्मेट इस्तेमाल करना चाहिए?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट आउटपुट के उपभोक्ता को सही फ़ॉर्मेट और कंटेंट सेटिंग से मिलाता है, जैसे AI मॉडल के लिए markdown या प्रोग्राम के लिए JSON, और अतिरिक्त खाली जगह हटा भी सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Picking a format
Xberg has two orthogonal format knobs. Get them right up front and the downstream code stays simple.
| Knob | What it controls | Values | Default |
|---|---|---|---|
--format |
How the CLI prints the result | text, json, toon |
text (extract), json (batch) |
--content-format |
How extracted content is rendered inside result |
plain, markdown, djot, html, json, doctags |
plain |
--token-reduction |
Strip whitespace / boilerplate for LLM contexts | off, light, moderate, aggressive, maximum |
off |
--format json returns an envelope wrapping the ExtractedDocument — the
document lives under .result for extract and under .results[] for
batch, with content, metadata, tables, and images as fields of
that nested document. --format text prints just content.
--content-format is what shows up inside that content field.
Decision tree
Who consumes the output?
├── LLM (Claude, GPT, Gemini, local) — embed/prompt context
│ --format text --content-format markdown
├── Vector store / RAG indexer
│ --format json --content-format markdown
│ (markdown preserves structure for chunking)
├── Downstream parser that expects machine-readable JSON
│ --format json --content-format plain
│ (cleanest text + structured metadata)
├── Human review / archival
│ --format text --content-format markdown
├── HTML re-rendering / web display
│ --format json --content-format html
├── Lossless intermediate for pandoc / academic tooling
│ --format json --content-format djot
└── Token-budget-constrained pipeline
--format text --content-format plain
(drops markup; add --token-reduction moderate for further savings)
Examples
Feed a PDF directly into an LLM:
xberg extract paper.pdf --content-format markdown
Index a corpus into a RAG store with tables and headings preserved:
xberg batch docs/*.pdf --format json --content-format markdown \
| jq -c '.result | {content: .content, tables: .tables}'
Strip a file to bare text for a token-tight summarizer:
xberg extract long.pdf \
--content-format plain \
--token-reduction moderate
Pull metadata only, ignore content:
xberg extract file.pdf --format json | jq '.result.metadata'
When in doubt
- Default to
markdownas the content format. It is the best compromise across LLMs, RAG, and human review, and Xberg has the most faithful renderer for it. - Reach for
plainonly when downstream cannot tolerate any markup. - Reach for
djotonly if you're already in a djot/pandoc pipeline. - Reach for
htmlonly when re-rendering for the web. - Reach for
jsonfor a heading-driven content tree, ordoctagsfor Docling-compatible output.
Token-reduction (orthogonal)
--token-reduction collapses whitespace, strips repeated headers/footers,
and trims boilerplate. It composes with any --content-format:
off(default),light,moderate,aggressive,maximum.
Use moderate as a safe starting point for LLM context windows. maximum
is lossy — verify before relying on it.
See ../../references/cli-reference.md for the full flag set and
../../references/configuration.md for the equivalent output_format and
token_reduction keys in xberg.toml.
अक्सर पूछे जाने वाले सवाल
फ़ॉर्मेट और कंटेंट फ़ॉर्मेट में क्या अंतर है?
फ़ॉर्मेट तय करता है कि कमांड नतीजा कैसे प्रिंट करे, जबकि कंटेंट फ़ॉर्मेट तय करता है कि उसके अंदर का टेक्स्ट कैसे लिखा जाए।
AI मॉडल के लिए कौन सा फ़ॉर्मेट ठीक है?
स्किल AI मॉडल के संदर्भ के लिए टेक्स्ट या markdown आउटपुट सुझाती है।
टोकन कम करने से क्या होता है?
यह अतिरिक्त खाली जगह और बॉयलरप्लेट हटाता है, बंद से अधिकतम तक के स्तरों में, ताकि AI प्रॉम्प्ट में जगह बचे।
जानकारी
लेखक का मूल विवरण
Use when choosing an output format for extracted documents — plain text, markdown, djot, HTML, JSON, or DocTags. Maps consumer (LLM, parser, archive) to the right `--format` / `--content-format` pair.
repo: xberg-io/xberg
लोकप्रियता
- GitHub स्टार
- 9.5k
- रैंकिंग में स्थान
- #12273
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
xberg-batch-extraction
9.5kआपके एजेंट को Xberg के साथ एक साथ कई दस्तावेज़ प्रोसेस करने में मदद करती है। विकल्पों का एक सेट साझा होता है, समानांतर काम सीमित रहता है, और विफल फ़ाइलें पूरे रन को नहीं रोकतीं।
xberg-chunking
9.5kआपके एजेंट को लंबे दस्तावेज़ों का टेक्स्ट AI प्रॉम्प्ट या सर्च इंडेक्स के लिए छोटे टुकड़ों में बाँटने में मदद करती है, तय आकार और वैकल्पिक ओवरलैप के साथ।
xberg-extracting-keywords
9.5kआपके एजेंट को दस्तावेज़ से मुख्य कीवर्ड या मुख्य वाक्यांश निकालने और उसकी भाषा पहचानने में मदद करती है, Xberg की कीवर्ड सेटिंग के साथ।
xberg-extracting-tables
9.5kआपके एजेंट को PDF, स्प्रेडशीट और छवियों से तालिकाएँ निकालने में मदद करती है, पंक्तियाँ और कॉलम markdown या संरचित डेटा के रूप में सही रखते हुए।
मिलती-जुलती skills
feishu-doc
394kयह आपके एजेंट को document टूल से Feishu क्लाउड दस्तावेज़ पढ़ने, बनाने और बदलने में मदद करती है, जिसमें टेक्स्ट, इमेज और टेबल शामिल हैं।
feishu-drive
394kयह आपके एजेंट को बॉट के साथ साझा किए गए Feishu क्लाउड फ़ोल्डर में फ़ाइलें देखने, व्यवस्थित करने और उन पर टिप्पणी करने देती है।
feishu-perm
394kयह आपके एजेंट को Feishu फ़ाइल तक किसकी पहुंच है, यह जांचने और बदलने देती है, और आपके अनुरोध के लिए सबसे छोटी अनुमति चुनती है।