All skills
langextract-usage
Write working LangExtract code that calls lx.extract() to pull structured data from text.
- Part of google/langextract
- 42 installs
- AI Engineering · Knowledge bases
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.
More Knowledge bases skills
See all- caveman-explore148kExplores the repository read-only to locate code across files, returning only path and line citations.
- graphify17.1kBuilds a knowledge graph of your codebase and answers questions about its architecture and file relationships.
- rag-implementation15.2kBuilds retrieval-augmented generation systems that let an LLM answer from your own documents using vector search.
- embedding-strategies12.3kChooses and tunes embedding models and chunking for semantic search and RAG.