AI Slop Code RIsk Monitor

guidance-ai/guidance

A guidance language for controlling large language models.

21.1 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for guidance-ai/guidance, a Jupyter Notebook project with 21,787 GitHub stars. SynthScan examined 35,924 lines of code across 228 source files, recording 591 pattern matches distributed across 17 syntactic categories. The legacy adjusted pattern signal is 21.1 (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.

21.1
Adjusted Signal
21.1
Raw Pattern Score
100%
Time Factor
2026-05-21
Last Push
21.8K
Stars
Jupyter Notebook
Language
35.9K
Lines of Code
228
Files
591
Pattern Hits
2026-10-12
Scan Date
0.10
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 44.1/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 17.5/100 · LOW

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

Agent Over-Engineering Ratio 44.8/100 · MEDIUM

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

PR Review Velocity Impact 65.5/100 · HIGH

Which changes need focused human review? 591 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 0HIGH 22MEDIUM 32LOW 537

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 591 distinct pattern matches across 17 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 Identifiers217 hits · 214 pts
SeverityFileLineSnippetContext
LOWREADME.md175def zero_shot_multiple_choice(STRING
LOWguidance/_ast.py217 def is_allowed_in_lark_terminal(self) -> bool:CODE
LOWguidance/_ast.py225 def is_allowed_in_lark_rule_with_attrs(self) -> bool:CODE
LOWguidance/_ast.py348 def is_allowed_in_lark_terminal(self) -> bool:CODE
LOWguidance/_ast.py352 def is_allowed_in_lark_rule_with_attrs(self) -> bool:CODE
LOWguidance/_ast.py450 def is_allowed_in_lark_terminal(self) -> bool:CODE
LOWguidance/_ast.py489 def is_allowed_in_lark_terminal(self) -> bool:CODE
LOWguidance/_ast.py519 def is_allowed_in_lark_terminal(self) -> bool:CODE
LOWguidance/_ast.py533 def is_allowed_in_lark_terminal(self) -> bool:CODE
LOWguidance/_ast.py537 def is_allowed_in_lark_rule_with_attrs(self) -> bool:CODE
LOWguidance/_uri_validation.py66def _validate_hostname_not_private(hostname: str, original_url: str) -> None:CODE
LOW⚡guidance/chat.py83def _template_class_from_string(template_str):CODE
LOWguidance/_utils.py128def strip_multiline_string_indents(f):CODE
LOWguidance/_utils.py423def apply_top_k_and_top_p_filter(logits: np.ndarray, sampling_params: Optional["SamplingParams"]) -> np.ndarray:CODE
LOWguidance/models/_mock.py94 def get_next_token_with_top_k(CODE
LOWguidance/models/_openai_base.py217 def streaming_chat_completions(CODE
LOWguidance/models/_openai_base.py232 def streaming_chat_completions(CODE
LOWguidance/models/_azureai.py76def create_azure_openai_model(CODE
LOWguidance/models/_azureai.py162 def streaming_chat_completions(CODE
LOWguidance/models/_azureai.py220def create_azure_aifoundry_model(CODE
LOWguidance/models/_transformers.py179 def _byte_tokens_from_byte_decoder(CODE
LOWguidance/models/_transformers.py194 def _byte_tokens_from_sp_model(CODE
LOWguidance/models/_transformers.py217 def _byte_tokens_by_encoding_token_strings(CODE
LOWguidance/models/_transformers.py278 def check_byte_decoder_has_all_bytes() -> None:CODE
LOWguidance/models/_transformers.py287 def check_byte_decoder_complex_round_trip() -> None:CODE
LOWguidance/models/experimental/_litellm.py46 def streaming_chat_completions(CODE
LOWguidance/models/_engine/_engine.py542 def get_next_token_with_top_k(CODE
LOWguidance/models/_engine/_engine.py659 def chat_completion_streaming(CODE
LOWguidance/models/_engine/_engine.py732def apply_temp_and_sampling_params(CODE
LOWguidance/models/_base/_model.py192 def _update_open_block_captures(self) -> Self:CODE
LOWguidance/_bg/__init__.py20def _asyncio_background_thread() -> tuple[threading.Thread, AbstractEventLoop]:CODE
LOWtests/tokenizer_common.py37 def base_eos_bos_token_round_trip(self, model_name: str):CODE
LOWtests/utils.py114def check_match_success_with_guards(grammar, test_string: str):CODE
LOWtests/utils.py194def check_run_with_temperature(lm: models.Model, desired_temperature: float):CODE
LOWtests/unit/test_parser.py17def test_zero_or_more_and_one_or_more():CODE
LOWtests/unit/test_parser.py34def test_zero_or_more_and_one_or_more_mixed():CODE
LOWtests/unit/test_parser.py117def test_char_set_one_or_more():CODE
LOWtests/unit/test_model.py58def test_step_every_k_injection():CODE
LOWtests/unit/test_model.py84def test_step_stop_token_trigger_injection():CODE
LOWtests/unit/test_grammar.py24def test_select_ambiguous_lexeme_boundary():CODE
LOWtests/unit/test_grammar.py33def test_select_ambiguous_lexeme_boundary_manual_fix():STRING
LOWtests/unit/test_grammar.py50def test_grammar_plus_fstring():CODE
LOWtests/unit/test_grammar.py82 def test_multiple_mutual_recursion(self):CODE
LOWtests/unit/test_grammar.py99 def test_branching_mutual_recursion(self):CODE
LOWtests/unit/test_grammar.py140 def test_raises_on_incomplete_input(self):CODE
LOW⚡tests/unit/test_uri_validation.py11 def test_https_allowed_by_default(self):CODE
LOW⚡tests/unit/test_uri_validation.py16 def test_http_blocked_by_default(self):CODE
LOW⚡tests/unit/test_uri_validation.py20 def test_ftp_blocked_by_default(self):CODE
LOW⚡tests/unit/test_uri_validation.py24 def test_http_allowed_when_configured(self):CODE
LOW⚡tests/unit/test_uri_validation.py28 def test_custom_scheme_allowed(self):CODE
LOW⚡tests/unit/test_uri_validation.py32 def test_scheme_check_is_case_insensitive(self):CODE
LOW⚡tests/unit/test_uri_validation.py38 def test_file_uri_blocked_when_allow_local_false(self):CODE
LOW⚡tests/unit/test_uri_validation.py42 def test_file_uri_allowed_when_allow_local_true(self):CODE
LOW⚡tests/unit/test_uri_validation.py46 def test_file_uri_not_subject_to_scheme_allowlist(self):CODE
LOWtests/unit/test_uri_validation.py105 def test_ip_literal_in_url_blocked(self):CODE
LOWtests/unit/test_uri_validation.py118 def test_dns_resolution_failure_raises(self):CODE
LOWtests/unit/test_uri_validation.py129 def test_all_resolved_addresses_checked(self):CODE
LOW⚡tests/unit/test_bytes_from.py12 def test_blocks_http_by_default(self):CODE
LOW⚡tests/unit/test_bytes_from.py16 def test_allows_http_when_configured(self):CODE
LOW⚡tests/unit/test_bytes_from.py24 def test_blocks_private_ip_by_default(self):CODE
157 more matches not shown…
Unused Imports119 hits · 114 pts
SeverityFileLineSnippetContext
LOWguidance/_tools.py11CODE
LOWguidance/__init__.py8CODE
LOWguidance/__init__.py11CODE
LOWguidance/_ast.py31CODE
LOWguidance/_ast.py31CODE
LOWguidance/_parser.py13CODE
LOWguidance/_utils.py21CODE
LOWguidance/metrics/__init__.py3CODE
LOWguidance/metrics/__init__.py3CODE
LOWguidance/metrics/__init__.py3CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/trace/__init__.py9CODE
LOWguidance/library/__init__.py3CODE
LOWguidance/library/__init__.py3CODE
LOWguidance/library/__init__.py3CODE
LOWguidance/library/__init__.py3CODE
LOWguidance/library/__init__.py3CODE
LOWguidance/library/__init__.py4CODE
LOWguidance/library/__init__.py4CODE
LOWguidance/library/__init__.py7CODE
LOWguidance/library/__init__.py8CODE
LOWguidance/library/__init__.py9CODE
LOWguidance/library/__init__.py9CODE
LOWguidance/library/__init__.py10CODE
LOWguidance/library/__init__.py10CODE
LOWguidance/library/__init__.py11CODE
LOWguidance/library/__init__.py11CODE
LOWguidance/library/__init__.py12CODE
LOWguidance/library/__init__.py13CODE
LOWguidance/library/__init__.py14CODE
LOWguidance/library/__init__.py14CODE
LOWguidance/library/__init__.py14CODE
LOWguidance/library/__init__.py14CODE
LOWguidance/library/__init__.py17CODE
LOWguidance/library/__init__.py17CODE
LOWguidance/library/__init__.py17CODE
LOWguidance/library/__init__.py17CODE
LOWguidance/library/__init__.py17CODE
LOWguidance/library/__init__.py18CODE
LOWguidance/library/__init__.py19CODE
LOWguidance/library/__init__.py19CODE
LOWguidance/library/_subgrammar.py2CODE
59 more matches not shown…
Over-Commented Block94 hits · 93 pts
SeverityFileLineSnippetContext
LOWguidance/models/broken_models/_lite_llm.py1# import tiktokenCOMMENT
LOWguidance/models/broken_models/_lite_llm.py21# "Please install the litellm package version >= 1.7 using `pip install litellm -U` in order to use guidCOMMENT
LOWguidance/models/broken_models/_lite_llm.py41# )COMMENT
LOWguidance/models/broken_models/_lite_llm.py61COMMENT
LOWguidance/models/broken_models/_lite_llm.py81COMMENT
LOWguidance/models/broken_models/_lite_llm.py101# n=1,COMMENT
LOWguidance/models/broken_models/_lite_llm.py121# else:COMMENT
LOWguidance/models/broken_models/_lite_llm.py141# raise Exception(COMMENT
LOWguidance/models/broken_models/_lite_llm.py161# except Exception as e: # TODO: add retry logicCOMMENT
LOWguidance/models/broken_models/_lite_llm.py181# messages = []COMMENT
LOWguidance/models/broken_models/_lite_llm.py201# pos += end_pos + len(role_end)COMMENT
LOWguidance/models/broken_models/_lite_llm.py221# except Exception as e: # TODO: add retry logicCOMMENT
LOWguidance/models/broken_models/_cohere.py1# from ._lite_llm import LiteLLMEngine, LiteLLM, LiteLLMCompletion, LiteLLMInstructCOMMENT
LOWguidance/models/broken_models/_cohere.py21COMMENT
LOWguidance/models/broken_models/_cohere.py41# class CohereCompletion(Cohere, LiteLLMCompletion):COMMENT
LOWguidance/models/broken_models/_azure_openai.py1# import pathlibCOMMENT
LOWguidance/models/broken_models/_azure_openai.py21# """Represents an Azure OpenAI model as exposed through their remote API.COMMENT
LOWguidance/models/broken_models/_azure_openai.py41# max_streaming_tokens: int = 1000,COMMENT
LOWguidance/models/broken_models/_azure_openai.py61# if not is_openai or not hasattr(openai_package, "OpenAI"):COMMENT
LOWguidance/models/broken_models/_azure_openai.py81COMMENT
LOWguidance/models/broken_models/_azure_openai.py101# engine_instance,COMMENT
LOWguidance/models/broken_models/_googleai.py1# import reCOMMENT
LOWguidance/models/broken_models/_googleai.py21# model,COMMENT
LOWguidance/models/broken_models/_googleai.py41# genai.configure(api_key=api_key)COMMENT
LOWguidance/models/broken_models/_googleai.py61# timeout=0.5,COMMENT
LOWguidance/models/broken_models/_googleai.py81COMMENT
LOWguidance/models/broken_models/_googleai.py101# engine=engine_map[self.__class__](COMMENT
LOWguidance/models/broken_models/_googleai.py121# assistant_start = b"<|im_start|>assistant\n"COMMENT
LOWguidance/models/broken_models/_googleai.py141# end_pos = prompt[pos:].find(role_end)COMMENT
LOWguidance/models/broken_models/_googleai.py161# )COMMENT
LOWguidance/models/broken_models/_googleai.py181COMMENT
LOWguidance/models/broken_models/_googleai.py201# formated_messages = []COMMENT
LOWguidance/models/broken_models/_googleai.py221# formated_messages.append(Content(role=m["role"], parts=parts))COMMENT
LOWguidance/models/broken_models/_googleai.py241# class GoogleAIChat(GoogleAI, Chat):COMMENT
LOWguidance/models/broken_models/_Gemini.py1# import osCOMMENT
LOWguidance/models/broken_models/_Gemini.py21COMMENT
LOWguidance/models/broken_models/_Gemini.py41# is_vertexai = TrueCOMMENT
LOWguidance/models/broken_models/_Gemini.py61# # caching=caching,COMMENT
LOWguidance/models/broken_models/_Gemini.py81# # tokenizer=tokenizer,COMMENT
LOWguidance/models/broken_models/_Gemini.py101# # the superclass does all the workCOMMENT
LOWguidance/models/broken_models/_Gemini.py121# # last_user_text = messages[-1]["content"]COMMENT
LOWguidance/models/broken_models/_Gemini.py141COMMENT
LOWguidance/models/broken_models/_anthropic.py1# import osCOMMENT
LOWguidance/models/broken_models/_anthropic.py21# except ModuleNotFoundError:COMMENT
LOWguidance/models/broken_models/_anthropic.py41# except:COMMENT
LOWguidance/models/broken_models/_anthropic.py61# ("assistant", b"<|im_start|>assistant\n"),COMMENT
LOWguidance/models/broken_models/_anthropic.py81COMMENT
LOWguidance/models/broken_models/_anthropic.py101# temperature=temperature,COMMENT
LOWguidance/models/broken_models/_anthropic.py121# there are some things we cannot do, like force the model to follow a pattern insideCOMMENT
LOWguidance/models/broken_models/_anthropic.py141# tokenizer=tokenizer,COMMENT
LOWguidance/models/broken_models/_azureai_studio.py1# import hashlibCOMMENT
LOWguidance/models/broken_models/_azureai_studio.py21# class AzureAIStudioChatEngine(GrammarlessEngine):COMMENT
LOWguidance/models/broken_models/_azureai_studio.py41# "Detected OpenAI compatible model; please install openai package"COMMENT
LOWguidance/models/broken_models/_azureai_studio.py61COMMENT
LOWguidance/models/broken_models/_azureai_studio.py81# found = TrueCOMMENT
LOWguidance/models/broken_models/_azureai_studio.py101# message_content = btext.decode("utf8")COMMENT
LOWguidance/models/broken_models/_azureai_studio.py121# cache_key = self._hash_prompt(prompt)COMMENT
LOWguidance/models/broken_models/_azureai_studio.py141COMMENT
LOWguidance/models/broken_models/_azureai_studio.py161# response_score = requests.post(COMMENT
LOWguidance/models/broken_models/_azureai_studio.py181# yield encoded_chunkCOMMENT
34 more matches not shown…
Decorative Section Separators22 hits · 69 pts
SeverityFileLineSnippetContext
MEDIUM⚡guidance/chat.py91# --------------------------------------------------COMMENT
MEDIUM⚡guidance/chat.py93# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py111# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py113# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py146# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py148# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py173# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py175# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py230# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py232# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py251# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py253# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py285# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py287# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py317# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py319# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py345# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py347# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py371# --------------------------------------------------COMMENT
MEDIUMguidance/chat.py373# --------------------------------------------------COMMENT
MEDIUMguidance/models/broken_models/_azure_openai.py49# ----------COMMENT
MEDIUMguidance/models/broken_models/_azureai_studio.py214# ----------COMMENT
Empty Error Handlers13 hits · 65 pts
SeverityFileLineSnippetContext
HIGHguidance/_parser.py178except StopIteration:CODE
HIGHguidance/_parser.py351except UnicodeDecodeError:CODE
HIGHguidance/_parser.py336except UnicodeDecodeError:CODE
HIGHguidance/_uri_validation.py73except ValueError:CODE
HIGHguidance/models/_mock.py75except:CODE
HIGHguidance/models/_llama_cpp.py106except FileNotFoundError:CODE
HIGHguidance/models/_llama_cpp.py108except PermissionError:CODE
HIGHguidance/models/_transformers.py20except ModuleNotFoundError:CODE
HIGHguidance/models/_transformers.py370except FileNotFoundError:CODE
HIGHguidance/models/_transformers.py372except PermissionError:CODE
HIGHguidance/visual/_environment.py105except (NameError, ImportError): # pragma: no coverCODE
HIGHguidance/visual/_jupyter.py9except ImportError:CODE
HIGHtests/unit/test_visual.py80except ImportError: # NOTE(nopdive): anytree not installedCODE
Self-Referential Comments10 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUMguidance/models/_openai_base.py484 # Create an in-memory WAV fileCOMMENT
MEDIUMguidance/models/_transformers.py405 # Create the tokenizerSTRING
MEDIUMguidance/models/_base/_model.py368 # Define the target function for the threadCOMMENT
MEDIUM⚡tests/unit/test_decorator.py407 # Create a weak reference to the objectCOMMENT
MEDIUM⚡tests/unit/test_decorator.py420 # Create a weak reference to the objectCOMMENT
MEDIUM⚡tests/unit/test_decorator.py433 # Create a weak reference to the objectCOMMENT
MEDIUM⚡tests/unit/test_decorator.py435 # Create a weak reference to the cached methodCOMMENT
MEDIUMdocs/conf.py7# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMscripts/extract_python_from_readme.py18 # This function contains 95% CoPilot vibes by volumeCOMMENT
MEDIUMpackages/python/stitch/docs/source/conf.py6# This file is execfile()d with the current directory set to itsCOMMENT
Deep Nesting32 hits · 32 pts
SeverityFileLineSnippetContext
LOWguidance/_schema.py184CODE
LOWguidance/_grammar.py61CODE
LOWguidance/_ast.py682CODE
LOWguidance/_parser.py324CODE
LOWguidance/_guidance.py129CODE
LOWguidance/_guidance.py140CODE
LOWguidance/metrics/_metrics.py126CODE
LOWguidance/trace/_trace.py357CODE
LOWguidance/library/_json.py13CODE
LOWguidance/library/_substring.py11CODE
LOWguidance/models/_mock.py117CODE
LOWguidance/models/_openai_base.py168CODE
LOWguidance/models/_openai_base.py336CODE
LOWguidance/models/_llama_cpp.py81CODE
LOWguidance/models/_transformers.py217CODE
LOWguidance/models/_transformers.py444CODE
LOWguidance/models/broken_models/_vertexai.py21CODE
LOWguidance/models/broken_models/_vertexai.py174CODE
LOWguidance/models/experimental/_sglang.py99CODE
LOWguidance/models/experimental/_litellm.py209CODE
LOWguidance/models/experimental/_vllm.py29CODE
LOWguidance/models/_engine/_engine.py94CODE
LOWguidance/models/_engine/_interpreter.py65CODE
LOWguidance/models/_base/_model.py115CODE
LOWguidance/models/_base/_model.py161CODE
LOWguidance/models/_base/_model.py361CODE
LOWguidance/visual/_renderer.py199CODE
LOWguidance/visual/_renderer.py329CODE
LOWguidance/visual/_renderer.py524CODE
LOWguidance/visual/_renderer.py541CODE
LOWguidance/visual/_trace.py17CODE
LOWtests/unit/test_ll.py62CODE
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHguidance/models/_llama_cpp.py0computes the logits for the given token state. this overrides a method from the localengine class that is used to get inSTRING
HIGHguidance/models/_transformers.py0computes the logits for the given token state. this overrides a method from the localengine class that is used to get inSTRING
HIGHguidance/models/_onnxruntime.py0computes the logits for the given token state. this overrides a method from the localengine class that is used to get inSTRING
HIGHtests/model_specific/test_onnxruntime_genai.py0tweak this proverb to apply to model instructions instead. {gen("verse", max_tokens=2)}STRING
HIGHtests/model_specific/test_transformers.py0tweak this proverb to apply to model instructions instead. {gen("verse", max_tokens=2)}STRING
HIGHtests/model_specific/llama_cpp_tests/test_llama_cpp.py0tweak this proverb to apply to model instructions instead. {gen("verse", max_tokens=2)}STRING
Redundant / Tautological Comments18 hits · 29 pts
SeverityFileLineSnippetContext
LOWguidance/debug.py27 # Check if the auto renderer has a JupyterWidgetRenderer insideCOMMENT
LOWguidance/debug.py53 # Check if the auto renderer has a JupyterWidgetRenderer insideCOMMENT
LOWguidance/debug.py81 # Check if the auto renderer has a JupyterWidgetRenderer insideCOMMENT
LOWguidance/models/_transformers.py299 # Check if the tokenizer has a bos_token attribute, and if it does, checkCOMMENT
LOWguidance/models/broken_models/_azureai_studio.py123# # Check if the result is already in the cacheCOMMENT
LOWguidance/models/_engine/_engine.py315 # Check if the accumulated text ends with any stop stringCOMMENT
LOWguidance/models/_engine/_engine.py357 # Check if we've accumulated enough to match the stop stringCOMMENT
LOWguidance/models/_engine/_engine.py426 # Set flag to indicate this is an injection backtrackCOMMENT
LOWguidance/models/_engine/_engine.py474 # Set flag to indicate this is an injection backtrackCOMMENT
LOWguidance/models/_engine/_interpreter.py87 # Check if this is an injection backtrack (should happen before adding text)COMMENT
LOWguidance/models/_base/_model.py181 # Set start_index to the current lengthCOMMENT
LOWguidance/models/_base/_model.py392 # Check if the thread is still aliveCOMMENT
LOWguidance/visual/_renderer.py482 # Check if message has diverged from prev messagesCOMMENT
LOWguidance/visual/_trace.py32 # Check if any input is a role opener or closerCOMMENT
LOWguidance/visual/_trace.py93 # Check if any input in active role is a RoleCloserInputCOMMENT
LOW⚡tests/unit/test_decorator.py415 # Check if the object was garbage collectedCOMMENT
LOW⚡tests/unit/test_decorator.py428 # Check if the object was garbage collectedCOMMENT
LOW⚡tests/unit/test_decorator.py444 # Check if the object was garbage collectedCOMMENT
Modern Structural Boilerplate29 hits · 29 pts
SeverityFileLineSnippetContext
LOWguidance/_topics.py19__all__ = [CODE
LOWguidance/__init__.py13__all__ = [CODE
LOWguidance/_ast.py512 def set_target(self, target: RuleNode) -> None:CODE
LOWguidance/debug.py8logger = logging.getLogger(__name__)CODE
LOWguidance/_utils.py23logger = logging.getLogger(__name__)CODE
LOWguidance/metrics/_metrics.py16logger = logging.getLogger(__name__)CODE
LOWguidance/metrics/__init__.py5__all__ = [CODE
LOWguidance/trace/__init__.py32__all__ = [CODE
LOWguidance/trace/_trace.py12logger = logging.getLogger(__name__)CODE
LOWguidance/library/__init__.py21__all__ = [CODE
LOWguidance/library/_subgrammar.py4__all__ = ["as_regular_grammar", "lexeme", "regex", "subgrammar"]CODE
LOWguidance/library/_gen.py10logger = logging.getLogger(__name__)CODE
LOWguidance/models/_mock.py11logger = logging.getLogger(__name__)CODE
LOWguidance/models/_llama_cpp.py30logger = logging.getLogger(__name__)CODE
LOWguidance/models/__init__.py10__all__ = [CODE
LOWguidance/models/_azureai.py27logger = logging.getLogger(__name__)CODE
LOWguidance/models/experimental/__init__.py5__all__ = ["LiteLLM", "SglangModel", "VLLMModel"]CODE
LOWguidance/models/_engine/__init__.py6__all__ = [CODE
LOWguidance/models/_engine/_engine.py27logger = logging.getLogger(__name__)CODE
LOWguidance/models/_base/__init__.py5__all__ = [CODE
LOWguidance/visual/_exchange.py11logger = logging.getLogger(__name__)CODE
LOWguidance/visual/_exchange.py70__all__ = ["TopicExchange"]CODE
LOWguidance/visual/__init__.py23__all__ = [CODE
LOWguidance/visual/_renderer.py53logger = logging.getLogger(__name__)CODE
LOWguidance/visual/_jupyter.py12logger = logging.getLogger(__name__)CODE
LOWguidance/registry/__init__.py5__all__ = [CODE
LOWguidance/registry/_registry.py82def set_renderer(renderer: Renderer) -> None:CODE
LOWpackages/python/stitch/docs/source/conf.py203logger = logging.getLogger(__name__)CODE
LOWpackages/python/stitch/stitch/__init__.py10__all__ = ["StitchWidget", "__version__", "_jupyter_labextension_paths", "_jupyter_nbextension_paths", "version_info"]CODE
Cross-Language Confusion3 hits · 20 pts
SeverityFileLineSnippetContext
HIGHtests/unit/library/json/test_allOf.py352 # valid: foo is null, bar is equal to 5, baz is nullCOMMENT
HIGHtests/unit/library/json/test_allOf.py443 # valid: foo is null, bar is equal to 5, baz is nullCOMMENT
HIGHpackages/python/stitch/stitch/tests/conftest.py43 _widget_attrs["_comm_default"] = getattr(Widget, "_comm_default", undefined)CODE
Excessive Try-Catch Wrapping10 hits · 10 pts
SeverityFileLineSnippetContext
LOWguidance/metrics/_metrics.py93 except Exception as e: # noqa BLE001CODE
LOWguidance/metrics/_metrics.py141 except Exception as e: # noqa BLE001CODE
LOWguidance/metrics/_metrics.py177 except Exception as e:CODE
LOWguidance/models/_transformers.py310 except Exception as e:CODE
LOWguidance/models/broken_models/_vertexai.py132 except Exception as e: # TODO: add retry logicCODE
LOWguidance/visual/_renderer.py153 except Exception: # noqa: BLE001CODE
LOWguidance/visual/_renderer.py195 except Exception as _: # noqa: BLE001CODE
LOWguidance/visual/_renderer.py237 except Exception as _: # noqa: BLE001CODE
LOWtests/unit/test_visual.py82 except Exception as e:CODE
LOWtests/model_specific/test_visual.py51 except Exception as e:CODE
AI Structural Patterns9 hits · 9 pts
SeverityFileLineSnippetContext
LOWguidance/_grammar.py27CODE
LOWguidance/_utils.py314CODE
LOWguidance/_utils.py331CODE
LOWguidance/library/_json.py13CODE
LOWguidance/library/_gen.py13CODE
LOWguidance/models/_azureai.py76CODE
LOWguidance/models/_azureai.py276CODE
LOWguidance/models/_transformers.py582CODE
LOWguidance/models/_onnxruntime.py31CODE
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWguidance/resources/graphpaper-inline.html29/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla PubCOMMENT
LOWtests/model_specific/test_transformers.py35 big_opts = ["Lorem ipsum dolor sit amet", "Duis aute irure dolor "]CODE
LOWtests/model_specific/test_transformers.py35 big_opts = ["Lorem ipsum dolor sit amet", "Duis aute irure dolor "]CODE
LOWtests/model_integration/library/test_subgrammar.py62 lm += "John Doe's name, age, and birthday:\n"CODE
AI Slop Vocabulary2 hits · 3 pts
SeverityFileLineSnippetContext
LOWguidance/models/_transformers.py127 # (that will just add extra spaces during an encode-decode cycle)COMMENT
LOWguidance/models/_engine/_engine.py614 # If we have top_k, we can just return the first oneCOMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWguidance/models/broken_models/_lite_llm.py139# # make sure you don't try and instruct the same model twiceCOMMENT
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/model_integration/test_model.py41 def my_function(lm):STRING
LOWtests/model_integration/test_model.py77 def my_function(lm):CODE