mrkeyoor.com_
Mon 09 Nov 20:36 UTC
AI Toolsevaluationupdated 25 Oct 2026

langextract review

LangExtract is a Python library for extracting structured information from text with an LLM and linking extracted phrases to source locations. Its README describes source grounding and interactive HTML review. Those features help people inspect output; they do not establish that a field or inferred attribute is correct.

+23stars / 7d
Verdict

Consider LangExtract when reviewers need to trace extracted phrases back to a document. Our September 25, 2026 run at commit 62b933a completed the install and build steps, but the test command failed with three named provider-plugin packaging or installation failures. That result does not prove extraction is broken. The record provides no measured extraction accuracy or throughput, and its three audit advisories have unknown scan coverage. Evaluate your chosen version, provider and document set before relying on the output. The three issues cited in this review are now marked closed as completed; those closures do not establish which released versions contain the fixes.

We ran it

Lab card: what happened when we ran langextractScreenshot of langextract (pypi.org/project/langextract)
Install✓ · 25s128 packages · 290 MB
Build✓ · 1s
Tests✗ · 82s877 passed · 3 failed · 20 skipped of 880 (pytest)
Known vulns3(pip-audit)
Repo150 files~41,621 lines of source · 13.1 MB · 11 CI workflows · Dockerfile · tests dir

Answers from our run

Does langextract build from source?

Dependencies installed in 25 seconds (128 packages), and the build succeeded in 1 seconds. We cloned commit 62b933a into a clean Debian container with 3 CPUs and no project-specific setup.

Do langextract's tests pass?

No. The project's own test command finished in 82 seconds and reported 877 passed, 3 failed, 20 skipped (pytest).

Does langextract have known vulnerabilities in its dependencies?

pip-audit flagged 3 known advisories in the dependency tree at the time of our run.

Who should not use langextract?

Workflows that require correct fields without validation or human review.

What are the alternatives to langextract?

Instructor, Presidio. Consider LangExtract when reviewers need to trace extracted phrases back to a document.

Setup3/5The September 25, 2026 run at 62b933a completed install and build steps in approximately 25 and 1 seconds. Provider setup and successful extraction were not established.
Docs4/5The supplied README covers installation, examples, grounding, providers, visualization and testing. This is documentation coverage, not verification of every example.
Community2/5Contribution and community-provider documentation plus three issues closed as completed provide limited evidence of participation. Adoption and support responsiveness are not measured.
Maturity3/5Release notes and the recorded test summary support a baseline. Three packaging or installation tests failed in the historical run; advisory coverage and extraction performance remain unknown.

Discussed on

  1. hnLangExtract: Python library for extracting structured data from language models166 points

Who it’s for

Python teams that need extracted fields linked to document spans.
Researchers and domain reviewers who want to inspect extractions in context.
Developers willing to evaluate prompts, examples and a specific provider configuration on representative documents.

Who it’s NOT for

Workflows that require correct fields without validation or human review.
Ollama users who require output_schema: the supplied README says this provider does not support it.
Teams seeking an approved clinical product: the medical examples are demonstrations, and the README says LangExtract is not an officially supported Google product.
Teams seeking proven extraction accuracy, throughput or provider compatibility from this review. Our recorded run does not establish those outcomes.

Setup reality

In our recorded run on September 25, 2026, at commit 62b933a, the install step succeeded in approximately 25 seconds and the build step succeeded in approximately 1 second. The record lists 128 dependencies and 290 MB of dependency disk use. These step results do not establish a working provider connection, an installed CLI or successful document extraction.

The test step exited with code 1 after approximately 82 seconds. Its log reported 877 passed, 3 failed, 20 skipped and 52 passing subtests. The parser's total of 880 is not a verified exhaustive count of unique tests. All three named failures concern provider-plugin installation or packaging. The tail includes a failure to import setuptools.build_meta; it does not establish the cause of every failure or prove that extraction is broken.

Pip-audit recorded 3 advisories across 1 package. Package names, advisory identifiers and the number of scanned packages are not supplied, so audit coverage and applicability remain unknown.

The README documents cloud credentials for Gemini, OpenAI and Vertex AI, plus local inference through Ollama. Local use still requires Ollama and a model download. Prompts, examples, provider configuration and output validation remain application work.

Choose it for reviewable source spans

A structured field is easier to check when a reviewer can find the phrase behind it. LangExtract's README describes an LLM extraction workflow that maps extracted text to source locations and produces an interactive HTML view. That is the main reason to consider it for document extraction.

You supply instructions and examples. The README recommends verbatim example extractions in source order and warns that a model can copy material from those examples into its answer. Extractions that cannot be located in the input receive char_interval = None.

Rejecting ungrounded items is a useful validation step. A matching phrase can still have the wrong label, and an attribute can contain an incorrect inference. Source grounding supports inspection; it does not certify correctness.

What our recorded run establishes

Our stored run is dated September 25, 2026, at 12:10:49.505 UTC and uses commit 62b933a2c757fd2bbb100498571b8d1692db4344. The recorded configuration has 3 CPUs, 8 GB of memory and image ghcr.io/astral-sh/uv:python3.12-bookworm. The install tail identifies Python 3.12.12 in the virtual environment.

The install step succeeded in 24.842 seconds, rounded to 25 seconds in the summary. The build step succeeded in 0.833 seconds, rounded to 1 second. The record lists 128 dependencies occupying 290 MB. The checkout contained 150 files, approximately 41,621 lines of source and 13.1 MB before dependencies, with 11 CI workflows, a Dockerfile and a tests directory.

These are recorded setup and repository observations. The supplied record does not expose the exact install or build command, establish an installed CLI, or demonstrate a provider-backed extraction workload. No new execution was performed for this correction.

The test step exited with code 1 after 82.404 seconds. Pytest's own summary reports 79.33 seconds, with 877 passed, 3 failed, 20 skipped, 94 warnings and 52 passing subtests. These are reported outcomes, not a reconciled count of exhaustive unique coverage. In particular, the parser's total of 880 must not be used as a denominator that accounts for all skipped tests and subtests.

All three named failures are in create_provider_plugin_test.py. They concern an offline-safe editable install, generated wheel and source-distribution packaging, and PEP 660 editable installation. The log tail includes BackendUnavailable: Cannot import 'setuptools.build_meta'. This identifies a build-backend import failure in the captured output, but the excerpt does not establish a common root cause for every failed test. It also does not show that LangExtract's extraction functionality is broken.

Pip-audit recorded 3 advisories across 1 package in that environment. The supplied record does not identify the package or advisories, and it does not give the number of scanned packages. Coverage, severity and applicability cannot be determined from these totals. The dependency count is not an audit-coverage count.

Provider setup remains a separate decision

The README documents Gemini, OpenAI, Vertex AI and local Ollama use, plus separately packaged custom providers. OpenAI requires its optional dependency. Vertex AI has project, location and service-account configuration. Ollama requires a local service and downloaded model.

The README says Gemini and supported OpenAI models can use output_schema, with or without few-shot examples. It explicitly says Ollama does not currently support output_schema. Check the exact provider path you intend to use rather than assuming configuration carries across providers.

For longer documents, the README demonstrates extraction_passes=3, max_workers=20 and a 1,000-character buffer. These are example settings, not our measured accuracy or speed results. Chunking and repeated passes should be evaluated against your documents and request budget.

Results can be saved as JSONL and visualized in HTML. The supplied current README also explicitly sets fetch_urls=True in its URL-input example; the README at our measured commit does not. Match documentation to the version you deploy instead of mixing examples from different revisions.

Historical reports are now closed

The supplied v1.7.0 release notes list repeated-mention alignment changes, provider-plugin generation and packaging fixes, Gemini settings forwarding, inference errors for unusable responses, and OpenAI routing changes. Those release notes describe upstream changes, not results measured in our sandbox. Our run used the later main-branch commit 62b933a rather than a clean v1.7.0 release checkout.

The current source extracts change how the older issue reports should inform adoption:

These are historical reports with recorded closure status, not three currently open blockers. The supplied extracts do not establish which published packages contain each fix, and we have not rerun the affected paths. Check your pinned version when these configurations matter.

The README also states that LangExtract is not an officially supported Google product. Its medical demonstration is not a finished or approved product and is not intended for diagnosis, treatment or medical advice.

How the ratings work

These editorial ratings use a five-point evidence rubric: 1 means a demonstrated major limitation, 2 means limited supporting evidence, 3 means a useful baseline with material limits, 4 means strong documented support with stated gaps, and 5 requires broad corroboration for the rated area. They are judgments about the supplied evidence, not benchmark scores. Unknown adoption, support responsiveness and compatibility do not earn high ratings.

Setup receives 3/5 because the recorded install and build steps succeeded, while provider setup and extraction remain unverified. Documentation receives 4/5 because the README covers installation, examples, grounding, providers, visualization and testing, although we have not validated every recipe. Community receives 2/5 because contribution instructions, community-provider documentation and issue follow-through provide limited evidence; they do not establish adoption or support quality. Maturity receives 3/5 because releases and reported test results provide a baseline, with unresolved limits in our historical run and no workload validation.

Decide by the output you need

Instructor documents Pydantic validation and automatic retries. Consider it when typed model responses are the main requirement. Presidio documents configurable identification and anonymization of PII. Consider it for that narrower task, while retaining its warning that automated detection can miss sensitive information. Neither comparison is a measured head-to-head result.

For LangExtract, start with a representative document set and one provider configuration. Record the package and model versions, prompt and examples. Check missing spans, incorrect labels and inferred attributes, then inspect the HTML output. Those checks address the decision this run leaves open: whether source-linked extraction is accurate enough for your documents.

Alternatives

ProjectWhat it isPick it when
InstructorUses Pydantic models for typed, validated LLM responses and documents automatic validation retries.Choose Instructor when your main requirement is a typed response with validation and retries. Evaluate source-span requirements separately; this comparison does not establish that Instructor cannot provide them.
PresidioProvides configurable PII identification and anonymization for text and images.Choose Presidio when identifying or anonymizing sensitive information is the task. Its documentation warns that automated detection cannot guarantee finding all sensitive information.

What people are saying

  1. [github-trending] google/langextract

Sources

  1. LangExtract README
  2. LangExtract v1.7.0 release
  3. Format type crash issue
  4. Ignored temperature issue
  5. Vertex batch tools issue
  6. Measured main commit

More ai tools reviews

oh-my-ppt · Agentero · mini-swe-agent · claude-video · nextai-translator · Toonflow-app · the whole board →