L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Productivité · SKILL.md

extraction

extraction

Build robust LangExtract extraction pipelines with examples, schemas, prompt validation, resolver tuning, chunking, and tokenizers.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

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

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.
  • JSONL save/load and HTML visualization belong in visualization.
  • Custom provider package authoring belongs in provider-plugins.

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.
Skills enregistrées