Langsung ke konten
Skillpedia
PDF, Word & slide9.5k ยท #12273

xberg-picking-a-format

Fungsinya

Skill ini menjelaskan format keluaran mana yang sebaiknya dipilih saat mengambil teks dari dokumen. Skill ini ditujukan untuk orang yang memasukkan hasilnya ke alat AI, database pencarian, atau perangkat lunak lain.

Kapan dipakai

  • โœ“Saat Anda mengirim teks hasil ekstraksi ke model AI dan menginginkan keluaran yang bersih.
  • โœ“Saat Anda memasukkan dokumen ke vector store atau indeks pencarian.
  • โœ“Saat Anda membutuhkan keluaran terstruktur yang bisa dibaca program lain.

Link skill

https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-picking-a-format/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-picking-a-format/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya sedang mengekstrak dokumen untuk chatbot AI saya. Format keluaran apa yang sebaiknya saya pakai?โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mencocokkan pengguna keluaran dengan format dan pengaturan konten yang tepat, misalnya markdown untuk model AI atau JSON untuk program, dan juga bisa menghapus spasi berlebih.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 markdown as 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 plain only when downstream cannot tolerate any markup.
  • Reach for djot only if you're already in a djot/pandoc pipeline.
  • Reach for html only when re-rendering for the web.
  • Reach for json for a heading-driven content tree, or doctags for 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.

Pertanyaan umum

Apa bedanya format dan format konten?

Format mengatur cara perintah mencetak hasil, sedangkan format konten mengatur cara teks di dalamnya ditulis.

Format apa yang cocok untuk model AI?

Skill menyarankan keluaran teks atau markdown untuk konteks model AI.

Apa yang dilakukan pengurangan token?

Pengurangan token menghapus spasi berlebih dan teks standar yang tidak perlu, dalam tingkatan dari mati sampai maksimum, untuk menghemat ruang dalam prompt AI.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
9.5k
Peringkat
#12273
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa