AI Slop Code RIsk Monitor

StarTrail-org/LEANN

[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.

27.5 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for StarTrail-org/LEANN, a Python project with 13,016 GitHub stars. SynthScan examined 78,050 lines of code across 259 source files, recording 1455 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 27.5 (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.

27.5
Adjusted Signal
27.5
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
13.0K
Stars
Python
Language
78.0K
Lines of Code
259
Files
1.5K
Pattern Hits
2026-10-12
Scan Date
0.39
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 49.3/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 5.2/100 · LOW

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

Agent Over-Engineering Ratio 62.2/100 · HIGH

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

PR Review Velocity Impact 76.5/100 · CRITICAL

Which changes need focused human review? 1455 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 101MEDIUM 150LOW 1204

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 1455 distinct pattern matches across 21 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 Identifiers495 hits · 506 pts
SeverityFileLineSnippetContext
LOWtests/test_document_rag.py23def test_document_rag_simulated(test_data_dir):CODE
LOWtests/test_document_rag.py64def test_document_rag_with_ast_chunking(test_data_dir):CODE
LOWtests/test_document_rag.py150def test_document_rag_error_handling(test_data_dir):CODE
LOWtests/test_cli_ask.py7def test_cli_ask_accepts_positional_query(tmp_path, monkeypatch):CODE
LOWtests/test_cli_ask.py20def test_cli_ask_parses_metadata_filters_flag():CODE
LOWtests/test_cli_ask.py38def test_cli_ask_metadata_filters_default_is_none():CODE
LOWtests/test_cli_ask.py47def test_cli_ask_rejects_invalid_metadata_filters_json(tmp_path, monkeypatch, capsys):CODE
LOWtests/test_cli_ask.py65def test_cli_ask_rejects_non_object_metadata_filters(tmp_path, monkeypatch, capsys):CODE
LOWtests/test_embedding_server_manager.py92def test_server_restarts_when_metadata_changes(tmp_path, embedding_manager):CODE
LOWtests/test_embedding_server_manager.py146def test_list_daemons_ignores_stale_records(tmp_path, monkeypatch):CODE
LOWtests/test_embedding_server_manager.py169def test_stop_daemons_filters_by_backend_and_passages(tmp_path, monkeypatch):CODE
LOWtests/test_embedding_server_manager.py220def test_daemon_registry_reuse_across_manager_instances(tmp_path, monkeypatch):CODE
LOWtests/test_embedding_server_manager.py266def test_stale_registry_falls_back_to_fresh_start(tmp_path, monkeypatch):CODE
LOWtests/test_embedding_server_manager.py323def test_build_server_command_includes_daemon_and_warmup_flags():CODE
LOWtests/test_embedding_server_manager.py351def test_corrupted_registry_file_is_recovered_on_start(tmp_path, monkeypatch):CODE
LOWtests/test_embedding_server_manager.py393def test_stop_server_detaches_when_daemon_mode(monkeypatch):CODE
LOWtests/test_embedding_server_manager.py417def test_concurrent_daemon_start_only_spawns_once(tmp_path, monkeypatch):CODE
LOWtests/test_embedding_server_manager.py462def test_registry_record_write_is_atomic(tmp_path, monkeypatch):CODE
LOWtests/test_embedding_server_manager.py492def test_different_passages_files_start_separate_daemons(tmp_path, monkeypatch):CODE
LOWtests/test_embedding_server_manager.py581def test_same_passages_file_reuses_existing_daemon(tmp_path, monkeypatch):CODE
LOWtests/test_embedding_server_manager.py627def test_stale_lock_info_removed_when_pid_dead(tmp_path, monkeypatch):CODE
LOWtests/test_hybrid_search.py91 def test_hybrid_search_balanced(self, sample_index):CODE
LOWtests/test_hybrid_search.py104 def test_hybrid_search_vector_heavy(self, sample_index):CODE
LOWtests/test_hybrid_search.py119 def test_hybrid_search_keyword_heavy(self, sample_index):CODE
LOWtests/test_hybrid_search.py136 def test_hybrid_search_score_combination(self, sample_index):CODE
LOWtests/test_hybrid_search.py154 def test_hybrid_search_with_metadata_filters(self, sample_index):CODE
LOWtests/test_prompt_template_persistence.py47 def test_prompt_template_saved_to_metadata(self, temp_index_dir, mock_embeddings):CODE
LOWtests/test_prompt_template_persistence.py100 def test_prompt_template_absent_when_not_provided(self, temp_index_dir, mock_embeddings):CODE
LOWtests/test_prompt_template_persistence.py158 def test_search_without_template_in_metadata(self, temp_index_dir, mock_embeddings):CODE
LOWtests/test_prompt_template_persistence.py214 def test_search_auto_loads_query_template(self, temp_index_dir, mock_compute_embeddings):CODE
LOWtests/test_prompt_template_persistence.py270 def test_search_backward_compat_single_template(self, temp_index_dir, mock_compute_embeddings):CODE
LOWtests/test_prompt_template_persistence.py316 def test_search_backward_compat_no_template(self, temp_index_dir, mock_compute_embeddings):CODE
LOWtests/test_prompt_template_persistence.py362 def test_search_override_via_provider_options(self, temp_index_dir, mock_compute_embeddings):CODE
LOWtests/test_prompt_template_persistence.py436 def mock_embedding_server_manager(self):CODE
LOWtests/test_prompt_template_persistence.py485 def test_prompt_template_metadata_with_embedding_modes(CODE
LOWtests/test_prompt_template_persistence.py578 def test_query_template_applied_in_fallback_path(self, temp_index_with_template):CODE
LOWtests/test_prompt_template_persistence.py636 def test_query_template_applied_in_server_path(self, temp_index_with_template):CODE
LOWtests/test_prompt_template_persistence.py675 def mock_ensure_server_running(passages_file, port, **kwargs):CODE
LOWtests/test_prompt_template_persistence.py678 def mock_compute_embedding_via_server(chunks, port):CODE
LOWtests/test_prompt_template_persistence.py697 def test_query_template_without_template_parameter(self, temp_index_with_template):CODE
LOWtests/test_prompt_template_persistence.py750 def test_query_template_consistency_between_paths(self, temp_index_with_template):CODE
LOWtests/test_prompt_template_persistence.py806 def mock_ensure_server_running(passages_file, port, **kwargs):CODE
LOWtests/test_prompt_template_persistence.py809 def mock_compute_embedding_via_server(chunks, port):CODE
LOWtests/test_prompt_template_persistence.py828 def test_query_template_with_empty_string(self, temp_index_with_template):CODE
LOW⚡tests/test_mcp_status_metadata.py51def test_index_metadata_survives_the_passage_count(status_text):CODE
LOW⚡tests/test_mcp_status_metadata.py59def test_passage_counting_still_reports_chunks_and_files(status_text):CODE
LOW⚡tests/test_mcp_status_metadata.py66def test_a_malformed_final_passage_line_does_not_change_the_report(status_text):CODE
LOWtests/test_mcp_base_dir.py16def test_base_dir_applies_to_cli_and_local_index_reads(tmp_path, monkeypatch, relative_base_dir):CODE
LOW⚡tests/test_atlascloud_provider.py34 def test_resolve_atlascloud_api_key_explicit(self):CODE
LOW⚡tests/test_atlascloud_provider.py37 def test_resolve_atlascloud_api_key_from_primary_env(self):CODE
LOW⚡tests/test_atlascloud_provider.py41 def test_resolve_atlascloud_api_key_from_spaced_env(self):CODE
LOW⚡tests/test_atlascloud_provider.py45 def test_resolve_atlascloud_api_key_does_not_fallback_to_openai(self):CODE
LOW⚡tests/test_atlascloud_provider.py49 def test_resolve_atlascloud_base_url_default(self):CODE
LOW⚡tests/test_atlascloud_provider.py53 def test_resolve_atlascloud_base_url_explicit(self):CODE
LOW⚡tests/test_atlascloud_provider.py56 def test_resolve_atlascloud_base_url_env_precedence(self):CODE
LOWtests/test_atlascloud_provider.py67 def test_resolve_atlascloud_base_url_strips_trailing_slash(self):CODE
LOWtests/test_atlascloud_provider.py77 def test_init_requires_api_key(self):CODE
LOWtests/test_atlascloud_provider.py104 def test_init_custom_base_url(self, mock_openai_cls):CODE
LOWtests/test_atlascloud_provider.py111 def test_ask_returns_response(self, mock_openai_cls):CODE
LOWtests/test_atlascloud_provider.py184 def test_get_llm_atlascloud_aliases(self, mock_openai_cls, provider_type):CODE
435 more matches not shown…
Empty Error Handlers90 hits · 450 pts
SeverityFileLineSnippetContext
HIGHtests/test_cli_prompt_template.py500except SystemExit:CODE
HIGHtests/test_cli_prompt_template.py527except SystemExit:CODE
HIGHtests/test_prompt_template_e2e.py78except Exception:CODE
HIGHtests/support/fake_embedding_server_module.py52except socket.timeout:CODE
HIGHtests/support/fake_embedding_server_module.py49except Exception:CODE
HIGHbenchmarks/llm_utils.py51except (ValueError, IndexError):CODE
HIGHbenchmarks/diskann_vs_hnsw_speed_comparison.py24except Exception:CODE
HIGHbenchmarks/diskann_vs_hnsw_speed_comparison.py281except Exception:CODE
HIGHbenchmarks/diskann_vs_hnsw_speed_comparison.py279except Exception:CODE
HIGHbenchmarks/update/bench_update_vs_offline_search.py177except AttributeError:CODE
HIGHbenchmarks/update/bench_update_vs_offline_search.py418except Exception as _e:CODE
HIGHbenchmarks/update/bench_update_vs_offline_search.py549except Exception:CODE
HIGHbenchmarks/update/plot_bench_results.py214except Exception:CODE
HIGHbenchmarks/update/plot_bench_results.py219except Exception:CODE
HIGHbenchmarks/update/bench_hnsw_rng_recompute.py221except AttributeError:CODE
HIGHbenchmarks/update/bench_hnsw_rng_recompute.py325except AttributeError:CODE
HIGHbenchmarks/update/bench_hnsw_rng_recompute.py214except AttributeError:CODE
HIGHbenchmarks/update/bench_hnsw_rng_recompute.py355except zmq.error.Again:CODE
HIGHbenchmarks/update/bench_hnsw_rng_recompute.py537except OSError:CODE
HIGHbenchmarks/contextbench/scripts/auto_run.py705except Exception:CODE
HIGHbenchmarks/contextbench/scripts/batch_run_selected.py88except Exception:CODE
HIGHbenchmarks/contextbench/scripts/batch_run_random.py34except Exception:CODE
HIGHbenchmarks/bm25_diskann_baselines/run_bm25.py112except Exception:CODE
HIGHbenchmarks/bm25_diskann_baselines/run_bm25.py135except Exception:CODE
HIGHscripts/hf_upload.py38except Exception:CODE
HIGHscripts/hf_upload.py46except Exception:CODE
HIGHpackages/leann-core/src/leann/registry.py77except ImportError:CODE
HIGHpackages/leann-core/src/leann/interactive_utils.py21except ImportError:CODE
HIGHpackages/leann-core/src/leann/interactive_utils.py76except (FileNotFoundError, FileExistsError, OSError):CODE
HIGHpackages/leann-core/src/leann/embedding_compute.py285except Exception:CODE
HIGHpackages/leann-core/src/leann/embedding_compute.py735except Exception:CODE
HIGHpackages/leann-core/src/leann/embedding_compute.py831except Exception:CODE
HIGHpackages/leann-core/src/leann/embedding_compute.py1189except requests.exceptions.RequestException:CODE
HIGHpackages/leann-core/src/leann/embedding_compute.py597except AttributeError:CODE
HIGHpackages/leann-core/src/leann/embedding_compute.py824except (RuntimeError, AttributeError):CODE
HIGHpackages/leann-core/src/leann/api.py649except Exception:CODE
HIGHpackages/leann-core/src/leann/api.py799except Exception:CODE
HIGHpackages/leann-core/src/leann/api.py1738except Exception:CODE
HIGHpackages/leann-core/src/leann/api.py1744except Exception:CODE
HIGHpackages/leann-core/src/leann/api.py1864except Exception:CODE
HIGHpackages/leann-core/src/leann/api.py1870except Exception:CODE
HIGHpackages/leann-core/src/leann/api.py1113except AttributeError:CODE
HIGHpackages/leann-core/src/leann/chat.py104except Exception:CODE
HIGHpackages/leann-core/src/leann/cli.py60except ImportError:CODE
HIGHpackages/leann-core/src/leann/cli.py1068except Exception:CODE
HIGHpackages/leann-core/src/leann/cli.py1312except Exception:CODE
HIGHpackages/leann-core/src/leann/cli.py1488except (OSError, PermissionError):CODE
HIGHpackages/leann-core/src/leann/cli.py1240except Exception:CODE
HIGHpackages/leann-core/src/leann/cli.py1250except Exception:CODE
HIGHpackages/leann-core/src/leann/cli.py1267except (OSError, PermissionError):CODE
HIGHpackages/leann-core/src/leann/cli.py1353except Exception:CODE
HIGHpackages/leann-core/src/leann/cli.py1380except Exception:CODE
HIGHpackages/leann-core/src/leann/cli.py1219except (OSError, PermissionError):CODE
HIGHpackages/leann-core/src/leann/mcp.py251except (OSError, ValueError):CODE
HIGHpackages/leann-core/src/leann/mcp.py297except json.JSONDecodeError:CODE
HIGH…kages/leann-core/src/leann/embedding_server_manager.py44except ImportError:CODE
HIGH…kages/leann-core/src/leann/embedding_server_manager.py80except ImportError:CODE
HIGH…kages/leann-core/src/leann/embedding_server_manager.py92except (ImportError, OSError):CODE
HIGH…kages/leann-core/src/leann/embedding_server_manager.py610except Exception:CODE
HIGH…kages/leann-core/src/leann/embedding_server_manager.py652except Exception:CODE
30 more matches not shown…
Excessive Try-Catch Wrapping400 hits · 417 pts
SeverityFileLineSnippetContext
LOWtests/test_mcp_integration.py202 except Exception as e:CODE
LOWtests/test_mcp_standalone.py212 except Exception as e:CODE
LOW⚡tests/test_prompt_template_e2e.py201 except Exception as e:CODE
LOW⚡tests/test_prompt_template_e2e.py299 except Exception as e:CODE
LOWtests/test_prompt_template_e2e.py44 except Exception:CODE
LOWtests/test_prompt_template_e2e.py55 except Exception:CODE
LOWtests/test_prompt_template_e2e.py66 except Exception:CODE
LOWtests/test_prompt_template_e2e.py78 except Exception:CODE
LOWtests/test_prompt_template_e2e.py245 except Exception as e:CODE
LOWtests/test_prompt_template_e2e.py267 except Exception as e:CODE
LOWtests/test_prompt_template_e2e.py333 except Exception as e:CODE
LOWtests/test_prompt_template_e2e.py390 except Exception as e:CODE
LOWtests/support/fake_embedding_server_module.py49 except Exception:CODE
LOWdocs/code/embedding_model_compare.py81except Exception as e:CODE
LOWdocs/code/embedding_model_compare.py91except Exception as e:CODE
LOW⚡examples/spoiler_free_book_rag.py189 except Exception as e:CODE
LOWexamples/spoiler_free_book_rag.py237 except Exception as e:CODE
LOWexamples/spoiler_free_book_rag.py249 except Exception as e:CODE
LOW⚡benchmarks/run_evaluation.py58 except Exception as e:CODE
MEDIUM⚡benchmarks/run_evaluation.py59 print(f"An error occurred during data download: {e}")CODE
LOWbenchmarks/run_evaluation.py95 except Exception as e:CODE
MEDIUMbenchmarks/run_evaluation.py96 print(f"Error downloading embeddings: {e}")CODE
LOWbenchmarks/run_evaluation.py385 except Exception as e:CODE
LOWbenchmarks/micro_tpt.py224 except Exception as e:CODE
LOWbenchmarks/micro_tpt.py419 except Exception as e:CODE
LOWbenchmarks/micro_tpt.py487 except Exception as e:CODE
MEDIUMbenchmarks/micro_tpt.py488 print(f"Error during inference: {e}")CODE
LOWbenchmarks/micro_tpt.py651 except Exception as e:CODE
LOWbenchmarks/compare_faiss_vs_leann.py91 except Exception as e:CODE
LOWbenchmarks/llm_utils.py234 except Exception as e:CODE
LOWbenchmarks/llm_utils.py253 except Exception as e2:CODE
LOWbenchmarks/simple_mac_tpt_test.py54 except Exception as e:CODE
MEDIUMbenchmarks/simple_mac_tpt_test.py55 print(f"Error loading MLX model: {e}")CODE
LOWbenchmarks/simple_mac_tpt_test.py81 except Exception as e:CODE
LOW⚡benchmarks/simple_mac_tpt_test.py107 except Exception as e:CODE
LOW⚡benchmarks/simple_mac_tpt_test.py117 except Exception as e:CODE
MEDIUM⚡benchmarks/simple_mac_tpt_test.py118 print(f"Error during MLX inference: {e}")CODE
LOWbenchmarks/simple_mac_tpt_test.py212 except Exception as e:CODE
MEDIUMbenchmarks/simple_mac_tpt_test.py213 print(f"Error during inference: {e}")CODE
LOWbenchmarks/simple_mac_tpt_test.py260 except Exception as e:CODE
LOWbenchmarks/simple_mac_tpt_test.py297 except Exception as e:CODE
LOWbenchmarks/diskann_vs_hnsw_speed_comparison.py24except Exception:CODE
LOWbenchmarks/diskann_vs_hnsw_speed_comparison.py130 except Exception as e:CODE
LOWbenchmarks/diskann_vs_hnsw_speed_comparison.py265 except Exception as e:CODE
LOWbenchmarks/diskann_vs_hnsw_speed_comparison.py279 except Exception:CODE
LOWbenchmarks/diskann_vs_hnsw_speed_comparison.py281 except Exception:CODE
LOWbenchmarks/faiss_only.py98 except Exception as e:CODE
LOWbenchmarks/financebench/evaluate_financebench.py444 except Exception as e:CODE
LOWbenchmarks/financebench/evaluate_financebench.py500 except Exception as e:CODE
LOWbenchmarks/financebench/evaluate_financebench.py858 except Exception as e:CODE
LOWbenchmarks/financebench/evaluate_financebench.py919 except Exception as e:CODE
LOWbenchmarks/financebench/setup_financebench.py83 except Exception as e:CODE
LOWbenchmarks/financebench/setup_financebench.py166 except Exception as e:CODE
LOWbenchmarks/financebench/setup_financebench.py367 except Exception as e:CODE
LOWbenchmarks/financebench/setup_financebench.py456 except Exception as e:CODE
LOWbenchmarks/update/bench_update_vs_offline_search.py418 except Exception as _e:CODE
LOWbenchmarks/update/bench_update_vs_offline_search.py549 except Exception:CODE
LOWbenchmarks/update/plot_bench_results.py182 except Exception as e:CODE
LOWbenchmarks/update/plot_bench_results.py203 except Exception:CODE
LOWbenchmarks/update/plot_bench_results.py214 except Exception:CODE
340 more matches not shown…
Modern AI Meta-Vocabulary49 hits · 156 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md248## RAG on Everything!COMMENT
MEDIUMREADME.md385LEANN_EMBEDDING_DEVICE # GPU for embedding model (e.g., cuda:0, cuda:1, cpu)CODE
MEDIUMREADME.md456# Or use the specialized code RAG for better code understandingCOMMENT
MEDIUMREADME.md510### 📧 Your Personal Email Secretary: RAG on Apple Mail!COMMENT
MEDIUMREADME.md555### 🔍 Time Machine for the Web: RAG Your Entire Chrome Browser History!COMMENT
MEDIUMREADME.md910### MCP Integration: RAG on Live Data from Any PlatformCOMMENT
MEDIUMCLAUDE.md83### RAG Applications (`apps/`)COMMENT
MEDIUMCLAUDE.md142# Document RAG (easiest to test)COMMENT
MEDIUMCLAUDE.md145# Code RAGCOMMENT
MEDIUM⚡tests/test_prompt_template_e2e.py207 # Get any available embedding modelCOMMENT
MEDIUM⚡tests/test_prompt_template_e2e.py310 # Get any available embedding modelCOMMENT
MEDIUMtests/test_prompt_template_e2e.py162 # Get any available embedding modelCOMMENT
MEDIUMtests/test_prompt_template_e2e.py367 # Get any available embedding modelCOMMENT
MEDIUMdocs/metadata_filtering.md221# Run the spoiler-free book RAG exampleCOMMENT
MEDIUMdocs/THINKING_BUDGET_FEATURE.md24# RAG ExamplesCOMMENT
MEDIUM⚡docs/THINKING_BUDGET_FEATURE.md98### RAG ExamplesCOMMENT
MEDIUM⚡docs/THINKING_BUDGET_FEATURE.md100# Email RAG with high reasoningCOMMENT
MEDIUM⚡docs/THINKING_BUDGET_FEATURE.md103# Document RAG with medium reasoningCOMMENT
MEDIUMdocs/slack-setup-guide.md155### 5.3 Real RAG Query ExamplesCOMMENT
MEDIUMdocs/configuration-guide.md64# First, pull an embedding modelCOMMENT
MEDIUMdocs/user-scripts.md47# Download embedding modelCOMMENT
MEDIUMdocs/user-scripts.md152# Change embedding modelCOMMENT
MEDIUMdocs/ast_chunking_guide.md82### Document RAG with Code SupportCOMMENT
MEDIUMdocs/ast_chunking_guide.md85# Enable code chunking in document RAGCOMMENT
MEDIUMdocs/issue-proposals/smart-embedding-default.md1# Smart default embedding model based on platform and corpus sizeCOMMENT
MEDIUMbenchmarks/financebench/README.md1# FinanceBench Benchmark for LEANN-RAGCOMMENT
MEDIUMbenchmarks/financebench/README.md49# RAG generation evaluation with Qwen3-8BCOMMENT
MEDIUMbenchmarks/financebench/README.md69### LEANN-RAG Performance (sentence-transformers/all-mpnet-base-v2)COMMENT
MEDIUMbenchmarks/financebench/README.md88### LEANN-RAG Generation Performance (Qwen3-8B)COMMENT
MEDIUMbenchmarks/update/bench_update_vs_offline_search.py583 # Warmup the embedding model before benchmarking (do this for both --only B and --only both)COMMENT
MEDIUMbenchmarks/laion/README.md129### LEANN-RAG Performance (CLIP ViT-L/14 + Qwen2.5-VL)COMMENT
MEDIUMbenchmarks/enron_emails/evaluate_enron_emails.py166 # Read metadata to get passage source and embedding modelCOMMENT
MEDIUMbenchmarks/enron_emails/setup_enron_emails.py221 # Read meta for passage source and embedding modelCOMMENT
MEDIUMbenchmarks/data/README.md5# LEANN-RAG Evaluation DataCOMMENT
MEDIUM⚡packages/leann-core/src/leann/embedding_compute.py1130 # Check if it's an embedding model (by name patterns or known models)COMMENT
MEDIUMpackages/leann-core/src/leann/mcp.py235 # Auto-detect embedding model from existing index to ensure incrementalCOMMENT
MEDIUMapps/email_rag.py147 # Example queries for email RAGCOMMENT
MEDIUMapps/chatgpt_rag.py171 # Example queries for ChatGPT RAGCOMMENT
MEDIUMapps/wechat_rag.py179 # Example queries for WeChat RAGCOMMENT
MEDIUMapps/claude_rag.py174 # Example queries for Claude RAGCOMMENT
MEDIUMapps/browser_rag.py156 # Example queries for browser history RAGCOMMENT
MEDIUMapps/twitter_rag.py186 # Run the standard RAG pipelineCOMMENT
MEDIUMapps/slack_rag.py218 # Run the standard RAG pipelineCOMMENT
MEDIUMapps/document_rag.py111 # Example queries for document RAGCOMMENT
MEDIUMapps/colqwen_rag.py401 # Initialize ColQwen RAGCOMMENT
MEDIUMapps/code_rag.py165 use_ast_chunking=True, # Always use AST for code RAGCODE
MEDIUMapps/code_rag.py184 # Example queries for code RAGCOMMENT
MEDIUMapps/image_rag.py41 # Override default embedding model to use CLIPCOMMENT
MEDIUM⚡apps/base_rag_example.py357 # Warn if any chunks may exceed the embedding model's token limitCOMMENT
Deep Nesting127 hits · 102 pts
SeverityFileLineSnippetContext
LOWtests/test_build_from_arrays.py179CODE
LOWtests/test_build_from_arrays.py282CODE
LOWtests/test_cli_index_commands.py62CODE
LOWtests/support/fake_embedding_server_module.py7CODE
LOWbenchmarks/run_evaluation.py168CODE
LOWbenchmarks/micro_tpt.py228CODE
LOWbenchmarks/micro_tpt.py455CODE
LOWbenchmarks/compare_faiss_vs_leann.py98CODE
LOWbenchmarks/simple_mac_tpt_test.py88CODE
LOWbenchmarks/financebench/evaluate_financebench.py582CODE
LOWbenchmarks/financebench/setup_financebench.py271CODE
LOWbenchmarks/financebench/verify_recall.py48CODE
LOWbenchmarks/update/bench_update_vs_offline_search.py297CODE
LOWbenchmarks/update/plot_bench_results.py116CODE
LOWbenchmarks/update/bench_hnsw_rng_recompute.py362CODE
LOWbenchmarks/laion/evaluate_laion.py391CODE
LOWbenchmarks/laion/setup_laion.py462CODE
LOWbenchmarks/contextbench/scripts/auto_run.py77CODE
LOWbenchmarks/contextbench/scripts/auto_run.py219CODE
LOWbenchmarks/contextbench/scripts/auto_run.py272CODE
LOWbenchmarks/contextbench/scripts/auto_run.py380CODE
LOWbenchmarks/contextbench/scripts/auto_run.py454CODE
LOWbenchmarks/contextbench/scripts/auto_run.py522CODE
LOWbenchmarks/contextbench/scripts/auto_run.py667CODE
LOWbenchmarks/contextbench/scripts/batch_run_selected.py92CODE
LOWbenchmarks/contextbench/scripts/batch_run_random.py38CODE
LOWbenchmarks/enron_emails/evaluate_enron_emails.py366CODE
LOWbenchmarks/bm25_diskann_baselines/run_bm25.py23CODE
LOWbenchmarks/bm25_diskann_baselines/run_bm25.py66CODE
LOWpackages/leann-core/src/leann/react_agent.py129CODE
LOWpackages/leann-core/src/leann/react_agent.py182CODE
LOWpackages/leann-core/src/leann/readers.py162CODE
LOWpackages/leann-core/src/leann/readers.py590CODE
LOWpackages/leann-core/src/leann/interactive_utils.py131CODE
LOWpackages/leann-core/src/leann/chunking_utils.py73CODE
LOWpackages/leann-core/src/leann/chunking_utils.py196CODE
LOWpackages/leann-core/src/leann/chunking_utils.py294CODE
LOWpackages/leann-core/src/leann/chunking_utils.py404CODE
LOWpackages/leann-core/src/leann/embedding_compute.py136CODE
LOWpackages/leann-core/src/leann/embedding_compute.py202CODE
LOWpackages/leann-core/src/leann/embedding_compute.py422CODE
LOWpackages/leann-core/src/leann/embedding_compute.py502CODE
LOWpackages/leann-core/src/leann/embedding_compute.py1057CODE
LOWpackages/leann-core/src/leann/embedding_compute.py1231CODE
LOWpackages/leann-core/src/leann/api.py164CODE
LOWpackages/leann-core/src/leann/api.py422CODE
LOWpackages/leann-core/src/leann/api.py893CODE
LOWpackages/leann-core/src/leann/api.py1317CODE
LOWpackages/leann-core/src/leann/api.py1593CODE
LOWpackages/leann-core/src/leann/chat.py207CODE
LOWpackages/leann-core/src/leann/chat.py255CODE
LOWpackages/leann-core/src/leann/chat.py326CODE
LOWpackages/leann-core/src/leann/chat.py1262CODE
LOWpackages/leann-core/src/leann/chat.py503CODE
LOWpackages/leann-core/src/leann/chat.py570CODE
LOWpackages/leann-core/src/leann/cli.py1014CODE
LOWpackages/leann-core/src/leann/cli.py1057CODE
LOWpackages/leann-core/src/leann/cli.py1183CODE
LOWpackages/leann-core/src/leann/cli.py1298CODE
LOWpackages/leann-core/src/leann/cli.py1450CODE
67 more matches not shown…
Redundant / Tautological Comments62 hits · 87 pts
SeverityFileLineSnippetContext
LOW⚡benchmarks/run_evaluation.py68 # Check if specific dataset embeddings existCOMMENT
LOWbenchmarks/micro_tpt.py131 # Check if using SDPA (only on CUDA)COMMENT
LOWbenchmarks/micro_tpt.py238 # Check if using custom 8bit quantizationCOMMENT
LOWbenchmarks/micro_tpt.py328 # Check if model loaded successfullyCOMMENT
LOWbenchmarks/compare_faiss_vs_leann.py144 # Check if index already existsCOMMENT
LOWbenchmarks/faiss_only.py82 # Check if index already exists and try to load itCOMMENT
LOWbenchmarks/financebench/evaluate_financebench.py604 # Check if baseline existsCOMMENT
LOWbenchmarks/financebench/evaluate_financebench.py877 # Print resultsCOMMENT
LOWbenchmarks/financebench/setup_financebench.py134 # Check if we have PDFsCOMMENT
LOWbenchmarks/financebench/verify_recall.py161 # Check if files existCOMMENT
LOWbenchmarks/laion/evaluate_laion.py419 # Check if baseline existsCOMMENT
LOWbenchmarks/enron_emails/evaluate_enron_emails.py524 # Check if Stage 4 results existCOMMENT
LOW⚡packages/leann-core/src/leann/embedding_compute.py1130 # Check if it's an embedding model (by name patterns or known models)COMMENT
LOW⚡packages/leann-core/src/leann/embedding_compute.py1135 # Check if model exists (handle versioned names) and resolve to full nameCOMMENT
LOWpackages/leann-core/src/leann/embedding_compute.py1096 # Check if Ollama is runningCOMMENT
LOWpackages/leann-core/src/leann/embedding_compute.py1112 # Check if model exists and provide helpful suggestionsCOMMENT
LOW⚡packages/leann-core/src/leann/embedding_compute.py701 # Set model to eval mode and disable gradients for inferenceSTRING
LOWpackages/leann-core/src/leann/embedding_compute.py265 # Set NODE_PATH to include global modules for @lmstudio/sdk resolutionSTRING
LOWpackages/leann-core/src/leann/embedding_compute.py568 # Check if model is already cachedSTRING
LOWpackages/leann-core/src/leann/api.py471 # Check if we need to use cosine distance for normalized embeddingsCOMMENT
LOW⚡packages/leann-core/src/leann/chat.py96 # Check if exact model existsCOMMENT
LOW⚡packages/leann-core/src/leann/chat.py336 # Check if the model exists remotely and get available tagsCOMMENT
LOWpackages/leann-core/src/leann/chat.py482 # Check if the Ollama server is responsiveCOMMENT
LOWpackages/leann-core/src/leann/chat.py671 # Check if this is a Qwen model and add /no_think by defaultCOMMENT
LOWpackages/leann-core/src/leann/chat.py845 # Check if this is an o-series model (partial match for model names)COMMENT
LOW⚡packages/leann-core/src/leann/cli.py1028 # Check if this path appears in .gitmodulesCOMMENT
LOWpackages/leann-core/src/leann/cli.py1629 # Check if this is a git submodule - if so, skip itCOMMENT
LOWpackages/leann-core/src/leann/cli.py1735 # Check if we should process PDFsCOMMENT
LOWpackages/leann-core/src/leann/cli.py1740 # Check if file matches any exclude patternCOMMENT
LOWpackages/leann-core/src/leann/cli.py1891 # Check if AST chunking is requestedCOMMENT
LOWpackages/leann-core/src/leann/cli.py1924 # Check if this is a code file based on source pathCOMMENT
LOW…ckend-diskann/leann_backend_diskann/graph_partition.py77 # Check if executables were createdCOMMENT
LOW…ckend-diskann/leann_backend_diskann/diskann_backend.py165 # Check if all required files existCOMMENT
LOW.github/workflows/release-manual.yml151 # Check if tag already existsCOMMENT
LOW.github/workflows/release-manual.yml160 # Check if release already existsCOMMENT
LOW.github/workflows/build-reusable.yml334 # Set CMAKE_PREFIX_PATH to let CMake find all packages automaticallyCOMMENT
LOWapps/wechat_rag.py60 # Check if WeChat is runningCOMMENT
LOWapps/document_rag.py63 # Check if data directory existsCOMMENT
LOWapps/colqwen_rag.py289 # Display resultsCOMMENT
LOWapps/code_rag.py87 # Check if repository directory existsCOMMENT
LOWapps/code_rag.py105 # Check if in excluded directoryCOMMENT
LOWapps/base_rag_example.py468 # Check if index existsCOMMENT
LOWapps/semantic_file_search/leann-plus-temporal-search.py108 # Check if clean_query is less than 4 charactersCOMMENT
LOWapps/semantic_file_search/leann-plus-temporal-search.py150 # Print resultsCOMMENT
LOWapps/semantic_file_search/spotlight_index_dump.py69 # Check if it's an absolute path or relativeCOMMENT
LOWapps/history_data/wechat_history.py154 # Check if dict has any readable text fieldsCOMMENT
LOWapps/history_data/wechat_history.py189 # Check if there's actual readable text (not just XML or system messages)COMMENT
LOW⚡apps/history_data/wechat_history.py505 # Check if this is a readable text messageSTRING
LOWapps/history_data/wechat_history.py684 # Check if wechat-exporter directory existsSTRING
LOWapps/history_data/wechat_history.py715 # Check if export was successfulSTRING
LOW…l/vision-based-pdf-multi-vector/vidore_v1_benchmark.py254 # Check if we have any queriesCOMMENT
LOW…l/vision-based-pdf-multi-vector/vidore_v1_benchmark.py304 # Print resultsCOMMENT
LOW…al/vision-based-pdf-multi-vector/leann_multi_vector.py1271 # Check if Fast-Plaid index existsCOMMENT
LOW…al/vision-based-pdf-multi-vector/leann_multi_vector.py1286 # Check if LEANN index existsCOMMENT
LOW…al/vision-based-pdf-multi-vector/leann_multi_vector.py1396 # Check if we have any queries to evaluateCOMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py651 # Check if this image was already seenCOMMENT
LOW…l/vision-based-pdf-multi-vector/vidore_v2_benchmark.py97 # Check if dataset has language field before filteringCOMMENT
LOW…l/vision-based-pdf-multi-vector/vidore_v2_benchmark.py104 # Check if filtering resulted in empty datasetCOMMENT
LOW…l/vision-based-pdf-multi-vector/vidore_v2_benchmark.py238 # Check if we have any queriesCOMMENT
LOW…l/vision-based-pdf-multi-vector/vidore_v2_benchmark.py288 # Print resultsCOMMENT
2 more matches not shown…
Decorative Section Separators22 hits · 78 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_react_dual_source.py33# ── 1. Dual-source presence ──────────────────────────────────────────COMMENT
MEDIUMtests/test_react_dual_source.py58# ── 2. Routing behavior ─────────────────────────────────────────────COMMENT
MEDIUMtests/test_react_dual_source.py132# ── 3. Pipeline correctness ─────────────────────────────────────────COMMENT
MEDIUMtests/test_react_dual_source.py197# ── 4. Edge cases ────────────────────────────────────────────────────COMMENT
MEDIUM⚡benchmarks/contextbench/scripts/auto_run.py449# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡benchmarks/contextbench/scripts/auto_run.py451# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡benchmarks/contextbench/scripts/auto_run.py722# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡benchmarks/contextbench/scripts/auto_run.py724# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmarks/contextbench/scripts/auto_run.py887# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmarks/contextbench/scripts/auto_run.py889# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmarks/enron_emails/setup_enron_emails.py31 # ----------------------------COMMENT
MEDIUMbenchmarks/enron_emails/setup_enron_emails.py33 # ----------------------------COMMENT
MEDIUM⚡benchmarks/enron_emails/setup_enron_emails.py70 # ----------------------------COMMENT
MEDIUM⚡benchmarks/enron_emails/setup_enron_emails.py72 # ----------------------------COMMENT
MEDIUMbenchmarks/enron_emails/setup_enron_emails.py163 # ----------------------------COMMENT
MEDIUMbenchmarks/enron_emails/setup_enron_emails.py165 # ----------------------------COMMENT
MEDIUM⚡benchmarks/enron_emails/setup_enron_emails.py270 # ----------------------------COMMENT
MEDIUM⚡benchmarks/enron_emails/setup_enron_emails.py272 # ----------------------------COMMENT
MEDIUMpackages/leann-core/src/leann/chunking_utils.py320 # ── Token-aware auto-scaling ──────────────────────────────────────COMMENT
MEDIUMpackages/leann-core/src/leann/chunking_utils.py371 # ── Post-chunk validation ─────────────────────────────────────────COMMENT
MEDIUMpackages/leann-core/src/leann/cli.py854 # ── index-* commands: data source indexing ──────────────────────COMMENT
MEDIUMpackages/leann-core/src/leann/cli.py3611 # ── index-* shared handler ──────────────────────────────────────COMMENT
Structural Annotation Overuse40 hits · 74 pts
SeverityFileLineSnippetContext
LOWREADME.md1017# Step 1: Use MCP app to fetch and index dataCOMMENT
LOWREADME.md1020# Step 2: The data is now indexed and available via CLICOMMENT
LOWdocs/slack-setup-guide.md17## Step 1: Create a Slack AppCOMMENT
LOWdocs/slack-setup-guide.md67## Step 2: Install Slack MCP ServerCOMMENT
LOWdocs/slack-setup-guide.md86## Step 3: Install and Configure Ollama (for Real LLM Responses)COMMENT
LOWdocs/slack-setup-guide.md117## Step 4: Configure Environment VariablesCOMMENT
LOWdocs/slack-setup-guide.md132## Step 5: Test the SetupCOMMENT
LOW⚡examples/spoiler_free_book_rag.py180 # Step 1: Prepare book dataCOMMENT
LOW⚡examples/spoiler_free_book_rag.py186 # Step 2: Build the index (in practice, this would be done once)COMMENT
LOW⚡examples/spoiler_free_book_rag.py196 # Step 3: Demonstrate various spoiler-free searchesCOMMENT
LOW⚡benchmarks/financebench/evaluate_financebench.py765 # Step 1: Analyze current (compact) indexCOMMENT
LOW⚡benchmarks/financebench/evaluate_financebench.py770 # Step 2: Use existing non-compact index or create if neededCOMMENT
LOW⚡benchmarks/financebench/evaluate_financebench.py805 # Step 4: Performance comparison between the two indexesCOMMENT
LOW⚡benchmarks/financebench/evaluate_financebench.py814 # Step 5: Generation evaluationCOMMENT
LOWbenchmarks/financebench/evaluate_financebench.py786 # Step 3: Compare index sizesCOMMENT
LOW⚡benchmarks/financebench/setup_financebench.py418 # Step 1: Download datasetCOMMENT
LOW⚡benchmarks/financebench/setup_financebench.py421 # Step 2: Download PDFsCOMMENT
LOW⚡benchmarks/financebench/setup_financebench.py427 # Step 3: Build LEANN indexCOMMENT
LOW⚡benchmarks/financebench/setup_financebench.py433 # Step 4: Build FAISS flat baselineCOMMENT
LOW⚡benchmarks/financebench/setup_financebench.py438 # Step 5: Verify setupCOMMENT
LOW⚡benchmarks/laion/evaluate_laion.py567 # Step 1: Analyze current (compact) indexCOMMENT
LOW⚡benchmarks/laion/evaluate_laion.py572 # Step 2: Use existing non-compact index or create if neededCOMMENT
LOWbenchmarks/laion/evaluate_laion.py586 # Step 3: Compare index sizes (.index only)COMMENT
LOWbenchmarks/laion/evaluate_laion.py605 # Step 4: Performance comparison between the two indexesCOMMENT
LOW⚡benchmarks/laion/setup_laion.py483 # Step 1: Download LAION subsetCOMMENT
LOW⚡benchmarks/laion/setup_laion.py488 # Step 2: Generate CLIP image embeddingsCOMMENT
LOW⚡benchmarks/laion/setup_laion.py492 # Step 3: Create LEANN passages (image metadata with embeddings)COMMENT
LOWbenchmarks/laion/setup_laion.py509 # Step 4: Build LEANN indexes (both compact and non-compact)COMMENT
LOWbenchmarks/laion/setup_laion.py525 # Step 5: Build FAISS flat baselineCOMMENT
LOWbenchmarks/laion/setup_laion.py539 # Step 6: Create evaluation queriesCOMMENT
LOW…modal/vision-based-pdf-multi-vector/colqwen_forward.py57 # Step 1: Load or create test imageCOMMENT
LOW…modal/vision-based-pdf-multi-vector/colqwen_forward.py71 # Step 2: Load modelCOMMENT
LOW⚡…modal/vision-based-pdf-multi-vector/colqwen_forward.py91 # Step 3: Test forward passCOMMENT
LOW⚡…-pdf-multi-vector/multi-vector-leann-similarity-map.py512# Step 4: Build index if neededCOMMENT
LOW⚡…-pdf-multi-vector/multi-vector-leann-similarity-map.py683# Step 6: Similarity maps for top-K resultsCOMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py166# Step 1: Check if we can skip data loading (index already exists)COMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py207# Step 2: Load data only if we need to build the indexCOMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py479# Step 3: Load model and processor (only if we need to build index or perform search)COMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py568# Step 5: Embed query and searchCOMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py720# Step 7: Optional answer generationCOMMENT
Verbosity Indicators33 hits · 64 pts
SeverityFileLineSnippetContext
LOW⚡examples/spoiler_free_book_rag.py180 # Step 1: Prepare book dataCOMMENT
LOW⚡examples/spoiler_free_book_rag.py186 # Step 2: Build the index (in practice, this would be done once)COMMENT
LOW⚡examples/spoiler_free_book_rag.py196 # Step 3: Demonstrate various spoiler-free searchesCOMMENT
LOW⚡benchmarks/financebench/evaluate_financebench.py765 # Step 1: Analyze current (compact) indexCOMMENT
LOW⚡benchmarks/financebench/evaluate_financebench.py770 # Step 2: Use existing non-compact index or create if neededCOMMENT
LOW⚡benchmarks/financebench/evaluate_financebench.py805 # Step 4: Performance comparison between the two indexesCOMMENT
LOW⚡benchmarks/financebench/evaluate_financebench.py814 # Step 5: Generation evaluationCOMMENT
LOWbenchmarks/financebench/evaluate_financebench.py786 # Step 3: Compare index sizesCOMMENT
LOW⚡benchmarks/financebench/setup_financebench.py418 # Step 1: Download datasetCOMMENT
LOW⚡benchmarks/financebench/setup_financebench.py421 # Step 2: Download PDFsCOMMENT
LOW⚡benchmarks/financebench/setup_financebench.py427 # Step 3: Build LEANN indexCOMMENT
LOW⚡benchmarks/financebench/setup_financebench.py433 # Step 4: Build FAISS flat baselineCOMMENT
LOW⚡benchmarks/financebench/setup_financebench.py438 # Step 5: Verify setupCOMMENT
LOW⚡benchmarks/laion/evaluate_laion.py567 # Step 1: Analyze current (compact) indexCOMMENT
LOW⚡benchmarks/laion/evaluate_laion.py572 # Step 2: Use existing non-compact index or create if neededCOMMENT
LOWbenchmarks/laion/evaluate_laion.py586 # Step 3: Compare index sizes (.index only)COMMENT
LOWbenchmarks/laion/evaluate_laion.py605 # Step 4: Performance comparison between the two indexesCOMMENT
LOW⚡benchmarks/laion/setup_laion.py483 # Step 1: Download LAION subsetCOMMENT
LOW⚡benchmarks/laion/setup_laion.py488 # Step 2: Generate CLIP image embeddingsCOMMENT
LOW⚡benchmarks/laion/setup_laion.py492 # Step 3: Create LEANN passages (image metadata with embeddings)COMMENT
LOWbenchmarks/laion/setup_laion.py509 # Step 4: Build LEANN indexes (both compact and non-compact)COMMENT
LOWbenchmarks/laion/setup_laion.py525 # Step 5: Build FAISS flat baselineCOMMENT
LOWbenchmarks/laion/setup_laion.py539 # Step 6: Create evaluation queriesCOMMENT
LOW…modal/vision-based-pdf-multi-vector/colqwen_forward.py57 # Step 1: Load or create test imageCOMMENT
LOW…modal/vision-based-pdf-multi-vector/colqwen_forward.py71 # Step 2: Load modelCOMMENT
LOW⚡…modal/vision-based-pdf-multi-vector/colqwen_forward.py91 # Step 3: Test forward passCOMMENT
LOW⚡…-pdf-multi-vector/multi-vector-leann-similarity-map.py512# Step 4: Build index if neededCOMMENT
LOW⚡…-pdf-multi-vector/multi-vector-leann-similarity-map.py683# Step 6: Similarity maps for top-K resultsCOMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py166# Step 1: Check if we can skip data loading (index already exists)COMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py207# Step 2: Load data only if we need to build the indexCOMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py479# Step 3: Load model and processor (only if we need to build index or perform search)COMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py568# Step 5: Embed query and searchCOMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py720# Step 7: Optional answer generationCOMMENT
Unused Imports51 hits · 50 pts
SeverityFileLineSnippetContext
LOWbenchmarks/micro_tpt.py145CODE
LOWbenchmarks/micro_tpt.py157CODE
LOWscripts/hf_upload.py13CODE
LOWscripts/hf_upload.py43CODE
LOWpackages/leann-core/src/leann/react_agent.py13CODE
LOWpackages/leann-core/src/leann/server.py15CODE
LOWpackages/leann-core/src/leann/registry.py13CODE
LOWpackages/leann-core/src/leann/__init__.py27CODE
LOWpackages/leann-core/src/leann/__init__.py27CODE
LOWpackages/leann-core/src/leann/__init__.py27CODE
LOWpackages/leann-core/src/leann/__init__.py28CODE
LOWpackages/leann-core/src/leann/__init__.py28CODE
LOWpackages/leann-core/src/leann/__init__.py29CODE
LOWpackages/leann-core/src/leann/settings.py3CODE
LOWpackages/leann-core/src/leann/integrations/__init__.py1CODE
LOWpackages/leann-core/src/leann/integrations/__init__.py1CODE
LOWpackages/leann/__init__.py10CODE
LOWpackages/leann/__init__.py10CODE
LOWpackages/leann/__init__.py10CODE
LOW…nn-backend-flashlib/leann_backend_flashlib/__init__.py3CODE
LOW…nn-backend-flashlib/leann_backend_flashlib/__init__.py3CODE
LOW…nn-backend-flashlib/leann_backend_flashlib/__init__.py3CODE
LOW…nd-flashlib-ivf/leann_backend_flashlib_ivf/__init__.py3CODE
LOW…nd-flashlib-ivf/leann_backend_flashlib_ivf/__init__.py3CODE
LOW…nd-flashlib-ivf/leann_backend_flashlib_ivf/__init__.py3CODE
LOW…eann-backend-diskann/leann_backend_diskann/__init__.py58CODE
LOW…eann-backend-diskann/leann_backend_diskann/__init__.py59CODE
LOW…eann-backend-diskann/leann_backend_diskann/__init__.py62CODE
LOW…eann-backend-diskann/leann_backend_diskann/__init__.py62CODE
LOW…ckages/leann-backend-ivf/leann_backend_ivf/__init__.py3CODE
LOW…ckages/leann-backend-ivf/leann_backend_ivf/__init__.py3CODE
LOW…ckages/leann-backend-ivf/leann_backend_ivf/__init__.py3CODE
LOW…ckages/leann-backend-ivf/leann_backend_ivf/__init__.py3CODE
LOW…ckages/leann-backend-ivf/leann_backend_ivf/__init__.py3CODE
LOW…ages/leann-backend-hnsw/leann_backend_hnsw/__init__.py58CODE
LOWapps/history_data/__init__.py1CODE
LOWapps/chunking/__init__.py13CODE
LOWapps/chunking/__init__.py13CODE
LOWapps/chunking/__init__.py13CODE
LOWapps/chunking/__init__.py13CODE
LOWapps/chunking/__init__.py13CODE
LOWapps/chunking/__init__.py13CODE
LOWapps/chunking/__init__.py13CODE
LOWapps/chunking/__init__.py27CODE
LOWapps/chunking/__init__.py27CODE
LOWapps/chunking/__init__.py27CODE
LOWapps/chunking/__init__.py27CODE
LOWapps/chunking/__init__.py27CODE
LOWapps/chunking/__init__.py27CODE
LOWapps/chunking/__init__.py27CODE
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py10CODE
Modern Structural Boilerplate41 hits · 41 pts
SeverityFileLineSnippetContext
LOWtests/test_prompt_template_e2e.py33logger = logging.getLogger(__name__)CODE
LOWbenchmarks/compare_faiss_vs_leann.py19logger = logging.getLogger(__name__)CODE
LOWbenchmarks/update/bench_update_vs_offline_search.py54logger = logging.getLogger(__name__)CODE
LOWbenchmarks/update/__init__.py16__all__ = ["find_repo_root"]CODE
LOWbenchmarks/update/bench_hnsw_rng_recompute.py45logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/sync.py9logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/react_agent.py23logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/registry.py16logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/metadata_filter.py12logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/__init__.py33__all__ = [CODE
LOWpackages/leann-core/src/leann/chunking_utils.py12logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/embedding_compute.py23logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/api.py30logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/api.py893 def update_index(self, index_path: str, remove_passage_ids: Optional[list[str]] = None) -> None:CODE
LOWpackages/leann-core/src/leann/chat.py31logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/settings.py10logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/web_search.py8logger = logging.getLogger(__name__)CODE
LOW…kages/leann-core/src/leann/embedding_server_manager.py25logger = logging.getLogger(__name__)CODE
LOWpackages/leann-core/src/leann/integrations/__init__.py3__all__ = ["LeannHybridRetriever", "LeannRetriever"]CODE
LOWpackages/leann/__init__.py12__all__ = ["LeannBuilder", "LeannChat", "LeannSearcher"]CODE
LOWpackages/wechat-exporter/__init__.py1__all__ = []CODE
LOW…nn-backend-flashlib/leann_backend_flashlib/__init__.py9__all__ = [CODE
LOW…nd-flashlib/leann_backend_flashlib/flashlib_backend.py37logger = logging.getLogger(__name__)CODE
LOW…nd-flashlib-ivf/leann_backend_flashlib_ivf/__init__.py9__all__ = [CODE
LOW…ivf/leann_backend_flashlib_ivf/flashlib_ivf_backend.py44logger = logging.getLogger(__name__)CODE
LOW…eann-backend-diskann/leann_backend_diskann/__init__.py64__all__ = ["GraphPartitioner", "diskann_backend", "graph_partition", "partition_graph"]CODE
LOW…kann/leann_backend_diskann/diskann_embedding_server.py20logger = logging.getLogger(__name__)CODE
LOW…ckend-diskann/leann_backend_diskann/diskann_backend.py20logger = logging.getLogger(__name__)CODE
LOW…ckages/leann-backend-ivf/leann_backend_ivf/__init__.py11__all__ = [CODE
LOW…ges/leann-backend-ivf/leann_backend_ivf/ivf_backend.py28logger = logging.getLogger(__name__)CODE
LOW…eann-backend-hnsw/leann_backend_hnsw/convert_to_csr.py14logger = logging.getLogger(__name__)CODE
LOW…/leann-backend-hnsw/leann_backend_hnsw/hnsw_backend.py19logger = logging.getLogger(__name__)CODE
LOW…ckend-hnsw/leann_backend_hnsw/hnsw_embedding_server.py21logger = logging.getLogger(__name__)CODE
LOWapps/history_data/__init__.py3__all__ = ["ChromeHistoryReader"]CODE
LOWapps/chunking/__init__.py39__all__ = [CODE
LOW…al/vision-based-pdf-multi-vector/leann_multi_vector.py16logger = logging.getLogger(__name__)CODE
LOWapps/gemini_data/gemini_reader.py6logger = logging.getLogger(__name__)CODE
LOWapps/qwen_data/qwen_reader.py6logger = logging.getLogger(__name__)CODE
LOWapps/slack_data/slack_mcp_reader.py16logger = logging.getLogger(__name__)CODE
LOWapps/twitter_data/twitter_mcp_reader.py15logger = logging.getLogger(__name__)CODE
LOWapps/email_data/email.py16logger = logging.getLogger(__name__)CODE
Self-Referential Comments10 hits · 30 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_prompt_template_persistence.py582 # Create a concrete implementation for testingCOMMENT
MEDIUMtests/test_prompt_template_persistence.py640 # Create a concrete implementation for testingCOMMENT
MEDIUMtests/test_metadata_filtering.py313 # Create a real PassageManager instance just for the filtering methodCOMMENT
MEDIUMtests/test_token_truncation.py123 # Create a text that definitely exceeds limitCOMMENT
MEDIUMexamples/mlx_demo.py5# Define the path for our new MLX-based indexCOMMENT
MEDIUMpackages/leann-core/src/leann/cli.py1766 # Create a simple document structureCOMMENT
MEDIUMpackages/leann-core/src/leann/cli.py1792 # Create a custom file filter function using our PathSpecCOMMENT
MEDIUM…modal/vision-based-pdf-multi-vector/colqwen_forward.py24 # Create a simple RGB image (800x600)COMMENT
MEDIUMapps/email_data/email.py64 # Import required librariesCOMMENT
MEDIUMapps/email_data/email.py161 # Create a temporary mbox fileCOMMENT
Magic Placeholder Names5 hits · 28 pts
SeverityFileLineSnippetContext
HIGHREADME.md267export OPENAI_API_KEY="your-api-key-here"CODE
HIGHREADME.md980 export TWITTER_API_KEY="your-api-key"CODE
HIGHdocs/metadata_filtering.md219export OPENAI_API_KEY="your-api-key-here"CODE
HIGHdocs/code/embedding_model_compare.py12# export OPENAI_API_KEY="your-api-key-here"COMMENT
HIGHexamples/mcp_integration_demo.py124 print(" export TWITTER_API_KEY='your-api-key'")CODE
AI Slop Vocabulary8 hits · 22 pts
SeverityFileLineSnippetContext
LOWbenchmarks/micro_tpt.py374 # For now, just use standard loading with INT8 configCOMMENT
MEDIUMbenchmarks/financebench/evaluate_financebench.py626 # Test with more queries for robust measurementCOMMENT
MEDIUMbenchmarks/financebench/evaluate_financebench.py666 # Use more queries for robust measurementCOMMENT
MEDIUMbenchmarks/laion/evaluate_laion.py436 # Test with queries for robust measurementCOMMENT
MEDIUMbenchmarks/laion/evaluate_laion.py470 # Use subset for robust measurementCOMMENT
MEDIUMbenchmarks/laion/evaluate_laion.py622 # Print comprehensive resultsCOMMENT
MEDIUMpackages/leann-core/src/leann/cli.py1285 # Always do a comprehensive search for safetyCOMMENT
MEDIUM…eann-backend-hnsw/leann_backend_hnsw/convert_to_csr.py83 count = -1 # Initialize count for robust error handlingCODE
Cross-File Repetition4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHpackages/leann-core/src/leann/readers.py0initialize. args: concatenate_conversations: whether to concatenate messages within conversations for better contextSTRING
HIGHapps/imessage_data/imessage_reader.py0initialize. args: concatenate_conversations: whether to concatenate messages within conversations for better contextSTRING
HIGHapps/chatgpt_data/chatgpt_reader.py0initialize. args: concatenate_conversations: whether to concatenate messages within conversations for better contextSTRING
HIGHapps/claude_data/claude_reader.py0initialize. args: concatenate_conversations: whether to concatenate messages within conversations for better contextSTRING
Over-Commented Block7 hits · 6 pts
SeverityFileLineSnippetContext
LOWbenchmarks/financebench/verify_recall.py1#!/usr/bin/env python3COMMENT
LOW…marks/contextbench/scripts/prepare_repos_with_leann.py61 # "SWE-Bench-Pro__javascript__maintenance__bugfix__93b583ae",COMMENT
LOWbenchmarks/contextbench/scripts/batch_run_selected.py21# Instances to run. Set instance_ids here or pass via SELECTED_IDS env var (comma-separated).COMMENT
LOWbenchmarks/contextbench/scripts/batch_run_random.py101 # instance_id=instance_id,COMMENT
LOWbenchmarks/contextbench/scripts/batch_run_random.py121 # print(f"✅ Result saved for {instance_id}")COMMENT
LOWbenchmarks/bm25_diskann_baselines/run_bm25.py1# /// scriptCOMMENT
LOW…-pdf-multi-vector/multi-vector-leann-similarity-map.py41QUERY = "The paper talk about the latent video generative model and data curation in the related work part?"COMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtests/test_lmstudio_bridge.py194 mock_result.stdout = '{"contextLength": null, "identifier": "test-model"}'CODE
AI Structural Patterns6 hits · 5 pts
SeverityFileLineSnippetContext
LOWbenchmarks/llm_utils.py278CODE
LOWpackages/leann-core/src/leann/chunking_utils.py404CODE
LOWpackages/leann-core/src/leann/api.py1317CODE
LOWpackages/leann-core/src/leann/api.py1766CODE
LOW…ckend-diskann/leann_backend_diskann/diskann_backend.py475CODE
LOW…l/vision-based-pdf-multi-vector/vidore_v2_benchmark.py186CODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGH…ckend-diskann/leann_backend_diskann/graph_partition.py96 Partition a disk-based index for improved performance. Args: index_prefix_path: Path to thSTRING
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/openclaw/run_docker_test.sh6# Usage:COMMENT
LOW…ckend-diskann/leann_backend_diskann/graph_partition.py288# Example usage:COMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWpackages/leann-core/src/leann/mcp.py328def handle_request(request):CODE