Find your next open-source project

Search by name, purpose, or keyword, or paste a GitHub URL. Start with / to search agent skills (e.g. /pdf)
All skills

langextract-usage

Write working LangExtract code that calls lx.extract() to pull structured data from text.

When to use it

You have raw text and a rough idea of the fields you want, but still need to define examples and a working lx.extract() call.

For example

You say

Use langextract-usage to write a script that extracts drug names and dosages from clinical notes, with one example and JSONL output.

You get
  • Python extraction script
  • ExampleData with extractions
  • results.jsonl output

How it works

  • Examples must use verbatim extraction_text from the example text; alignment warnings flag mismatches.
  • Set prompt_validation_level to ERROR to fail fast on bad examples during development.
  • Filter extractions with char_interval to keep only those grounded in the source text.

Before installing

You need an API key for your chosen model provider (Gemini or OpenAI), or a running Ollama server for local models.

This skill includes 3 scripts your assistant may run on your computer.