google/langextract
A Python library for extracting structured information from unstructured text using LLMs with precise source grounding and interactive visualization. observed · 2026-08-28
Health v2 · maintenance only
82/100
- Activity 98
- Release rhythm 91
- Longevity 30
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 10
- age_days: 421
- days_rel: 62
- days_push: 14
- n_releases_24m: 18
Adoption not part of the score
38490 stars · 2707 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
LangExtract is a Python library that uses LLMs to extract structured information from unstructured text based on user-defined instructions and few-shot examples. It grounds every extraction to its exact character span in the source text and provides interactive visualization for traceability.
Use cases
- extract structured data from clinical notes with llm
- parse entities from unstructured text with source citations
- extract medications from doctor reports
- structure radiology reports into
- highlight extracted fields back in the original document
- run information extraction with gemini or openai models
- use local llms with ollama for text extraction
When to choose
- you need structured extractions that are verifiably grounded to exact source text spans
- you want schema-consistent LLM outputs enforced via few-shot examples
- you need to work with clinical or long documents requiring traceability
- you want provider flexibility across Gemini, OpenAI, or local Ollama models
When to avoid
- you need fully offline extraction without any LLM
- you want a general-purpose NLP pipeline beyond information extraction
- you cannot send text to cloud LLM APIs and lack local model infrastructure
- you need high-throughput extraction with minimal LLM cost
Facets
library · maturity active
nlp llm-inference data-science rag large-language-models artificial-intelligence data-science python information-extraction structured-output source-grounding gemini openai ollama few-shot natural-language-processing
3 sources
- readme: https://github.com/google/langextract · fetched 2026-08-28 · a5025496853a
- homepage: https://pypi.org/project/langextract/ · fetched 2026-08-29 · 4b4e8fead74a
- registry_pypi: https://pypi.org/pypi/langextract/json · fetched 2026-08-29 · b265d3fc8fc4
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| google/langextract | main | 82 |
For agents
markdown · JSON · MCP: product_card(name="google/langextract")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem