Skip to content
Back to skills

Extraction

ASecurity

"Build robust LangExtract extraction pipelines with examples,

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
developmentrustapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill extraction --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Extraction?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Extraction
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-extraction-arex-skill/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-extraction-arex-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: extraction
description: "Build robust LangExtract extraction pipelines with examples,
  schemas, prompt validation, resolver tuning, chunking, and tokenizers."
metadata:
  disco-role: operating
disable-model-invocation: true
license: Apache 2.0
---

# LangExtract Extraction

Use this sub-skill when the task is to design, write, review, or debug calls to
`lx.extract()` and the core data objects that make extraction reliable and
source-grounded.

## Load first

- Read [references/workflows.md](references/workflows.md) for extraction input
  shapes, prompt/example contracts, output schemas, validation, resolver
  parameters, tokenizers, and result handling.
- Read [references/troubleshooting.md](references/troubleshooting.md) when an
  extraction call fails, returns ungrounded spans, has schema/fence conflicts,
  or behaves poorly on long or non-spaced-language documents.
- Use [scripts/basic_extraction.py](scripts/basic_extraction.py) as a safe
  starter script for example-based extraction.
- Use [scripts/output_schema_extraction.py](scripts/output_schema_extraction.py)
  as a safe starter script for schema-constrained extraction.

## Best-fit tasks

- Create basic or relationship extraction prompts with `lx.data.ExampleData`
  and `lx.data.Extraction`.
- Choose between plain text input, trusted URL string input with `fetch_urls`,
  and iterable `lx.data.Document` inputs.
- Tune long-document parameters such as `max_char_buffer`, `batch_length`,
  `max_workers`, `extraction_passes`, and `context_window_chars`.
- Use `lx.schema.extraction_item_schema()` and
  `lx.schema.extractions_schema()` with `output_schema`.
- Enforce prompt/example quality with `PromptValidationLevel` and
  `prompt_validation_strict`.
- Tune resolver alignment and parsing through `resolver_params`.
- Select `RegexTokenizer` versus `UnicodeTokenizer` and filter grounded
  `AnnotatedDocument` results by `char_interval` and `AlignmentStatus`.

## Route elsewhere

- Provider credentials, model routing, Gemini/OpenAI/Ollama/Vertex settings,
  provider kwargs, and batch APIs belong in [providers](../providers/SKILL.md).
- JSONL save/load and HTML visualization belong in
  [visualization](../visualization/SKILL.md).
- Custom provider package authoring belongs in
  [provider-plugins](../provider-plugins/SKILL.md).

## Operating checklist

1. Define the extraction classes and attributes before writing examples.
2. Make every example `extraction_text` a verbatim substring of the example
   text and keep extractions in source order.
3. Add examples unless an explicit `output_schema` is present; examples are
   still useful with schemas because they teach the prompt.
4. Validate examples in development with `PromptValidationLevel.ERROR` and
   `prompt_validation_strict=True`.
5. For long documents, start with small samples and scale `max_char_buffer`,
   `batch_length`, `max_workers`, and `extraction_passes` deliberately.
6. Treat `char_interval is None` as ungrounded output until diagnosed or
   intentionally filtered out.

Files in this skill

  • SKILL.md3 KB
  • references/troubleshooting.md11.1 KB
  • references/workflows.md14.5 KB
  • scripts/basic_extraction.py10 KB
  • scripts/output_schema_extraction.py6.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.