AI Slop Code RIsk Monitor

google/langextract

A Python library for extracting structured information from unstructured text using LLMs with precise source grounding and interactive visualization.

26.4 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for google/langextract, a Python project with 38,934 GitHub stars. SynthScan examined 47,957 lines of code across 133 source files, recording 1042 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 26.4 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

26.4
Adjusted Signal
26.4
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
38.9K
Stars
Python
Language
48.0K
Lines of Code
133
Files
1.0K
Pattern Hits
2026-10-12
Scan Date
0.51
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 63.5/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 877 finding(s).

Hallucinated Dependency & Supply Chain Risk 11.8/100 · LOW

Are imports declared and package/API names verified? 74 finding(s).

Agent Over-Engineering Ratio 55.6/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 765 finding(s).

PR Review Velocity Impact 77.4/100 · CRITICAL

Which changes need focused human review? 1042 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 1HIGH 67MEDIUM 21LOW 953

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1042 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers664 hits · 590 pts
SeverityFileLineSnippetContext
LOWtests/chunking_test.py69 def test_multi_sentence_chunk(self):CODE
LOWtests/chunking_test.py96 def test_sentence_with_multiple_newlines_and_right_interval(self):CODE
LOWtests/chunking_test.py164 def test_long_token_gets_own_chunk(self):CODE
LOWtests/chunking_test.py207 def test_newline_at_chunk_boundary_does_not_create_empty_interval(self):CODE
LOWtests/chunking_test.py261 def test_newlines_is_secondary_sentence_break(self):CODE
LOWtests/chunking_test.py312 def test_tokenizer_propagation(self):CODE
LOWtests/chunking_test.py425 def test_make_batches_of_textchunk(CODE
LOWtests/chunking_test.py473 def test_text_chunk_additional_context(self):CODE
LOWtests/chunking_test.py486 def test_chunk_iterator_without_additional_context(self):CODE
LOWtests/chunking_test.py497 def test_multiple_chunks_with_additional_context(self):CODE
LOWtests/chunking_test.py549 def test_text_chunk_properties(CODE
LOW⚡tests/progress_test.py27 def test_download_progress_bar(self):CODE
LOW⚡tests/progress_test.py37 def test_extraction_progress_bar(self):CODE
LOW⚡tests/progress_test.py47 def test_save_load_progress_bars(self):CODE
LOW⚡tests/progress_test.py57 def test_model_info_extraction(self):CODE
LOWtests/progress_test.py68 def test_formatting_functions(self):CODE
LOWtests/format_handler_test.py147 def test_end_to_end_integration_with_prompt_and_resolver(self):CODE
LOWtests/format_handler_test.py232 def test_format_parse_roundtrip(STRING
LOWtests/format_handler_test.py260 def test_think_tags_stripped_before_parsing(self):CODE
LOWtests/format_handler_test.py276 def test_top_level_list_accepted_as_fallback(self):CODE
LOWtests/format_handler_test.py340 def test_format_type_normalization_in_init_and_resolver_params(CODE
LOWtests/format_handler_test.py365 def test_invalid_format_type_raises(self):CODE
LOWtests/annotation_test.py50 def assert_char_interval_match_source(CODE
LOWtests/annotation_test.py83 def test_annotate_text_single_chunk(self):CODE
LOWtests/annotation_test.py209 def test_annotate_text_without_index_suffix(self):CODE
LOWtests/annotation_test.py328 def test_annotate_text_with_attributes_suffix(self):CODE
LOWtests/annotation_test.py472 def test_annotate_text_multiple_chunks(self):CODE
LOWtests/annotation_test.py572 def test_annotate_text_no_extractions(self):CODE
LOWtests/annotation_test.py640 def test_releases_prompts_before_next_batch_with_list_outputs(self):CODE
LOWtests/annotation_test.py691 def test_releases_prompts_before_next_batch_with_iterator_outputs(self):CODE
LOWtests/annotation_test.py869 def test_annotate_documents_exceptions(CODE
LOWtests/annotation_test.py920 def test_multipass_extraction_non_overlapping(self):CODE
LOWtests/annotation_test.py970 def test_multipass_extraction_overlapping(self):CODE
LOWtests/annotation_test.py1021 def test_multipass_extraction_single_pass(self):CODE
LOWtests/annotation_test.py1051 def test_multipass_extraction_empty_passes(self):CODE
LOWtests/annotation_test.py1155 def test_merge_non_overlapping_extractions(CODE
LOWtests/annotation_test.py1263 def test_yields_documents_not_generators(self):CODE
LOWtests/annotation_test.py1323 def test_context_window_includes_previous_chunk_text(self):CODE
LOWtests/annotation_test.py1374 def test_no_context_included_when_disabled(self):CODE
LOWtests/annotation_test.py1412 def test_context_window_per_document_isolation(self):CODE
LOW⚡tests/schema_test.py48def _openai_attribute_properties(openai_schema, extraction_class):CODE
LOW⚡tests/schema_test.py57 def test_abstract_methods_required(self):CODE
LOW⚡tests/schema_test.py62 def test_subclass_must_implement_all_methods(self):CODE
LOW⚡tests/schema_test.py972 def test_base_schema_rejects_user_schemas_by_default(self):CODE
LOW⚡tests/schema_test.py976 def test_gemini_from_schema_dict_targets_json_schema_field(self):CODE
LOW⚡tests/schema_test.py986 def test_gemini_from_schema_dict_validates_envelope(self):CODE
LOW⚡tests/schema_test.py996 def test_openai_from_schema_dict_builds_response_format(self):CODE
LOWtests/schema_test.py79 def test_get_schema_class_returns_none_by_default(self):CODE
LOWtests/schema_test.py89 def test_apply_schema_stores_instance(self):CODE
LOWtests/schema_test.py258 def test_from_examples_constructs_expected_schema(CODE
LOWtests/schema_test.py265 def test_to_provider_config_returns_response_schema(self):CODE
LOWtests/schema_test.py287 def test_requires_raw_output_returns_true(self):CODE
LOWtests/schema_test.py308 def test_response_format_returns_json_schema_response_format(self):CODE
LOWtests/schema_test.py341 def test_to_provider_config_uses_provider_schema_hook(self):CODE
LOWtests/schema_test.py349 def test_from_examples_constructs_strict_openai_schema(self):CODE
LOWtests/schema_test.py447 def test_from_examples_preserves_list_attribute_schema(self):CODE
LOWtests/schema_test.py474 def test_from_examples_empty_examples_allow_empty_extraction_objects(self):CODE
LOWtests/schema_test.py488 def test_validate_format_rejects_yaml(self):CODE
LOWtests/schema_test.py499 def test_requires_raw_output_returns_true(self):CODE
LOWtests/schema_test.py505 def test_validate_format_warns_when_fences_enabled(self):CODE
604 more matches not shown…
Docstring Block Structure38 hits · 190 pts
SeverityFileLineSnippetContext
HIGHlangextract/plugins.py125Load a provider class from module:Class specification. Args: spec: Import specification in format "module.path:ClSTRING
HIGHlangextract/plugins.py186Get a provider class by name. Args: name: Provider name (e.g., "gemini", "openai", "ollama"). allow_override:STRING
HIGHlangextract/annotation.py124Iterates over documents to yield text chunks along with the document ID. Args: documents: A sequence of Document STRING
HIGHlangextract/annotation.py222Annotates a sequence of documents with NLP extractions. Breaks documents into chunks, processes them into promptsSTRING
HIGHlangextract/chunking.py146Creates a token interval. Args: start_index: first token's index (inclusive). end_index: last token's index +STRING
HIGHlangextract/chunking.py173Get the text within an interval of tokens. Args: tokenized_text: Tokenized documents. token_interval: An inteSTRING
HIGHlangextract/chunking.py220Returns the char interval corresponding to the token interval. Args: tokenized_text: Document. token_intervalSTRING
HIGHlangextract/chunking.py247Converts all whitespace characters in input text to a single space. Args: text: Input to sanitize. Returns: STRING
HIGHlangextract/io.py51Loads the dataset from a CSV file. Args: delimiter: The delimiter to use when reading the CSV file. YielSTRING
HIGHlangextract/io.py148Loads annotated documents from a JSON Lines file. Args: jsonl_path: The file path to the JSON Lines file. shoSTRING
HIGHlangextract/io.py198Reads a CSV file and yields rows as dicts. Args: filepath: The path to the file. column_names: The names of tSTRING
HIGHlangextract/io.py271Download text content from a URL with optional progress bar. Args: url: The URL to download from. timeout: ReSTRING
HIGHlangextract/prompt_validation.py136Align extractions to their own example text and collect issues. Args: examples: The few-shot examples to validateSTRING
HIGHlangextract/prompting.py56Reads a structured prompt template from a file. Args: prompt_path: Path to a file containing PromptTemplateStructSTRING
HIGHlangextract/factory.py120Create a language model instance from configuration. Args: config: Model configuration with optional model_id andSTRING
HIGHlangextract/factory.py242Internal helper to create a model with optional schema constraints. This function creates a language model and optionSTRING
HIGHlangextract/extraction.py76Extracts structured information from text. Retrieves structured information from the provided text or documents usingSTRING
HIGHlangextract/resolver.py282Runs resolve function on text with YAML/JSON extraction data. Args: input_text: The input text to be procesSTRING
HIGHlangextract/resolver.py416Parses a YAML or JSON-formatted string into extraction data. This method is kept for backward compatibility with teSTRING
HIGHlangextract/resolver.py451Extracts and orders extraction data based on their associated indexes. This function processes a list of dictionariSTRING
HIGHlangextract/core/output_schema.py111Validates the LangExtract output envelope and returns an isolated copy. LangExtract's resolver parses a top-level JSOSTRING
HIGHlangextract/core/output_schema.py255Builds a schema for one LangExtract extraction object. Pair this with `extractions_schema()` to produce the full outpSTRING
HIGHlangextract/core/base_model.py206Parses model output as JSON or YAML. Note: This expects raw JSON/YAML without code fences. Code fence extractioSTRING
HIGHlangextract/core/tokenizer.py474Reconstructs the substring of the original text spanning a given token interval. Args: tokenized_text: A TokenizeSTRING
HIGHlangextract/core/tokenizer.py586Finds a 'sentence' interval from a given start index. Sentence boundaries are defined by: - punctuation tokens inSTRING
HIGHlangextract/core/format_handler.py172Parse model output to extract data. Args: text: Raw model output. strict: If True, enforce strict schemSTRING
HIGHlangextract/core/format_handler.py297Extract content from text, handling fences if configured. Args: text: Input text that may contain fenced blocSTRING
HIGHlangextract/providers/openai_batch.py357Execute batch inference on multiple prompts using OpenAI Batch API. Args: client: OpenAI client instance (or compSTRING
HIGHlangextract/providers/router.py140Resolve a model ID to a provider class. Args: model_id: The model identifier to resolve. Returns: The provSTRING
HIGHlangextract/providers/router.py171Resolve a provider name to a provider class. This allows explicit provider selection by name or class name. Args: STRING
HIGHlangextract/providers/gemini_batch.py282Encode tools in a form that Vertex AI batch can import. Vertex AI batch rejects input files that contain empty JSON oSTRING
HIGHlangextract/providers/gemini_batch.py325Build a batch request in REST format for file-based submission. Constructs a properly formatted request dictionary foSTRING
HIGHlangextract/providers/gemini_batch.py401Submit a file-based batch job to Vertex AI using GCS storage. Batch processing is only supported with Vertex AI becauSTRING
HIGHlangextract/providers/gemini_batch.py671Poll batch job until completion or timeout. Args: client: google.genai.Client instance for polling job status. STRING
HIGHlangextract/providers/gemini_batch.py770Extract text outputs from file-based batch results, preserving order. Reads results from GCS output directory. ArgSTRING
HIGHlangextract/providers/gemini_batch.py851Execute batch inference on multiple prompts using the Vertex AI Batch API. This function provides file-based batch prSTRING
HIGHlangextract/providers/ollama.py561Sends a prompt to an Ollama model and returns the generated response. Note: This is a low-level method. ConstructorSTRING
HIGHscripts/create_provider_plugin.py270Replaces a placeholder line, failing loudly if it is missing. Args: content: Text containing exactly one placeholSTRING
Over-Commented Block109 hits · 101 pts
SeverityFileLineSnippetContext
LOWautoformat.sh1#!/bin/bashCOMMENT
LOW.pre-commit-config.yaml1# Copyright 2025 Google LLC.COMMENT
LOWpyproject.toml1# Copyright 2025 Google LLC.COMMENT
LOWtox.ini1# Copyright 2025 Google LLC.COMMENT
LOWtests/chunking_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/progress_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/format_handler_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/annotation_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/schema_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/prompting_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/inference_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/provider_schema_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/create_provider_plugin_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/extract_precedence_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/resolver_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/resolver_test.py661 extraction_text="prednisone",COMMENT
LOWtests/fuzzy_alignment_cases_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/test_kwargs_passthrough.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/gemini_retry_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/data_lib_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/init_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/openai_batch_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/registry_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/tokenizer_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/extract_schema_integration_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/prompt_validation_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/factory_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/visualization_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/io_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/provider_plugin_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/factory_schema_test.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/test_live_api.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/test_ollama_integration.py1# Copyright 2025 Google LLC.COMMENT
LOWtests/test_gemini_batch_api.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/plugins.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/annotation.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/chunking.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/registry.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/data_lib.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/io.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/prompt_validation.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/prompting.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/__init__.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/visualization.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/factory.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/tokenizer.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/extraction.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/resolver.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/inference.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/exceptions.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/progress.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/data.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/schema.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/core/output_schema.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/core/__init__.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/core/types.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/core/base_model.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/core/tokenizer.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/core/format_handler.py1# Copyright 2025 Google LLC.COMMENT
LOWlangextract/core/exceptions.py1# Copyright 2025 Google LLC.COMMENT
49 more matches not shown…
Empty Error Handlers12 hits · 60 pts
SeverityFileLineSnippetContext
HIGHtests/prompt_validation_test.py457except Exception: # pylint: disable=broad-exceptCODE
HIGHtests/prompt_validation_test.py505except Exception: # pylint: disable=broad-exceptCODE
HIGHtests/prompt_validation_test.py526except Exception: # pylint: disable=broad-exceptCODE
HIGHlangextract/annotation.py389except AttributeError:CODE
HIGHlangextract/core/debug_utils.py184except Exception:CODE
HIGHlangextract/providers/gemini.py396except ImportError:CODE
HIGHlangextract/providers/gemini.py414except ImportError:CODE
HIGHlangextract/providers/router.py208except re.error:CODE
HIGHlangextract/providers/gemini_batch.py194except Exception:CODE
HIGHlangextract/providers/gemini_batch.py471except OSError:CODE
HIGHbenchmarks/fuzzy_benchmark.py253except (subprocess.CalledProcessError, FileNotFoundError):CODE
HIGH.github/scripts/zenodo_publish.py71except FileNotFoundError:CODE
Unused Imports49 hits · 48 pts
SeverityFileLineSnippetContext
LOWtests/openai_batch_test.py19CODE
LOWlangextract/plugins.py20CODE
LOWlangextract/registry.py21CODE
LOWlangextract/data_lib.py16CODE
LOWlangextract/io.py16CODE
LOWlangextract/prompt_validation.py17CODE
LOWlangextract/prompting.py16CODE
LOWlangextract/__init__.py21CODE
LOWlangextract/visualization.py24CODE
LOWlangextract/factory.py22CODE
LOWlangextract/tokenizer.py21CODE
LOWlangextract/tokenizer.py25CODE
LOWlangextract/extraction.py17CODE
LOWlangextract/resolver.py21CODE
LOWlangextract/inference.py21CODE
LOWlangextract/exceptions.py22CODE
LOWlangextract/progress.py16CODE
LOWlangextract/data.py21CODE
LOWlangextract/data.py25CODE
LOWlangextract/schema.py22CODE
LOWlangextract/core/output_schema.py16CODE
LOWlangextract/core/__init__.py22CODE
LOWlangextract/core/types.py16CODE
LOWlangextract/core/base_model.py16CODE
LOWlangextract/core/format_handler.py17CODE
LOWlangextract/core/exceptions.py21CODE
LOWlangextract/core/data.py16CODE
LOWlangextract/core/schema.py16CODE
LOWlangextract/core/debug_utils.py16CODE
LOWlangextract/providers/openai_batch.py22CODE
LOWlangextract/providers/gemini.py19CODE
LOWlangextract/providers/openai.py18CODE
LOWlangextract/providers/router.py22CODE
LOWlangextract/providers/gemini_batch.py25CODE
LOWlangextract/providers/ollama.py84CODE
LOWlangextract/providers/schemas/__init__.py16CODE
LOWlangextract/providers/schemas/gemini.py18CODE
LOWlangextract/providers/schemas/openai.py18CODE
LOWlangextract/_compat/registry.py18CODE
LOWlangextract/_compat/__init__.py21CODE
LOWlangextract/_compat/inference.py17CODE
LOWlangextract/_compat/exceptions.py18CODE
LOWlangextract/_compat/schema.py18CODE
LOW…amples/custom_provider_plugin/test_example_provider.py24CODE
LOW…ovider_plugin/langextract_provider_example/provider.py17CODE
LOW…ovider_plugin/langextract_provider_example/__init__.py17CODE
LOW…provider_plugin/langextract_provider_example/schema.py17CODE
LOWbenchmarks/fuzzy_benchmark.py29CODE
LOWscripts/validate_community_providers.py18CODE
Excessive Try-Catch Wrapping46 hits · 46 pts
SeverityFileLineSnippetContext
LOWtests/prompt_validation_test.py457 except Exception: # pylint: disable=broad-exceptCODE
LOWtests/prompt_validation_test.py505 except Exception: # pylint: disable=broad-exceptCODE
LOWtests/prompt_validation_test.py526 except Exception: # pylint: disable=broad-exceptCODE
LOWlangextract/prompting.py78 except Exception as e:CODE
LOWlangextract/visualization.py59 except Exception:CODE
LOWlangextract/resolver.py443 except Exception as e:CODE
LOWlangextract/core/base_model.py228 except Exception as e:CODE
LOWlangextract/core/debug_utils.py89 except Exception:CODE
LOWlangextract/core/debug_utils.py129 except Exception:CODE
LOWlangextract/core/debug_utils.py184 except Exception:CODE
LOWlangextract/providers/openai_batch.py253 except Exception as e:CODE
LOWlangextract/providers/openai_batch.py277 except Exception as e:CODE
LOWlangextract/providers/openai_batch.py313 except Exception as e:CODE
LOWlangextract/providers/openai_batch.py444 except Exception as e:CODE
LOWlangextract/providers/openai_batch.py470 except Exception as e:CODE
LOWlangextract/providers/openai_batch.py496 except Exception as e:CODE
LOWlangextract/providers/openai_batch.py508 except Exception as e:CODE
LOWlangextract/providers/__init__.py131 except Exception as e:CODE
LOWlangextract/providers/__init__.py136 except Exception as e:CODE
LOWlangextract/providers/gemini.py455 except Exception as e:CODE
LOWlangextract/providers/gemini.py559 except Exception as e:CODE
LOWlangextract/providers/gemini.py598 except Exception as e:CODE
LOWlangextract/providers/openai.py260 except Exception as e:CODE
LOWlangextract/providers/openai.py382 except Exception as e:CODE
LOWlangextract/providers/openai.py422 except Exception as e:CODE
LOWlangextract/providers/gemini_batch.py194 except Exception:CODE
LOWlangextract/providers/gemini_batch.py275 except Exception as e:CODE
LOWlangextract/providers/gemini_batch.py502 except Exception as e:CODE
LOWlangextract/providers/gemini_batch.py543 except Exception as e:CODE
LOWlangextract/providers/gemini_batch.py554 except Exception as e:CODE
LOWlangextract/providers/gemini_batch.py705 except Exception as e:CODE
LOWlangextract/providers/gemini_batch.py991 except Exception as e:CODE
LOWlangextract/providers/ollama.py313 except Exception as e:CODE
LOW…ovider_plugin/langextract_provider_example/provider.py181 except Exception as e:CODE
LOWexamples/ollama/demo_ollama.py452 except Exception as e:CODE
LOWexamples/ollama/demo_ollama.py533 except Exception as e:CODE
MEDIUMbenchmarks/plotting.py339 print(f"Error loading {json_file}: {e}")CODE
LOWscripts/create_provider_plugin.py828 except Exception as e:CODE
LOWscripts/create_provider_plugin.py858 except Exception:CODE
LOWscripts/create_provider_plugin.py864 except Exception as e:CODE
LOWscripts/create_provider_plugin.py908 except Exception as e:STRING
LOWscripts/create_provider_plugin.py927 except Exception as e:STRING
LOWscripts/create_provider_plugin.py1138 except Exception:STRING
LOWscripts/create_provider_plugin.py1168 except Exception:STRING
LOW.github/scripts/zenodo_publish.py230 except Exception as e:CODE
MEDIUM.github/scripts/zenodo_publish.py199def main() -> int:CODE
Magic Placeholder Names9 hits · 42 pts
SeverityFileLineSnippetContext
HIGHREADME.md227docker run --rm -e LANGEXTRACT_API_KEY="your-api-key" langextract python your_script.pyCODE
HIGHREADME.md250export LANGEXTRACT_API_KEY="your-api-key-here"CODE
HIGHREADME.md260LANGEXTRACT_API_KEY=your-api-key-hereCODE
HIGHREADME.md289 api_key="your-api-key-here" # Only use this for testing/developmentCODE
HIGHdocs/examples/medication_examples.md51 api_key="your-api-key-here" # Optional if LANGEXTRACT_API_KEY environment variable is setCODE
HIGHdocs/examples/medication_examples.md171 api_key="your-api-key-here" # Optional if LANGEXTRACT_API_KEY environment variable is setSTRING
HIGHdocs/examples/japanese_extraction.md43 api_key="your-api-key-here" # Optional if env var is setCODE
HIGHexamples/custom_provider_plugin/README.md125 provider_kwargs={"api_key": "your-api-key"},CODE
HIGHexamples/custom_provider_plugin/README.md142 provider_kwargs={"api_key": "your-api-key"},CODE
Deep Nesting40 hits · 37 pts
SeverityFileLineSnippetContext
LOWtests/create_provider_plugin_test.py253CODE
LOWtests/extract_schema_integration_test.py150CODE
LOWtests/extract_schema_integration_test.py184CODE
LOWlangextract/annotation.py46CODE
LOWlangextract/annotation.py285CODE
LOWlangextract/data_lib.py27CODE
LOWlangextract/io.py85CODE
LOWlangextract/io.py265CODE
LOWlangextract/prompt_validation.py130CODE
LOWlangextract/prompting.py52CODE
LOWlangextract/factory.py58CODE
LOWlangextract/extraction.py45CODE
LOWlangextract/resolver.py1297CODE
LOWlangextract/resolver.py447CODE
LOWlangextract/resolver.py601CODE
LOWlangextract/core/tokenizer.py580CODE
LOWlangextract/core/tokenizer.py336CODE
LOWlangextract/core/format_handler.py169CODE
LOWlangextract/providers/openai_batch.py411CODE
LOWlangextract/providers/__init__.py71CODE
LOWlangextract/providers/__init__.py149CODE
LOWlangextract/providers/gemini.py424CODE
LOWlangextract/providers/gemini.py490CODE
LOWlangextract/providers/openai.py329CODE
LOWlangextract/providers/router.py170CODE
LOWlangextract/providers/gemini_batch.py317CODE
LOWlangextract/providers/gemini_batch.py764CODE
LOWlangextract/providers/gemini_batch.py528CODE
LOWlangextract/providers/schemas/gemini.py121CODE
LOWlangextract/providers/schemas/openai.py85CODE
LOWexamples/ollama/demo_ollama.py418CODE
LOWbenchmarks/benchmark.py140CODE
LOWbenchmarks/benchmark.py276CODE
LOWbenchmarks/benchmark.py311CODE
LOWbenchmarks/fuzzy_benchmark.py342CODE
LOWbenchmarks/plotting.py170CODE
LOWbenchmarks/plotting.py220CODE
LOWbenchmarks/plotting.py376CODE
LOWbenchmarks/plotting.py492CODE
LOW.github/scripts/zenodo_publish.py57CODE
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHtests/test_live_api.py0the patient was prescribed lisinopril and metformin last month. he takes the lisinopril 10mg daily for hypertension, butSTRING
HIGHdocs/examples/medication_examples.md0the patient was prescribed lisinopril and metformin last month. he takes the lisinopril 10mg daily for hypertension, butSTRING
HIGHexamples/ollama/demo_ollama.py0the patient was prescribed lisinopril and metformin last month. he takes the lisinopril 10mg daily for hypertension, butSTRING
HIGHtests/test_live_api.py0extract medications with their details, using attributes to group related information: 1. extract entities in the order STRING
HIGHdocs/examples/medication_examples.md0extract medications with their details, using attributes to group related information: 1. extract entities in the order STRING
HIGHexamples/ollama/demo_ollama.py0extract medications with their details, using attributes to group related information: 1. extract entities in the order STRING
Self-Referential Comments9 hits · 25 pts
SeverityFileLineSnippetContext
MEDIUMtests/annotation_test.py804 # Define a side effect function so return length based on batch length.COMMENT
MEDIUMtests/resolver_test.py2026 # Define a chunk that includes the entire text.COMMENT
MEDIUMtests/resolver_test.py2068 # Define a chunk that includes the entire text.COMMENT
MEDIUMtests/resolver_test.py2114 # Define a chunk that includes too many tokens.COMMENT
MEDIUMtests/resolver_test.py2155 # Define a correct chunk.COMMENT
MEDIUMtests/resolver_test.py2182 # Define a chunk that includes the entire text.COMMENT
MEDIUMtests/extract_schema_integration_test.py225 # Create a mock instance with required attributesCOMMENT
MEDIUMtests/extract_schema_integration_test.py276 # Create a mock Gemini schema with validate_format that issues warningsCOMMENT
MEDIUMlangextract/providers/ollama.py24 # Create an example for few-shot learningSTRING
Modern Structural Boilerplate22 hits · 22 pts
SeverityFileLineSnippetContext
LOWtests/openai_batch_test.py49 def set_content(self, file_id: str, text: str) -> None:CODE
LOWlangextract/plugins.py30__all__ = ["available_providers", "get_provider_class"]CODE
LOWlangextract/prompt_validation.py30__all__ = [CODE
LOWlangextract/prompting.py268 def _update_state(self, document_id: str, chunk_text: str) -> None:CODE
LOWlangextract/__init__.py30__all__ = [CODE
LOWlangextract/exceptions.py35__all__ = [CODE
LOWlangextract/schema.py47__all__ = [CODE
LOWlangextract/core/output_schema.py26__all__ = [CODE
LOWlangextract/core/__init__.py24__all__ = [CODE
LOWlangextract/core/types.py24__all__ = [CODE
LOWlangextract/core/base_model.py29__all__ = ['BaseLanguageModel']CODE
LOWlangextract/core/base_model.py125 def set_fence_output(self, fence_output: bool | None) -> None:CODE
LOWlangextract/core/tokenizer.py35__all__ = [CODE
LOWlangextract/core/exceptions.py23__all__ = [CODE
LOWlangextract/core/data.py30__all__ = [CODE
LOWlangextract/core/schema.py26__all__ = [CODE
LOWlangextract/providers/__init__.py33__all__ = [CODE
LOWlangextract/providers/gemini_batch.py528 def set_multi(self, items: Sequence[tuple[dict, str]]) -> None:CODE
LOWlangextract/providers/schemas/__init__.py24__all__ = ["GeminiSchema", "OpenAISchema"]CODE
LOWlangextract/_compat/__init__.py23__all__ = ["inference", "schema", "exceptions", "registry"]CODE
LOW…ovider_plugin/langextract_provider_example/__init__.py19__all__ = ["CustomGeminiProvider"]CODE
LOW.github/scripts/zenodo_publish.py157def update_metadata(draft_id: str) -> None:CODE
Decorative Section Separators5 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMtests/annotation_test.py506 # -------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/resolver_test.py667 # --------------------------------------------------------------------COMMENT
MEDIUM⚡tests/resolver_test.py670 # --------------------------------------------------------------------COMMENT
MEDIUM⚡tests/resolver_test.py673 # --------------------------------------------------------------------COMMENT
MEDIUM⚡tests/resolver_test.py676 # --------------------------------------------------------------------COMMENT
Fake / Example Data13 hits · 12 pts
SeverityFileLineSnippetContext
LOWtests/annotation_test.py94 - patient: "Jane Doe"CODE
LOWtests/annotation_test.py121 extraction_text="Jane Doe",CODE
LOWtests/annotation_test.py220 - patient: "Jane Doe"CODE
LOWtests/annotation_test.py240 extraction_text="Jane Doe",CODE
LOWtests/annotation_test.py339 - patient: "Jane Doe"CODE
LOWtests/annotation_test.py374 extraction_text="Jane Doe",CODE
LOWtests/schema_test.py219 extraction_text="John Doe",CODE
LOWtests/resolver_test.py413 "patient": "Jane Doe",CODE
LOWtests/resolver_test.py430 extraction_text="Jane Doe",CODE
LOWtests/resolver_test.py454 "patient": "John Doe",CODE
LOWtests/resolver_test.py493 extraction_text="John Doe",CODE
LOWtests/data_lib_test.py195 extraction_text="placeholder",CODE
LOWtests/tokenizer_test.py812 expected_substring="Jane Doe",CODE
AI Structural Patterns10 hits · 10 pts
SeverityFileLineSnippetContext
LOWlangextract/annotation.py209CODE
LOWlangextract/annotation.py534CODE
LOWlangextract/extraction.py45CODE
LOWlangextract/resolver.py337CODE
LOWlangextract/resolver.py799CODE
LOWlangextract/providers/gemini.py237CODE
LOWlangextract/providers/openai.py109CODE
LOWlangextract/providers/ollama.py379CODE
LOWlangextract/providers/ollama.py476CODE
LOWlangextract/providers/ollama.py540CODE
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALlangextract/_compat/README.md16- `from langextract.inference import InferenceOutputError` → `from langextract.core.exceptions import InferenceOutputErrCODE
Cross-Language Confusion2 hits · 8 pts
SeverityFileLineSnippetContext
HIGHtests/test_kwargs_passthrough.py704 """Format key should be omitted from payload when None (not sent as null)."""STRING
HIGHlangextract/visualization.py492 let animationInterval = null;CODE
Modern AI Meta-Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMlangextract/providers/ollama.py24 # Create an example for few-shot learningSTRING
MEDIUMdocs/examples/japanese_extraction.md20# Define example data (few-shot examples help the model understand the task)COMMENT
MEDIUMskills/langextract-usage/SKILL.md114 examples=examples, # few-shot examples (required)CODE
AI Slop Vocabulary2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMlangextract/core/tokenizer.py278 # Fallback to the robust regex methodCOMMENT
MEDIUMbenchmarks/plotting.py37 """Generate comprehensive benchmark visualization.STRING
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWlangextract/core/base_model.py220 # Check if we have a format_type attribute (providers should set this)COMMENT
LOWlangextract/providers/gemini_batch.py258 # Check if rule already existsCOMMENT