From llamacloud
This skill should be used when the user wants to "classify documents", "route documents by type", define "document classification rules", or "categorize incoming files" with LlamaCloud Classify. Owns natural-language classification and intake routing; defers segmenting one file into sub-docs to llamacloud-split, typed field extraction to llamacloud-extract, and raw text to llamacloud-parse.
How this skill is triggered — by the user, by Claude, or both
Slash command
/llamacloud:llamacloud-classifyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Assign one user-defined category to each document using natural-language rules, with a
Assign one user-defined category to each document using natural-language rules, with a confidence score and a reasoning explanation per result. Use Classify as a router: send a mixed inbox of invoices, receipts, contracts, and statements to the correct per-type downstream pipeline.
Reach for Classify when the goal is to label or route whole documents by type before doing anything expensive or type-specific with them:
Classify answers "what kind of document is this?" It does not pull fields out, does not turn pages into text, and does not break a bundle into pieces. Those are siblings (see Boundaries).
The value is avoiding work: classification is cheap relative to extraction or parsing, so a Classify gate at the front of a pipeline lets the expensive, type-specific stages run only on the documents they apply to — and lets each stage assume it is seeing the type it was built for. A single mixed inbox becomes a set of clean, single-type streams.
Classify is beta and subject to breaking changes. Design for that:
See references/classification-design.md for the confidence-gating pattern in full.
type label and a natural-language
description of what content belongs to it.type, confidence
(0.0–1.0), and reasoning.A rule's type label is constrained to alphanumerics, spaces, hyphens, and underscores
(e.g. invoice, 10-K, purchase-order). The description is free natural language and
is where almost all of the accuracy comes from — invest there.
Each result carries three fields, all of which matter operationally:
type — the predicted category. This is what downstream branches on.confidence — 0.0–1.0. This is what you gate routing on (see Beta posture). Never act on
type while ignoring confidence.reasoning — the model's stated justification. This is the primary tool for debugging
misclassifications: it tells you why a document landed where it did, so you know which
rule description to sharpen.Plan the downstream branch for each type up front, including what happens on the
catch-all category and on low confidence, before wiring routing — those two lanes are where
unhandled documents leak.
Two modes trade cost against visual understanding. Choose by what carries the signal, not by file format:
| Signal lives in… | Mode |
|---|---|
| Plain text, headers, field labels, layout-in-text | Fast |
| Handwriting, scans, stamps, charts, logos, photos | Multimodal |
Fast is cheaper; Multimodal costs more per page but reads visual cues. If text alone reliably distinguishes your categories, stay on Fast. Move to Multimodal only when the distinguishing feature is something a text extractor would lose. Confirm current per-page credit costs live (see Fetching facts) — do not assume fixed numbers.
Rules are prompts. The model picks the category whose description best matches the document, so descriptions must be discriminative, not merely accurate.
other) so genuinely-unmatched documents land
somewhere explicit instead of being forced into the nearest wrong bucket.reasoning on
misclassifications, then sharpen the description that lost. The reasoning field is the
primary debugging tool.Common rule-writing mistakes: writing descriptions that are accurate but not discriminative (every type "contains text and numbers"); omitting the catch-all so off-distribution documents are forced into a wrong bucket; and over-splitting into categories whose only difference downstream is the label. Resist adding a category until a downstream step actually treats it differently.
Taxonomy design (mutually-exclusive + collectively-exhaustive categories, handling
multi-type documents, granularity, and the full failure-mode table) is covered in
references/classification-design.md. Consult it before designing a category set or
diagnosing low accuracy.
Python (llama-cloud-services) — illustrative; confirm the exact current package, client,
and method names via the MCP before relying on them:
# from the llama-cloud-services classify client
rules = [
{"type": "invoice", "description": "Has an invoice number, bill-to block, line items, and payment terms."},
{"type": "receipt", "description": "Short POS purchase record; no bill-to section or payment terms."},
{"type": "other", "description": "Anything not matching the categories above."},
]
result = client.classifier.classify(files=[...], rules=rules, mode="FAST")
for item in result.items:
print(item.result.type, item.result.confidence, item.result.reasoning)
TypeScript follows the same shape (define rules, submit with a mode, read
type / confidence / reasoning per item). For exact signatures, parameter names, and
the current package, look them up live rather than copying the above.
A concrete intake router for a mixed accounts-payable inbox, to make the pieces concrete:
invoice, receipt,
other — no finer, because nothing downstream branches finer.invoice: "has an invoice number, a bill-to
block, line items, and payment terms." receipt: "short POS purchase record; unlike an
invoice it has no bill-to section or payment terms." other: "anything not matching the
above." The contrast clause on receipt is what prevents the two from colliding.invoice/receipt → their pipelines.
Low-confidence or other → human-review queue. Job error → retry, then dead-letter.type, confidence, reasoning for every file. When accuracy drifts, read the
reasoning on the misses and sharpen the one description that lost — do not rewrite the
whole rule set.If step 1's inbox were instead one merged PDF containing many stapled-together documents, the router would be wrong from the start: Split it first, then run this flow on each piece. See Boundaries.
llamacloud-split, then run Classify on each piece. Classify
assigns a single type to a whole file; it will not carve a bundle apart.llamacloud-extract.
A common pattern is Classify → pick schema by type → Extract.llamacloud-parse.llamacloud.Treat package names, client/method signatures, parameter names, mode enum values, and per-page credit costs as live lookups, not memorized constants:
mcp__plugin_llamacloud_docs__search_docs — concept/BM25 search.mcp__plugin_llamacloud_docs__read_doc — read a known doc page.mcp__plugin_llamacloud_docs__grep_docs — exact symbol/regex search.index.md to any https://developers.llamaindex.ai/... page URL and
WebFetch it.Anchor docs for this pillar:
https://developers.llamaindex.ai/llamaparse/classify/https://developers.llamaindex.ai/llamaparse/classify/sdk/https://developers.llamaindex.ai/reference/resources/classify/npx claudepluginhub jbaham2/llamacloud-plugin --plugin llamacloudGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.