[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.
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 841 finding(s).
Are imports declared and package/API names verified? 57 finding(s).
Are wrappers, guards, and repeated structures necessary? 1058 finding(s).
Which changes need focused human review? 1455 finding(s).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_document_rag.py | 23 | def test_document_rag_simulated(test_data_dir): | CODE |
| LOW | tests/test_document_rag.py | 64 | def test_document_rag_with_ast_chunking(test_data_dir): | CODE |
| LOW | tests/test_document_rag.py | 150 | def test_document_rag_error_handling(test_data_dir): | CODE |
| LOW | tests/test_cli_ask.py | 7 | def test_cli_ask_accepts_positional_query(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_cli_ask.py | 20 | def test_cli_ask_parses_metadata_filters_flag(): | CODE |
| LOW | tests/test_cli_ask.py | 38 | def test_cli_ask_metadata_filters_default_is_none(): | CODE |
| LOW | tests/test_cli_ask.py | 47 | def test_cli_ask_rejects_invalid_metadata_filters_json(tmp_path, monkeypatch, capsys): | CODE |
| LOW | tests/test_cli_ask.py | 65 | def test_cli_ask_rejects_non_object_metadata_filters(tmp_path, monkeypatch, capsys): | CODE |
| LOW | tests/test_embedding_server_manager.py | 92 | def test_server_restarts_when_metadata_changes(tmp_path, embedding_manager): | CODE |
| LOW | tests/test_embedding_server_manager.py | 146 | def test_list_daemons_ignores_stale_records(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_embedding_server_manager.py | 169 | def test_stop_daemons_filters_by_backend_and_passages(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_embedding_server_manager.py | 220 | def test_daemon_registry_reuse_across_manager_instances(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_embedding_server_manager.py | 266 | def test_stale_registry_falls_back_to_fresh_start(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_embedding_server_manager.py | 323 | def test_build_server_command_includes_daemon_and_warmup_flags(): | CODE |
| LOW | tests/test_embedding_server_manager.py | 351 | def test_corrupted_registry_file_is_recovered_on_start(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_embedding_server_manager.py | 393 | def test_stop_server_detaches_when_daemon_mode(monkeypatch): | CODE |
| LOW | tests/test_embedding_server_manager.py | 417 | def test_concurrent_daemon_start_only_spawns_once(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_embedding_server_manager.py | 462 | def test_registry_record_write_is_atomic(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_embedding_server_manager.py | 492 | def test_different_passages_files_start_separate_daemons(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_embedding_server_manager.py | 581 | def test_same_passages_file_reuses_existing_daemon(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_embedding_server_manager.py | 627 | def test_stale_lock_info_removed_when_pid_dead(tmp_path, monkeypatch): | CODE |
| LOW | tests/test_hybrid_search.py | 91 | def test_hybrid_search_balanced(self, sample_index): | CODE |
| LOW | tests/test_hybrid_search.py | 104 | def test_hybrid_search_vector_heavy(self, sample_index): | CODE |
| LOW | tests/test_hybrid_search.py | 119 | def test_hybrid_search_keyword_heavy(self, sample_index): | CODE |
| LOW | tests/test_hybrid_search.py | 136 | def test_hybrid_search_score_combination(self, sample_index): | CODE |
| LOW | tests/test_hybrid_search.py | 154 | def test_hybrid_search_with_metadata_filters(self, sample_index): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 47 | def test_prompt_template_saved_to_metadata(self, temp_index_dir, mock_embeddings): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 100 | def test_prompt_template_absent_when_not_provided(self, temp_index_dir, mock_embeddings): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 158 | def test_search_without_template_in_metadata(self, temp_index_dir, mock_embeddings): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 214 | def test_search_auto_loads_query_template(self, temp_index_dir, mock_compute_embeddings): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 270 | def test_search_backward_compat_single_template(self, temp_index_dir, mock_compute_embeddings): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 316 | def test_search_backward_compat_no_template(self, temp_index_dir, mock_compute_embeddings): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 362 | def test_search_override_via_provider_options(self, temp_index_dir, mock_compute_embeddings): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 436 | def mock_embedding_server_manager(self): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 485 | def test_prompt_template_metadata_with_embedding_modes( | CODE |
| LOW | tests/test_prompt_template_persistence.py | 578 | def test_query_template_applied_in_fallback_path(self, temp_index_with_template): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 636 | def test_query_template_applied_in_server_path(self, temp_index_with_template): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 675 | def mock_ensure_server_running(passages_file, port, **kwargs): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 678 | def mock_compute_embedding_via_server(chunks, port): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 697 | def test_query_template_without_template_parameter(self, temp_index_with_template): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 750 | def test_query_template_consistency_between_paths(self, temp_index_with_template): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 806 | def mock_ensure_server_running(passages_file, port, **kwargs): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 809 | def mock_compute_embedding_via_server(chunks, port): | CODE |
| LOW | tests/test_prompt_template_persistence.py | 828 | def test_query_template_with_empty_string(self, temp_index_with_template): | CODE |
| LOW⚡ | tests/test_mcp_status_metadata.py | 51 | def test_index_metadata_survives_the_passage_count(status_text): | CODE |
| LOW⚡ | tests/test_mcp_status_metadata.py | 59 | def test_passage_counting_still_reports_chunks_and_files(status_text): | CODE |
| LOW⚡ | tests/test_mcp_status_metadata.py | 66 | def test_a_malformed_final_passage_line_does_not_change_the_report(status_text): | CODE |
| LOW | tests/test_mcp_base_dir.py | 16 | def test_base_dir_applies_to_cli_and_local_index_reads(tmp_path, monkeypatch, relative_base_dir): | CODE |
| LOW⚡ | tests/test_atlascloud_provider.py | 34 | def test_resolve_atlascloud_api_key_explicit(self): | CODE |
| LOW⚡ | tests/test_atlascloud_provider.py | 37 | def test_resolve_atlascloud_api_key_from_primary_env(self): | CODE |
| LOW⚡ | tests/test_atlascloud_provider.py | 41 | def test_resolve_atlascloud_api_key_from_spaced_env(self): | CODE |
| LOW⚡ | tests/test_atlascloud_provider.py | 45 | def test_resolve_atlascloud_api_key_does_not_fallback_to_openai(self): | CODE |
| LOW⚡ | tests/test_atlascloud_provider.py | 49 | def test_resolve_atlascloud_base_url_default(self): | CODE |
| LOW⚡ | tests/test_atlascloud_provider.py | 53 | def test_resolve_atlascloud_base_url_explicit(self): | CODE |
| LOW⚡ | tests/test_atlascloud_provider.py | 56 | def test_resolve_atlascloud_base_url_env_precedence(self): | CODE |
| LOW | tests/test_atlascloud_provider.py | 67 | def test_resolve_atlascloud_base_url_strips_trailing_slash(self): | CODE |
| LOW | tests/test_atlascloud_provider.py | 77 | def test_init_requires_api_key(self): | CODE |
| LOW | tests/test_atlascloud_provider.py | 104 | def test_init_custom_base_url(self, mock_openai_cls): | CODE |
| LOW | tests/test_atlascloud_provider.py | 111 | def test_ask_returns_response(self, mock_openai_cls): | CODE |
| LOW | tests/test_atlascloud_provider.py | 184 | def test_get_llm_atlascloud_aliases(self, mock_openai_cls, provider_type): | CODE |
| 435 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_cli_prompt_template.py | 500 | except SystemExit: | CODE |
| HIGH | tests/test_cli_prompt_template.py | 527 | except SystemExit: | CODE |
| HIGH | tests/test_prompt_template_e2e.py | 78 | except Exception: | CODE |
| HIGH | tests/support/fake_embedding_server_module.py | 52 | except socket.timeout: | CODE |
| HIGH | tests/support/fake_embedding_server_module.py | 49 | except Exception: | CODE |
| HIGH | benchmarks/llm_utils.py | 51 | except (ValueError, IndexError): | CODE |
| HIGH | benchmarks/diskann_vs_hnsw_speed_comparison.py | 24 | except Exception: | CODE |
| HIGH | benchmarks/diskann_vs_hnsw_speed_comparison.py | 281 | except Exception: | CODE |
| HIGH | benchmarks/diskann_vs_hnsw_speed_comparison.py | 279 | except Exception: | CODE |
| HIGH | benchmarks/update/bench_update_vs_offline_search.py | 177 | except AttributeError: | CODE |
| HIGH | benchmarks/update/bench_update_vs_offline_search.py | 418 | except Exception as _e: | CODE |
| HIGH | benchmarks/update/bench_update_vs_offline_search.py | 549 | except Exception: | CODE |
| HIGH | benchmarks/update/plot_bench_results.py | 214 | except Exception: | CODE |
| HIGH | benchmarks/update/plot_bench_results.py | 219 | except Exception: | CODE |
| HIGH | benchmarks/update/bench_hnsw_rng_recompute.py | 221 | except AttributeError: | CODE |
| HIGH | benchmarks/update/bench_hnsw_rng_recompute.py | 325 | except AttributeError: | CODE |
| HIGH | benchmarks/update/bench_hnsw_rng_recompute.py | 214 | except AttributeError: | CODE |
| HIGH | benchmarks/update/bench_hnsw_rng_recompute.py | 355 | except zmq.error.Again: | CODE |
| HIGH | benchmarks/update/bench_hnsw_rng_recompute.py | 537 | except OSError: | CODE |
| HIGH | benchmarks/contextbench/scripts/auto_run.py | 705 | except Exception: | CODE |
| HIGH | benchmarks/contextbench/scripts/batch_run_selected.py | 88 | except Exception: | CODE |
| HIGH | benchmarks/contextbench/scripts/batch_run_random.py | 34 | except Exception: | CODE |
| HIGH | benchmarks/bm25_diskann_baselines/run_bm25.py | 112 | except Exception: | CODE |
| HIGH | benchmarks/bm25_diskann_baselines/run_bm25.py | 135 | except Exception: | CODE |
| HIGH | scripts/hf_upload.py | 38 | except Exception: | CODE |
| HIGH | scripts/hf_upload.py | 46 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/registry.py | 77 | except ImportError: | CODE |
| HIGH | packages/leann-core/src/leann/interactive_utils.py | 21 | except ImportError: | CODE |
| HIGH | packages/leann-core/src/leann/interactive_utils.py | 76 | except (FileNotFoundError, FileExistsError, OSError): | CODE |
| HIGH | packages/leann-core/src/leann/embedding_compute.py | 285 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/embedding_compute.py | 735 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/embedding_compute.py | 831 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/embedding_compute.py | 1189 | except requests.exceptions.RequestException: | CODE |
| HIGH | packages/leann-core/src/leann/embedding_compute.py | 597 | except AttributeError: | CODE |
| HIGH | packages/leann-core/src/leann/embedding_compute.py | 824 | except (RuntimeError, AttributeError): | CODE |
| HIGH | packages/leann-core/src/leann/api.py | 649 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/api.py | 799 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/api.py | 1738 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/api.py | 1744 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/api.py | 1864 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/api.py | 1870 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/api.py | 1113 | except AttributeError: | CODE |
| HIGH | packages/leann-core/src/leann/chat.py | 104 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/cli.py | 60 | except ImportError: | CODE |
| HIGH | packages/leann-core/src/leann/cli.py | 1068 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/cli.py | 1312 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/cli.py | 1488 | except (OSError, PermissionError): | CODE |
| HIGH | packages/leann-core/src/leann/cli.py | 1240 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/cli.py | 1250 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/cli.py | 1267 | except (OSError, PermissionError): | CODE |
| HIGH | packages/leann-core/src/leann/cli.py | 1353 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/cli.py | 1380 | except Exception: | CODE |
| HIGH | packages/leann-core/src/leann/cli.py | 1219 | except (OSError, PermissionError): | CODE |
| HIGH | packages/leann-core/src/leann/mcp.py | 251 | except (OSError, ValueError): | CODE |
| HIGH | packages/leann-core/src/leann/mcp.py | 297 | except json.JSONDecodeError: | CODE |
| HIGH | …kages/leann-core/src/leann/embedding_server_manager.py | 44 | except ImportError: | CODE |
| HIGH | …kages/leann-core/src/leann/embedding_server_manager.py | 80 | except ImportError: | CODE |
| HIGH | …kages/leann-core/src/leann/embedding_server_manager.py | 92 | except (ImportError, OSError): | CODE |
| HIGH | …kages/leann-core/src/leann/embedding_server_manager.py | 610 | except Exception: | CODE |
| HIGH | …kages/leann-core/src/leann/embedding_server_manager.py | 652 | except Exception: | CODE |
| 30 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_mcp_integration.py | 202 | except Exception as e: | CODE |
| LOW | tests/test_mcp_standalone.py | 212 | except Exception as e: | CODE |
| LOW⚡ | tests/test_prompt_template_e2e.py | 201 | except Exception as e: | CODE |
| LOW⚡ | tests/test_prompt_template_e2e.py | 299 | except Exception as e: | CODE |
| LOW | tests/test_prompt_template_e2e.py | 44 | except Exception: | CODE |
| LOW | tests/test_prompt_template_e2e.py | 55 | except Exception: | CODE |
| LOW | tests/test_prompt_template_e2e.py | 66 | except Exception: | CODE |
| LOW | tests/test_prompt_template_e2e.py | 78 | except Exception: | CODE |
| LOW | tests/test_prompt_template_e2e.py | 245 | except Exception as e: | CODE |
| LOW | tests/test_prompt_template_e2e.py | 267 | except Exception as e: | CODE |
| LOW | tests/test_prompt_template_e2e.py | 333 | except Exception as e: | CODE |
| LOW | tests/test_prompt_template_e2e.py | 390 | except Exception as e: | CODE |
| LOW | tests/support/fake_embedding_server_module.py | 49 | except Exception: | CODE |
| LOW | docs/code/embedding_model_compare.py | 81 | except Exception as e: | CODE |
| LOW | docs/code/embedding_model_compare.py | 91 | except Exception as e: | CODE |
| LOW⚡ | examples/spoiler_free_book_rag.py | 189 | except Exception as e: | CODE |
| LOW | examples/spoiler_free_book_rag.py | 237 | except Exception as e: | CODE |
| LOW | examples/spoiler_free_book_rag.py | 249 | except Exception as e: | CODE |
| LOW⚡ | benchmarks/run_evaluation.py | 58 | except Exception as e: | CODE |
| MEDIUM⚡ | benchmarks/run_evaluation.py | 59 | print(f"An error occurred during data download: {e}") | CODE |
| LOW | benchmarks/run_evaluation.py | 95 | except Exception as e: | CODE |
| MEDIUM | benchmarks/run_evaluation.py | 96 | print(f"Error downloading embeddings: {e}") | CODE |
| LOW | benchmarks/run_evaluation.py | 385 | except Exception as e: | CODE |
| LOW | benchmarks/micro_tpt.py | 224 | except Exception as e: | CODE |
| LOW | benchmarks/micro_tpt.py | 419 | except Exception as e: | CODE |
| LOW | benchmarks/micro_tpt.py | 487 | except Exception as e: | CODE |
| MEDIUM | benchmarks/micro_tpt.py | 488 | print(f"Error during inference: {e}") | CODE |
| LOW | benchmarks/micro_tpt.py | 651 | except Exception as e: | CODE |
| LOW | benchmarks/compare_faiss_vs_leann.py | 91 | except Exception as e: | CODE |
| LOW | benchmarks/llm_utils.py | 234 | except Exception as e: | CODE |
| LOW | benchmarks/llm_utils.py | 253 | except Exception as e2: | CODE |
| LOW | benchmarks/simple_mac_tpt_test.py | 54 | except Exception as e: | CODE |
| MEDIUM | benchmarks/simple_mac_tpt_test.py | 55 | print(f"Error loading MLX model: {e}") | CODE |
| LOW | benchmarks/simple_mac_tpt_test.py | 81 | except Exception as e: | CODE |
| LOW⚡ | benchmarks/simple_mac_tpt_test.py | 107 | except Exception as e: | CODE |
| LOW⚡ | benchmarks/simple_mac_tpt_test.py | 117 | except Exception as e: | CODE |
| MEDIUM⚡ | benchmarks/simple_mac_tpt_test.py | 118 | print(f"Error during MLX inference: {e}") | CODE |
| LOW | benchmarks/simple_mac_tpt_test.py | 212 | except Exception as e: | CODE |
| MEDIUM | benchmarks/simple_mac_tpt_test.py | 213 | print(f"Error during inference: {e}") | CODE |
| LOW | benchmarks/simple_mac_tpt_test.py | 260 | except Exception as e: | CODE |
| LOW | benchmarks/simple_mac_tpt_test.py | 297 | except Exception as e: | CODE |
| LOW | benchmarks/diskann_vs_hnsw_speed_comparison.py | 24 | except Exception: | CODE |
| LOW | benchmarks/diskann_vs_hnsw_speed_comparison.py | 130 | except Exception as e: | CODE |
| LOW | benchmarks/diskann_vs_hnsw_speed_comparison.py | 265 | except Exception as e: | CODE |
| LOW | benchmarks/diskann_vs_hnsw_speed_comparison.py | 279 | except Exception: | CODE |
| LOW | benchmarks/diskann_vs_hnsw_speed_comparison.py | 281 | except Exception: | CODE |
| LOW | benchmarks/faiss_only.py | 98 | except Exception as e: | CODE |
| LOW | benchmarks/financebench/evaluate_financebench.py | 444 | except Exception as e: | CODE |
| LOW | benchmarks/financebench/evaluate_financebench.py | 500 | except Exception as e: | CODE |
| LOW | benchmarks/financebench/evaluate_financebench.py | 858 | except Exception as e: | CODE |
| LOW | benchmarks/financebench/evaluate_financebench.py | 919 | except Exception as e: | CODE |
| LOW | benchmarks/financebench/setup_financebench.py | 83 | except Exception as e: | CODE |
| LOW | benchmarks/financebench/setup_financebench.py | 166 | except Exception as e: | CODE |
| LOW | benchmarks/financebench/setup_financebench.py | 367 | except Exception as e: | CODE |
| LOW | benchmarks/financebench/setup_financebench.py | 456 | except Exception as e: | CODE |
| LOW | benchmarks/update/bench_update_vs_offline_search.py | 418 | except Exception as _e: | CODE |
| LOW | benchmarks/update/bench_update_vs_offline_search.py | 549 | except Exception: | CODE |
| LOW | benchmarks/update/plot_bench_results.py | 182 | except Exception as e: | CODE |
| LOW | benchmarks/update/plot_bench_results.py | 203 | except Exception: | CODE |
| LOW | benchmarks/update/plot_bench_results.py | 214 | except Exception: | CODE |
| 340 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | README.md | 248 | ## RAG on Everything! | COMMENT |
| MEDIUM | README.md | 385 | LEANN_EMBEDDING_DEVICE # GPU for embedding model (e.g., cuda:0, cuda:1, cpu) | CODE |
| MEDIUM | README.md | 456 | # Or use the specialized code RAG for better code understanding | COMMENT |
| MEDIUM | README.md | 510 | ### 📧 Your Personal Email Secretary: RAG on Apple Mail! | COMMENT |
| MEDIUM | README.md | 555 | ### 🔍 Time Machine for the Web: RAG Your Entire Chrome Browser History! | COMMENT |
| MEDIUM | README.md | 910 | ### MCP Integration: RAG on Live Data from Any Platform | COMMENT |
| MEDIUM | CLAUDE.md | 83 | ### RAG Applications (`apps/`) | COMMENT |
| MEDIUM | CLAUDE.md | 142 | # Document RAG (easiest to test) | COMMENT |
| MEDIUM | CLAUDE.md | 145 | # Code RAG | COMMENT |
| MEDIUM⚡ | tests/test_prompt_template_e2e.py | 207 | # Get any available embedding model | COMMENT |
| MEDIUM⚡ | tests/test_prompt_template_e2e.py | 310 | # Get any available embedding model | COMMENT |
| MEDIUM | tests/test_prompt_template_e2e.py | 162 | # Get any available embedding model | COMMENT |
| MEDIUM | tests/test_prompt_template_e2e.py | 367 | # Get any available embedding model | COMMENT |
| MEDIUM | docs/metadata_filtering.md | 221 | # Run the spoiler-free book RAG example | COMMENT |
| MEDIUM | docs/THINKING_BUDGET_FEATURE.md | 24 | # RAG Examples | COMMENT |
| MEDIUM⚡ | docs/THINKING_BUDGET_FEATURE.md | 98 | ### RAG Examples | COMMENT |
| MEDIUM⚡ | docs/THINKING_BUDGET_FEATURE.md | 100 | # Email RAG with high reasoning | COMMENT |
| MEDIUM⚡ | docs/THINKING_BUDGET_FEATURE.md | 103 | # Document RAG with medium reasoning | COMMENT |
| MEDIUM | docs/slack-setup-guide.md | 155 | ### 5.3 Real RAG Query Examples | COMMENT |
| MEDIUM | docs/configuration-guide.md | 64 | # First, pull an embedding model | COMMENT |
| MEDIUM | docs/user-scripts.md | 47 | # Download embedding model | COMMENT |
| MEDIUM | docs/user-scripts.md | 152 | # Change embedding model | COMMENT |
| MEDIUM | docs/ast_chunking_guide.md | 82 | ### Document RAG with Code Support | COMMENT |
| MEDIUM | docs/ast_chunking_guide.md | 85 | # Enable code chunking in document RAG | COMMENT |
| MEDIUM | docs/issue-proposals/smart-embedding-default.md | 1 | # Smart default embedding model based on platform and corpus size | COMMENT |
| MEDIUM | benchmarks/financebench/README.md | 1 | # FinanceBench Benchmark for LEANN-RAG | COMMENT |
| MEDIUM | benchmarks/financebench/README.md | 49 | # RAG generation evaluation with Qwen3-8B | COMMENT |
| MEDIUM | benchmarks/financebench/README.md | 69 | ### LEANN-RAG Performance (sentence-transformers/all-mpnet-base-v2) | COMMENT |
| MEDIUM | benchmarks/financebench/README.md | 88 | ### LEANN-RAG Generation Performance (Qwen3-8B) | COMMENT |
| MEDIUM | benchmarks/update/bench_update_vs_offline_search.py | 583 | # Warmup the embedding model before benchmarking (do this for both --only B and --only both) | COMMENT |
| MEDIUM | benchmarks/laion/README.md | 129 | ### LEANN-RAG Performance (CLIP ViT-L/14 + Qwen2.5-VL) | COMMENT |
| MEDIUM | benchmarks/enron_emails/evaluate_enron_emails.py | 166 | # Read metadata to get passage source and embedding model | COMMENT |
| MEDIUM | benchmarks/enron_emails/setup_enron_emails.py | 221 | # Read meta for passage source and embedding model | COMMENT |
| MEDIUM | benchmarks/data/README.md | 5 | # LEANN-RAG Evaluation Data | COMMENT |
| MEDIUM⚡ | packages/leann-core/src/leann/embedding_compute.py | 1130 | # Check if it's an embedding model (by name patterns or known models) | COMMENT |
| MEDIUM | packages/leann-core/src/leann/mcp.py | 235 | # Auto-detect embedding model from existing index to ensure incremental | COMMENT |
| MEDIUM | apps/email_rag.py | 147 | # Example queries for email RAG | COMMENT |
| MEDIUM | apps/chatgpt_rag.py | 171 | # Example queries for ChatGPT RAG | COMMENT |
| MEDIUM | apps/wechat_rag.py | 179 | # Example queries for WeChat RAG | COMMENT |
| MEDIUM | apps/claude_rag.py | 174 | # Example queries for Claude RAG | COMMENT |
| MEDIUM | apps/browser_rag.py | 156 | # Example queries for browser history RAG | COMMENT |
| MEDIUM | apps/twitter_rag.py | 186 | # Run the standard RAG pipeline | COMMENT |
| MEDIUM | apps/slack_rag.py | 218 | # Run the standard RAG pipeline | COMMENT |
| MEDIUM | apps/document_rag.py | 111 | # Example queries for document RAG | COMMENT |
| MEDIUM | apps/colqwen_rag.py | 401 | # Initialize ColQwen RAG | COMMENT |
| MEDIUM | apps/code_rag.py | 165 | use_ast_chunking=True, # Always use AST for code RAG | CODE |
| MEDIUM | apps/code_rag.py | 184 | # Example queries for code RAG | COMMENT |
| MEDIUM | apps/image_rag.py | 41 | # Override default embedding model to use CLIP | COMMENT |
| MEDIUM⚡ | apps/base_rag_example.py | 357 | # Warn if any chunks may exceed the embedding model's token limit | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_build_from_arrays.py | 179 | CODE | |
| LOW | tests/test_build_from_arrays.py | 282 | CODE | |
| LOW | tests/test_cli_index_commands.py | 62 | CODE | |
| LOW | tests/support/fake_embedding_server_module.py | 7 | CODE | |
| LOW | benchmarks/run_evaluation.py | 168 | CODE | |
| LOW | benchmarks/micro_tpt.py | 228 | CODE | |
| LOW | benchmarks/micro_tpt.py | 455 | CODE | |
| LOW | benchmarks/compare_faiss_vs_leann.py | 98 | CODE | |
| LOW | benchmarks/simple_mac_tpt_test.py | 88 | CODE | |
| LOW | benchmarks/financebench/evaluate_financebench.py | 582 | CODE | |
| LOW | benchmarks/financebench/setup_financebench.py | 271 | CODE | |
| LOW | benchmarks/financebench/verify_recall.py | 48 | CODE | |
| LOW | benchmarks/update/bench_update_vs_offline_search.py | 297 | CODE | |
| LOW | benchmarks/update/plot_bench_results.py | 116 | CODE | |
| LOW | benchmarks/update/bench_hnsw_rng_recompute.py | 362 | CODE | |
| LOW | benchmarks/laion/evaluate_laion.py | 391 | CODE | |
| LOW | benchmarks/laion/setup_laion.py | 462 | CODE | |
| LOW | benchmarks/contextbench/scripts/auto_run.py | 77 | CODE | |
| LOW | benchmarks/contextbench/scripts/auto_run.py | 219 | CODE | |
| LOW | benchmarks/contextbench/scripts/auto_run.py | 272 | CODE | |
| LOW | benchmarks/contextbench/scripts/auto_run.py | 380 | CODE | |
| LOW | benchmarks/contextbench/scripts/auto_run.py | 454 | CODE | |
| LOW | benchmarks/contextbench/scripts/auto_run.py | 522 | CODE | |
| LOW | benchmarks/contextbench/scripts/auto_run.py | 667 | CODE | |
| LOW | benchmarks/contextbench/scripts/batch_run_selected.py | 92 | CODE | |
| LOW | benchmarks/contextbench/scripts/batch_run_random.py | 38 | CODE | |
| LOW | benchmarks/enron_emails/evaluate_enron_emails.py | 366 | CODE | |
| LOW | benchmarks/bm25_diskann_baselines/run_bm25.py | 23 | CODE | |
| LOW | benchmarks/bm25_diskann_baselines/run_bm25.py | 66 | CODE | |
| LOW | packages/leann-core/src/leann/react_agent.py | 129 | CODE | |
| LOW | packages/leann-core/src/leann/react_agent.py | 182 | CODE | |
| LOW | packages/leann-core/src/leann/readers.py | 162 | CODE | |
| LOW | packages/leann-core/src/leann/readers.py | 590 | CODE | |
| LOW | packages/leann-core/src/leann/interactive_utils.py | 131 | CODE | |
| LOW | packages/leann-core/src/leann/chunking_utils.py | 73 | CODE | |
| LOW | packages/leann-core/src/leann/chunking_utils.py | 196 | CODE | |
| LOW | packages/leann-core/src/leann/chunking_utils.py | 294 | CODE | |
| LOW | packages/leann-core/src/leann/chunking_utils.py | 404 | CODE | |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 136 | CODE | |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 202 | CODE | |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 422 | CODE | |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 502 | CODE | |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 1057 | CODE | |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 1231 | CODE | |
| LOW | packages/leann-core/src/leann/api.py | 164 | CODE | |
| LOW | packages/leann-core/src/leann/api.py | 422 | CODE | |
| LOW | packages/leann-core/src/leann/api.py | 893 | CODE | |
| LOW | packages/leann-core/src/leann/api.py | 1317 | CODE | |
| LOW | packages/leann-core/src/leann/api.py | 1593 | CODE | |
| LOW | packages/leann-core/src/leann/chat.py | 207 | CODE | |
| LOW | packages/leann-core/src/leann/chat.py | 255 | CODE | |
| LOW | packages/leann-core/src/leann/chat.py | 326 | CODE | |
| LOW | packages/leann-core/src/leann/chat.py | 1262 | CODE | |
| LOW | packages/leann-core/src/leann/chat.py | 503 | CODE | |
| LOW | packages/leann-core/src/leann/chat.py | 570 | CODE | |
| LOW | packages/leann-core/src/leann/cli.py | 1014 | CODE | |
| LOW | packages/leann-core/src/leann/cli.py | 1057 | CODE | |
| LOW | packages/leann-core/src/leann/cli.py | 1183 | CODE | |
| LOW | packages/leann-core/src/leann/cli.py | 1298 | CODE | |
| LOW | packages/leann-core/src/leann/cli.py | 1450 | CODE | |
| 67 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | benchmarks/run_evaluation.py | 68 | # Check if specific dataset embeddings exist | COMMENT |
| LOW | benchmarks/micro_tpt.py | 131 | # Check if using SDPA (only on CUDA) | COMMENT |
| LOW | benchmarks/micro_tpt.py | 238 | # Check if using custom 8bit quantization | COMMENT |
| LOW | benchmarks/micro_tpt.py | 328 | # Check if model loaded successfully | COMMENT |
| LOW | benchmarks/compare_faiss_vs_leann.py | 144 | # Check if index already exists | COMMENT |
| LOW | benchmarks/faiss_only.py | 82 | # Check if index already exists and try to load it | COMMENT |
| LOW | benchmarks/financebench/evaluate_financebench.py | 604 | # Check if baseline exists | COMMENT |
| LOW | benchmarks/financebench/evaluate_financebench.py | 877 | # Print results | COMMENT |
| LOW | benchmarks/financebench/setup_financebench.py | 134 | # Check if we have PDFs | COMMENT |
| LOW | benchmarks/financebench/verify_recall.py | 161 | # Check if files exist | COMMENT |
| LOW | benchmarks/laion/evaluate_laion.py | 419 | # Check if baseline exists | COMMENT |
| LOW | benchmarks/enron_emails/evaluate_enron_emails.py | 524 | # Check if Stage 4 results exist | COMMENT |
| LOW⚡ | packages/leann-core/src/leann/embedding_compute.py | 1130 | # Check if it's an embedding model (by name patterns or known models) | COMMENT |
| LOW⚡ | packages/leann-core/src/leann/embedding_compute.py | 1135 | # Check if model exists (handle versioned names) and resolve to full name | COMMENT |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 1096 | # Check if Ollama is running | COMMENT |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 1112 | # Check if model exists and provide helpful suggestions | COMMENT |
| LOW⚡ | packages/leann-core/src/leann/embedding_compute.py | 701 | # Set model to eval mode and disable gradients for inference | STRING |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 265 | # Set NODE_PATH to include global modules for @lmstudio/sdk resolution | STRING |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 568 | # Check if model is already cached | STRING |
| LOW | packages/leann-core/src/leann/api.py | 471 | # Check if we need to use cosine distance for normalized embeddings | COMMENT |
| LOW⚡ | packages/leann-core/src/leann/chat.py | 96 | # Check if exact model exists | COMMENT |
| LOW⚡ | packages/leann-core/src/leann/chat.py | 336 | # Check if the model exists remotely and get available tags | COMMENT |
| LOW | packages/leann-core/src/leann/chat.py | 482 | # Check if the Ollama server is responsive | COMMENT |
| LOW | packages/leann-core/src/leann/chat.py | 671 | # Check if this is a Qwen model and add /no_think by default | COMMENT |
| LOW | packages/leann-core/src/leann/chat.py | 845 | # Check if this is an o-series model (partial match for model names) | COMMENT |
| LOW⚡ | packages/leann-core/src/leann/cli.py | 1028 | # Check if this path appears in .gitmodules | COMMENT |
| LOW | packages/leann-core/src/leann/cli.py | 1629 | # Check if this is a git submodule - if so, skip it | COMMENT |
| LOW | packages/leann-core/src/leann/cli.py | 1735 | # Check if we should process PDFs | COMMENT |
| LOW | packages/leann-core/src/leann/cli.py | 1740 | # Check if file matches any exclude pattern | COMMENT |
| LOW | packages/leann-core/src/leann/cli.py | 1891 | # Check if AST chunking is requested | COMMENT |
| LOW | packages/leann-core/src/leann/cli.py | 1924 | # Check if this is a code file based on source path | COMMENT |
| LOW | …ckend-diskann/leann_backend_diskann/graph_partition.py | 77 | # Check if executables were created | COMMENT |
| LOW | …ckend-diskann/leann_backend_diskann/diskann_backend.py | 165 | # Check if all required files exist | COMMENT |
| LOW | .github/workflows/release-manual.yml | 151 | # Check if tag already exists | COMMENT |
| LOW | .github/workflows/release-manual.yml | 160 | # Check if release already exists | COMMENT |
| LOW | .github/workflows/build-reusable.yml | 334 | # Set CMAKE_PREFIX_PATH to let CMake find all packages automatically | COMMENT |
| LOW | apps/wechat_rag.py | 60 | # Check if WeChat is running | COMMENT |
| LOW | apps/document_rag.py | 63 | # Check if data directory exists | COMMENT |
| LOW | apps/colqwen_rag.py | 289 | # Display results | COMMENT |
| LOW | apps/code_rag.py | 87 | # Check if repository directory exists | COMMENT |
| LOW | apps/code_rag.py | 105 | # Check if in excluded directory | COMMENT |
| LOW | apps/base_rag_example.py | 468 | # Check if index exists | COMMENT |
| LOW | apps/semantic_file_search/leann-plus-temporal-search.py | 108 | # Check if clean_query is less than 4 characters | COMMENT |
| LOW | apps/semantic_file_search/leann-plus-temporal-search.py | 150 | # Print results | COMMENT |
| LOW | apps/semantic_file_search/spotlight_index_dump.py | 69 | # Check if it's an absolute path or relative | COMMENT |
| LOW | apps/history_data/wechat_history.py | 154 | # Check if dict has any readable text fields | COMMENT |
| LOW | apps/history_data/wechat_history.py | 189 | # Check if there's actual readable text (not just XML or system messages) | COMMENT |
| LOW⚡ | apps/history_data/wechat_history.py | 505 | # Check if this is a readable text message | STRING |
| LOW | apps/history_data/wechat_history.py | 684 | # Check if wechat-exporter directory exists | STRING |
| LOW | apps/history_data/wechat_history.py | 715 | # Check if export was successful | STRING |
| LOW | …l/vision-based-pdf-multi-vector/vidore_v1_benchmark.py | 254 | # Check if we have any queries | COMMENT |
| LOW | …l/vision-based-pdf-multi-vector/vidore_v1_benchmark.py | 304 | # Print results | COMMENT |
| LOW | …al/vision-based-pdf-multi-vector/leann_multi_vector.py | 1271 | # Check if Fast-Plaid index exists | COMMENT |
| LOW | …al/vision-based-pdf-multi-vector/leann_multi_vector.py | 1286 | # Check if LEANN index exists | COMMENT |
| LOW | …al/vision-based-pdf-multi-vector/leann_multi_vector.py | 1396 | # Check if we have any queries to evaluate | COMMENT |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 651 | # Check if this image was already seen | COMMENT |
| LOW | …l/vision-based-pdf-multi-vector/vidore_v2_benchmark.py | 97 | # Check if dataset has language field before filtering | COMMENT |
| LOW | …l/vision-based-pdf-multi-vector/vidore_v2_benchmark.py | 104 | # Check if filtering resulted in empty dataset | COMMENT |
| LOW | …l/vision-based-pdf-multi-vector/vidore_v2_benchmark.py | 238 | # Check if we have any queries | COMMENT |
| LOW | …l/vision-based-pdf-multi-vector/vidore_v2_benchmark.py | 288 | # Print results | COMMENT |
| 2 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_react_dual_source.py | 33 | # ── 1. Dual-source presence ────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_react_dual_source.py | 58 | # ── 2. Routing behavior ───────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_react_dual_source.py | 132 | # ── 3. Pipeline correctness ───────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_react_dual_source.py | 197 | # ── 4. Edge cases ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | benchmarks/contextbench/scripts/auto_run.py | 449 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | benchmarks/contextbench/scripts/auto_run.py | 451 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | benchmarks/contextbench/scripts/auto_run.py | 722 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | benchmarks/contextbench/scripts/auto_run.py | 724 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | benchmarks/contextbench/scripts/auto_run.py | 887 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | benchmarks/contextbench/scripts/auto_run.py | 889 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | benchmarks/enron_emails/setup_enron_emails.py | 31 | # ---------------------------- | COMMENT |
| MEDIUM | benchmarks/enron_emails/setup_enron_emails.py | 33 | # ---------------------------- | COMMENT |
| MEDIUM⚡ | benchmarks/enron_emails/setup_enron_emails.py | 70 | # ---------------------------- | COMMENT |
| MEDIUM⚡ | benchmarks/enron_emails/setup_enron_emails.py | 72 | # ---------------------------- | COMMENT |
| MEDIUM | benchmarks/enron_emails/setup_enron_emails.py | 163 | # ---------------------------- | COMMENT |
| MEDIUM | benchmarks/enron_emails/setup_enron_emails.py | 165 | # ---------------------------- | COMMENT |
| MEDIUM⚡ | benchmarks/enron_emails/setup_enron_emails.py | 270 | # ---------------------------- | COMMENT |
| MEDIUM⚡ | benchmarks/enron_emails/setup_enron_emails.py | 272 | # ---------------------------- | COMMENT |
| MEDIUM | packages/leann-core/src/leann/chunking_utils.py | 320 | # ── Token-aware auto-scaling ────────────────────────────────────── | COMMENT |
| MEDIUM | packages/leann-core/src/leann/chunking_utils.py | 371 | # ── Post-chunk validation ───────────────────────────────────────── | COMMENT |
| MEDIUM | packages/leann-core/src/leann/cli.py | 854 | # ── index-* commands: data source indexing ────────────────────── | COMMENT |
| MEDIUM | packages/leann-core/src/leann/cli.py | 3611 | # ── index-* shared handler ────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README.md | 1017 | # Step 1: Use MCP app to fetch and index data | COMMENT |
| LOW | README.md | 1020 | # Step 2: The data is now indexed and available via CLI | COMMENT |
| LOW | docs/slack-setup-guide.md | 17 | ## Step 1: Create a Slack App | COMMENT |
| LOW | docs/slack-setup-guide.md | 67 | ## Step 2: Install Slack MCP Server | COMMENT |
| LOW | docs/slack-setup-guide.md | 86 | ## Step 3: Install and Configure Ollama (for Real LLM Responses) | COMMENT |
| LOW | docs/slack-setup-guide.md | 117 | ## Step 4: Configure Environment Variables | COMMENT |
| LOW | docs/slack-setup-guide.md | 132 | ## Step 5: Test the Setup | COMMENT |
| LOW⚡ | examples/spoiler_free_book_rag.py | 180 | # Step 1: Prepare book data | COMMENT |
| LOW⚡ | examples/spoiler_free_book_rag.py | 186 | # Step 2: Build the index (in practice, this would be done once) | COMMENT |
| LOW⚡ | examples/spoiler_free_book_rag.py | 196 | # Step 3: Demonstrate various spoiler-free searches | COMMENT |
| LOW⚡ | benchmarks/financebench/evaluate_financebench.py | 765 | # Step 1: Analyze current (compact) index | COMMENT |
| LOW⚡ | benchmarks/financebench/evaluate_financebench.py | 770 | # Step 2: Use existing non-compact index or create if needed | COMMENT |
| LOW⚡ | benchmarks/financebench/evaluate_financebench.py | 805 | # Step 4: Performance comparison between the two indexes | COMMENT |
| LOW⚡ | benchmarks/financebench/evaluate_financebench.py | 814 | # Step 5: Generation evaluation | COMMENT |
| LOW | benchmarks/financebench/evaluate_financebench.py | 786 | # Step 3: Compare index sizes | COMMENT |
| LOW⚡ | benchmarks/financebench/setup_financebench.py | 418 | # Step 1: Download dataset | COMMENT |
| LOW⚡ | benchmarks/financebench/setup_financebench.py | 421 | # Step 2: Download PDFs | COMMENT |
| LOW⚡ | benchmarks/financebench/setup_financebench.py | 427 | # Step 3: Build LEANN index | COMMENT |
| LOW⚡ | benchmarks/financebench/setup_financebench.py | 433 | # Step 4: Build FAISS flat baseline | COMMENT |
| LOW⚡ | benchmarks/financebench/setup_financebench.py | 438 | # Step 5: Verify setup | COMMENT |
| LOW⚡ | benchmarks/laion/evaluate_laion.py | 567 | # Step 1: Analyze current (compact) index | COMMENT |
| LOW⚡ | benchmarks/laion/evaluate_laion.py | 572 | # Step 2: Use existing non-compact index or create if needed | COMMENT |
| LOW | benchmarks/laion/evaluate_laion.py | 586 | # Step 3: Compare index sizes (.index only) | COMMENT |
| LOW | benchmarks/laion/evaluate_laion.py | 605 | # Step 4: Performance comparison between the two indexes | COMMENT |
| LOW⚡ | benchmarks/laion/setup_laion.py | 483 | # Step 1: Download LAION subset | COMMENT |
| LOW⚡ | benchmarks/laion/setup_laion.py | 488 | # Step 2: Generate CLIP image embeddings | COMMENT |
| LOW⚡ | benchmarks/laion/setup_laion.py | 492 | # Step 3: Create LEANN passages (image metadata with embeddings) | COMMENT |
| LOW | benchmarks/laion/setup_laion.py | 509 | # Step 4: Build LEANN indexes (both compact and non-compact) | COMMENT |
| LOW | benchmarks/laion/setup_laion.py | 525 | # Step 5: Build FAISS flat baseline | COMMENT |
| LOW | benchmarks/laion/setup_laion.py | 539 | # Step 6: Create evaluation queries | COMMENT |
| LOW | …modal/vision-based-pdf-multi-vector/colqwen_forward.py | 57 | # Step 1: Load or create test image | COMMENT |
| LOW | …modal/vision-based-pdf-multi-vector/colqwen_forward.py | 71 | # Step 2: Load model | COMMENT |
| LOW⚡ | …modal/vision-based-pdf-multi-vector/colqwen_forward.py | 91 | # Step 3: Test forward pass | COMMENT |
| LOW⚡ | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 512 | # Step 4: Build index if needed | COMMENT |
| LOW⚡ | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 683 | # Step 6: Similarity maps for top-K results | COMMENT |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 166 | # Step 1: Check if we can skip data loading (index already exists) | COMMENT |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 207 | # Step 2: Load data only if we need to build the index | COMMENT |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 479 | # 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.py | 568 | # Step 5: Embed query and search | COMMENT |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 720 | # Step 7: Optional answer generation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | examples/spoiler_free_book_rag.py | 180 | # Step 1: Prepare book data | COMMENT |
| LOW⚡ | examples/spoiler_free_book_rag.py | 186 | # Step 2: Build the index (in practice, this would be done once) | COMMENT |
| LOW⚡ | examples/spoiler_free_book_rag.py | 196 | # Step 3: Demonstrate various spoiler-free searches | COMMENT |
| LOW⚡ | benchmarks/financebench/evaluate_financebench.py | 765 | # Step 1: Analyze current (compact) index | COMMENT |
| LOW⚡ | benchmarks/financebench/evaluate_financebench.py | 770 | # Step 2: Use existing non-compact index or create if needed | COMMENT |
| LOW⚡ | benchmarks/financebench/evaluate_financebench.py | 805 | # Step 4: Performance comparison between the two indexes | COMMENT |
| LOW⚡ | benchmarks/financebench/evaluate_financebench.py | 814 | # Step 5: Generation evaluation | COMMENT |
| LOW | benchmarks/financebench/evaluate_financebench.py | 786 | # Step 3: Compare index sizes | COMMENT |
| LOW⚡ | benchmarks/financebench/setup_financebench.py | 418 | # Step 1: Download dataset | COMMENT |
| LOW⚡ | benchmarks/financebench/setup_financebench.py | 421 | # Step 2: Download PDFs | COMMENT |
| LOW⚡ | benchmarks/financebench/setup_financebench.py | 427 | # Step 3: Build LEANN index | COMMENT |
| LOW⚡ | benchmarks/financebench/setup_financebench.py | 433 | # Step 4: Build FAISS flat baseline | COMMENT |
| LOW⚡ | benchmarks/financebench/setup_financebench.py | 438 | # Step 5: Verify setup | COMMENT |
| LOW⚡ | benchmarks/laion/evaluate_laion.py | 567 | # Step 1: Analyze current (compact) index | COMMENT |
| LOW⚡ | benchmarks/laion/evaluate_laion.py | 572 | # Step 2: Use existing non-compact index or create if needed | COMMENT |
| LOW | benchmarks/laion/evaluate_laion.py | 586 | # Step 3: Compare index sizes (.index only) | COMMENT |
| LOW | benchmarks/laion/evaluate_laion.py | 605 | # Step 4: Performance comparison between the two indexes | COMMENT |
| LOW⚡ | benchmarks/laion/setup_laion.py | 483 | # Step 1: Download LAION subset | COMMENT |
| LOW⚡ | benchmarks/laion/setup_laion.py | 488 | # Step 2: Generate CLIP image embeddings | COMMENT |
| LOW⚡ | benchmarks/laion/setup_laion.py | 492 | # Step 3: Create LEANN passages (image metadata with embeddings) | COMMENT |
| LOW | benchmarks/laion/setup_laion.py | 509 | # Step 4: Build LEANN indexes (both compact and non-compact) | COMMENT |
| LOW | benchmarks/laion/setup_laion.py | 525 | # Step 5: Build FAISS flat baseline | COMMENT |
| LOW | benchmarks/laion/setup_laion.py | 539 | # Step 6: Create evaluation queries | COMMENT |
| LOW | …modal/vision-based-pdf-multi-vector/colqwen_forward.py | 57 | # Step 1: Load or create test image | COMMENT |
| LOW | …modal/vision-based-pdf-multi-vector/colqwen_forward.py | 71 | # Step 2: Load model | COMMENT |
| LOW⚡ | …modal/vision-based-pdf-multi-vector/colqwen_forward.py | 91 | # Step 3: Test forward pass | COMMENT |
| LOW⚡ | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 512 | # Step 4: Build index if needed | COMMENT |
| LOW⚡ | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 683 | # Step 6: Similarity maps for top-K results | COMMENT |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 166 | # Step 1: Check if we can skip data loading (index already exists) | COMMENT |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 207 | # Step 2: Load data only if we need to build the index | COMMENT |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 479 | # 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.py | 568 | # Step 5: Embed query and search | COMMENT |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 720 | # Step 7: Optional answer generation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmarks/micro_tpt.py | 145 | CODE | |
| LOW | benchmarks/micro_tpt.py | 157 | CODE | |
| LOW | scripts/hf_upload.py | 13 | CODE | |
| LOW | scripts/hf_upload.py | 43 | CODE | |
| LOW | packages/leann-core/src/leann/react_agent.py | 13 | CODE | |
| LOW | packages/leann-core/src/leann/server.py | 15 | CODE | |
| LOW | packages/leann-core/src/leann/registry.py | 13 | CODE | |
| LOW | packages/leann-core/src/leann/__init__.py | 27 | CODE | |
| LOW | packages/leann-core/src/leann/__init__.py | 27 | CODE | |
| LOW | packages/leann-core/src/leann/__init__.py | 27 | CODE | |
| LOW | packages/leann-core/src/leann/__init__.py | 28 | CODE | |
| LOW | packages/leann-core/src/leann/__init__.py | 28 | CODE | |
| LOW | packages/leann-core/src/leann/__init__.py | 29 | CODE | |
| LOW | packages/leann-core/src/leann/settings.py | 3 | CODE | |
| LOW | packages/leann-core/src/leann/integrations/__init__.py | 1 | CODE | |
| LOW | packages/leann-core/src/leann/integrations/__init__.py | 1 | CODE | |
| LOW | packages/leann/__init__.py | 10 | CODE | |
| LOW | packages/leann/__init__.py | 10 | CODE | |
| LOW | packages/leann/__init__.py | 10 | CODE | |
| LOW | …nn-backend-flashlib/leann_backend_flashlib/__init__.py | 3 | CODE | |
| LOW | …nn-backend-flashlib/leann_backend_flashlib/__init__.py | 3 | CODE | |
| LOW | …nn-backend-flashlib/leann_backend_flashlib/__init__.py | 3 | CODE | |
| LOW | …nd-flashlib-ivf/leann_backend_flashlib_ivf/__init__.py | 3 | CODE | |
| LOW | …nd-flashlib-ivf/leann_backend_flashlib_ivf/__init__.py | 3 | CODE | |
| LOW | …nd-flashlib-ivf/leann_backend_flashlib_ivf/__init__.py | 3 | CODE | |
| LOW | …eann-backend-diskann/leann_backend_diskann/__init__.py | 58 | CODE | |
| LOW | …eann-backend-diskann/leann_backend_diskann/__init__.py | 59 | CODE | |
| LOW | …eann-backend-diskann/leann_backend_diskann/__init__.py | 62 | CODE | |
| LOW | …eann-backend-diskann/leann_backend_diskann/__init__.py | 62 | CODE | |
| LOW | …ckages/leann-backend-ivf/leann_backend_ivf/__init__.py | 3 | CODE | |
| LOW | …ckages/leann-backend-ivf/leann_backend_ivf/__init__.py | 3 | CODE | |
| LOW | …ckages/leann-backend-ivf/leann_backend_ivf/__init__.py | 3 | CODE | |
| LOW | …ckages/leann-backend-ivf/leann_backend_ivf/__init__.py | 3 | CODE | |
| LOW | …ckages/leann-backend-ivf/leann_backend_ivf/__init__.py | 3 | CODE | |
| LOW | …ages/leann-backend-hnsw/leann_backend_hnsw/__init__.py | 58 | CODE | |
| LOW | apps/history_data/__init__.py | 1 | CODE | |
| LOW | apps/chunking/__init__.py | 13 | CODE | |
| LOW | apps/chunking/__init__.py | 13 | CODE | |
| LOW | apps/chunking/__init__.py | 13 | CODE | |
| LOW | apps/chunking/__init__.py | 13 | CODE | |
| LOW | apps/chunking/__init__.py | 13 | CODE | |
| LOW | apps/chunking/__init__.py | 13 | CODE | |
| LOW | apps/chunking/__init__.py | 13 | CODE | |
| LOW | apps/chunking/__init__.py | 27 | CODE | |
| LOW | apps/chunking/__init__.py | 27 | CODE | |
| LOW | apps/chunking/__init__.py | 27 | CODE | |
| LOW | apps/chunking/__init__.py | 27 | CODE | |
| LOW | apps/chunking/__init__.py | 27 | CODE | |
| LOW | apps/chunking/__init__.py | 27 | CODE | |
| LOW | apps/chunking/__init__.py | 27 | CODE | |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 10 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_prompt_template_e2e.py | 33 | logger = logging.getLogger(__name__) | CODE |
| LOW | benchmarks/compare_faiss_vs_leann.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | benchmarks/update/bench_update_vs_offline_search.py | 54 | logger = logging.getLogger(__name__) | CODE |
| LOW | benchmarks/update/__init__.py | 16 | __all__ = ["find_repo_root"] | CODE |
| LOW | benchmarks/update/bench_hnsw_rng_recompute.py | 45 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/sync.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/react_agent.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/registry.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/metadata_filter.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/__init__.py | 33 | __all__ = [ | CODE |
| LOW | packages/leann-core/src/leann/chunking_utils.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/embedding_compute.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/api.py | 30 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/api.py | 893 | def update_index(self, index_path: str, remove_passage_ids: Optional[list[str]] = None) -> None: | CODE |
| LOW | packages/leann-core/src/leann/chat.py | 31 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/settings.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/web_search.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | …kages/leann-core/src/leann/embedding_server_manager.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | packages/leann-core/src/leann/integrations/__init__.py | 3 | __all__ = ["LeannHybridRetriever", "LeannRetriever"] | CODE |
| LOW | packages/leann/__init__.py | 12 | __all__ = ["LeannBuilder", "LeannChat", "LeannSearcher"] | CODE |
| LOW | packages/wechat-exporter/__init__.py | 1 | __all__ = [] | CODE |
| LOW | …nn-backend-flashlib/leann_backend_flashlib/__init__.py | 9 | __all__ = [ | CODE |
| LOW | …nd-flashlib/leann_backend_flashlib/flashlib_backend.py | 37 | logger = logging.getLogger(__name__) | CODE |
| LOW | …nd-flashlib-ivf/leann_backend_flashlib_ivf/__init__.py | 9 | __all__ = [ | CODE |
| LOW | …ivf/leann_backend_flashlib_ivf/flashlib_ivf_backend.py | 44 | logger = logging.getLogger(__name__) | CODE |
| LOW | …eann-backend-diskann/leann_backend_diskann/__init__.py | 64 | __all__ = ["GraphPartitioner", "diskann_backend", "graph_partition", "partition_graph"] | CODE |
| LOW | …kann/leann_backend_diskann/diskann_embedding_server.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | …ckend-diskann/leann_backend_diskann/diskann_backend.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | …ckages/leann-backend-ivf/leann_backend_ivf/__init__.py | 11 | __all__ = [ | CODE |
| LOW | …ges/leann-backend-ivf/leann_backend_ivf/ivf_backend.py | 28 | logger = logging.getLogger(__name__) | CODE |
| LOW | …eann-backend-hnsw/leann_backend_hnsw/convert_to_csr.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | …/leann-backend-hnsw/leann_backend_hnsw/hnsw_backend.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | …ckend-hnsw/leann_backend_hnsw/hnsw_embedding_server.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | apps/history_data/__init__.py | 3 | __all__ = ["ChromeHistoryReader"] | CODE |
| LOW | apps/chunking/__init__.py | 39 | __all__ = [ | CODE |
| LOW | …al/vision-based-pdf-multi-vector/leann_multi_vector.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | apps/gemini_data/gemini_reader.py | 6 | logger = logging.getLogger(__name__) | CODE |
| LOW | apps/qwen_data/qwen_reader.py | 6 | logger = logging.getLogger(__name__) | CODE |
| LOW | apps/slack_data/slack_mcp_reader.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | apps/twitter_data/twitter_mcp_reader.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | apps/email_data/email.py | 16 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_prompt_template_persistence.py | 582 | # Create a concrete implementation for testing | COMMENT |
| MEDIUM | tests/test_prompt_template_persistence.py | 640 | # Create a concrete implementation for testing | COMMENT |
| MEDIUM | tests/test_metadata_filtering.py | 313 | # Create a real PassageManager instance just for the filtering method | COMMENT |
| MEDIUM | tests/test_token_truncation.py | 123 | # Create a text that definitely exceeds limit | COMMENT |
| MEDIUM | examples/mlx_demo.py | 5 | # Define the path for our new MLX-based index | COMMENT |
| MEDIUM | packages/leann-core/src/leann/cli.py | 1766 | # Create a simple document structure | COMMENT |
| MEDIUM | packages/leann-core/src/leann/cli.py | 1792 | # Create a custom file filter function using our PathSpec | COMMENT |
| MEDIUM | …modal/vision-based-pdf-multi-vector/colqwen_forward.py | 24 | # Create a simple RGB image (800x600) | COMMENT |
| MEDIUM | apps/email_data/email.py | 64 | # Import required libraries | COMMENT |
| MEDIUM | apps/email_data/email.py | 161 | # Create a temporary mbox file | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 267 | export OPENAI_API_KEY="your-api-key-here" | CODE |
| HIGH | README.md | 980 | export TWITTER_API_KEY="your-api-key" | CODE |
| HIGH | docs/metadata_filtering.md | 219 | export OPENAI_API_KEY="your-api-key-here" | CODE |
| HIGH | docs/code/embedding_model_compare.py | 12 | # export OPENAI_API_KEY="your-api-key-here" | COMMENT |
| HIGH | examples/mcp_integration_demo.py | 124 | print(" export TWITTER_API_KEY='your-api-key'") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmarks/micro_tpt.py | 374 | # For now, just use standard loading with INT8 config | COMMENT |
| MEDIUM | benchmarks/financebench/evaluate_financebench.py | 626 | # Test with more queries for robust measurement | COMMENT |
| MEDIUM | benchmarks/financebench/evaluate_financebench.py | 666 | # Use more queries for robust measurement | COMMENT |
| MEDIUM | benchmarks/laion/evaluate_laion.py | 436 | # Test with queries for robust measurement | COMMENT |
| MEDIUM | benchmarks/laion/evaluate_laion.py | 470 | # Use subset for robust measurement | COMMENT |
| MEDIUM | benchmarks/laion/evaluate_laion.py | 622 | # Print comprehensive results | COMMENT |
| MEDIUM | packages/leann-core/src/leann/cli.py | 1285 | # Always do a comprehensive search for safety | COMMENT |
| MEDIUM | …eann-backend-hnsw/leann_backend_hnsw/convert_to_csr.py | 83 | count = -1 # Initialize count for robust error handling | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | packages/leann-core/src/leann/readers.py | 0 | initialize. args: concatenate_conversations: whether to concatenate messages within conversations for better context | STRING |
| HIGH | apps/imessage_data/imessage_reader.py | 0 | initialize. args: concatenate_conversations: whether to concatenate messages within conversations for better context | STRING |
| HIGH | apps/chatgpt_data/chatgpt_reader.py | 0 | initialize. args: concatenate_conversations: whether to concatenate messages within conversations for better context | STRING |
| HIGH | apps/claude_data/claude_reader.py | 0 | initialize. args: concatenate_conversations: whether to concatenate messages within conversations for better context | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmarks/financebench/verify_recall.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | …marks/contextbench/scripts/prepare_repos_with_leann.py | 61 | # "SWE-Bench-Pro__javascript__maintenance__bugfix__93b583ae", | COMMENT |
| LOW | benchmarks/contextbench/scripts/batch_run_selected.py | 21 | # Instances to run. Set instance_ids here or pass via SELECTED_IDS env var (comma-separated). | COMMENT |
| LOW | benchmarks/contextbench/scripts/batch_run_random.py | 101 | # instance_id=instance_id, | COMMENT |
| LOW | benchmarks/contextbench/scripts/batch_run_random.py | 121 | # print(f"✅ Result saved for {instance_id}") | COMMENT |
| LOW | benchmarks/bm25_diskann_baselines/run_bm25.py | 1 | # /// script | COMMENT |
| LOW | …-pdf-multi-vector/multi-vector-leann-similarity-map.py | 41 | QUERY = "The paper talk about the latent video generative model and data curation in the related work part?" | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_lmstudio_bridge.py | 194 | mock_result.stdout = '{"contextLength": null, "identifier": "test-model"}' | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmarks/llm_utils.py | 278 | CODE | |
| LOW | packages/leann-core/src/leann/chunking_utils.py | 404 | CODE | |
| LOW | packages/leann-core/src/leann/api.py | 1317 | CODE | |
| LOW | packages/leann-core/src/leann/api.py | 1766 | CODE | |
| LOW | …ckend-diskann/leann_backend_diskann/diskann_backend.py | 475 | CODE | |
| LOW | …l/vision-based-pdf-multi-vector/vidore_v2_benchmark.py | 186 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …ckend-diskann/leann_backend_diskann/graph_partition.py | 96 | Partition a disk-based index for improved performance. Args: index_prefix_path: Path to th | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/openclaw/run_docker_test.sh | 6 | # Usage: | COMMENT |
| LOW | …ckend-diskann/leann_backend_diskann/graph_partition.py | 288 | # Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/leann-core/src/leann/mcp.py | 328 | def handle_request(request): | CODE |