[EMNLP2025] LightRAG: Simple and Fast Retrieval-Augmented Generation
This report summarizes scanner evidence for HKUDS/LightRAG, a Python project with 40,056 GitHub stars. SynthScan examined 486,298 lines of code across 1252 source files, recording 12483 pattern matches distributed across 24 syntactic categories. The legacy adjusted pattern signal is 35.0 (High 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? 9260 finding(s).
Are imports declared and package/API names verified? 548 finding(s).
Are wrappers, guards, and repeated structures necessary? 10633 finding(s).
Which changes need focused human review? 12483 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 12483 distinct pattern matches across 24 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 | reproduce/Step_3_openai_compatible.py | 57 | def run_queries_and_save_to_json( | CODE |
| LOW | reproduce/Step_3.py | 26 | def run_queries_and_save_to_json( | CODE |
| LOW | lightrag/rerank.py | 36 | def chunk_documents_for_rerank( | CODE |
| LOW | lightrag/rerank.py | 142 | async def achunk_documents_for_rerank( | CODE |
| LOW | lightrag/addon_params.py | 30 | def _emit_deprecated_addon_warnings(params: Mapping[str, Any]) -> None: | CODE |
| LOW | lightrag/table_markup.py | 83 | def header_grid_to_thead_html(grid: list[list[str]]) -> str: | CODE |
| LOW | lightrag/llm_roles.py | 130 | def register_role_llm_builder( | CODE |
| LOW⚡ | lightrag/llm_roles.py | 162 | def _get_effective_role_llm_kwargs(self, role: str) -> dict[str, Any]: | CODE |
| LOW⚡ | lightrag/llm_roles.py | 170 | def _get_effective_role_llm_timeout(self, role: str) -> int: | CODE |
| LOW⚡ | lightrag/llm_roles.py | 174 | def _get_effective_role_llm_max_async(self, role: str) -> int: | CODE |
| LOW | lightrag/llm_roles.py | 212 | def _rebuild_single_role_llm_func(self, role: str) -> None: | CODE |
| LOW | lightrag/llm_roles.py | 228 | def _schedule_retired_llm_queue_cleanup( | CODE |
| LOW⚡ | lightrag/llm_roles.py | 256 | def _finalize_retired_llm_queue_cleanup(self, task: asyncio.Task) -> None: | CODE |
| LOW⚡ | lightrag/llm_roles.py | 265 | async def wait_for_retired_llm_queues(self) -> None: | CODE |
| LOW | lightrag/llm_roles.py | 309 | def _apply_llm_role_config_update( | CODE |
| LOW | lightrag/llm_roles.py | 611 | async def get_embedding_queue_status(self) -> dict[str, Any]: | CODE |
| LOW⚡ | lightrag/lightrag.py | 1426 | def _set_runtime_addon_params(self, addon_params: Mapping[str, Any] | None) -> None: | CODE |
| LOW⚡ | lightrag/lightrag.py | 1430 | def _apply_chunk_size_overlay(self) -> None: | CODE |
| LOW⚡ | lightrag/lightrag.py | 7475 | def _admin_write_gate_required(self) -> bool: | CODE |
| LOW | lightrag/lightrag.py | 286 | def _default_admin_write_hold_seconds(embedding_timeout: float) -> float: | CODE |
| LOW | lightrag/lightrag.py | 1549 | def _refresh_addon_params_cache(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 1569 | def _ensure_addon_params_cache(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 1623 | def _build_role_llm_cache_identity( | CODE |
| LOW | lightrag/lightrag.py | 2039 | def _get_parse_native_executor(self) -> ThreadPoolExecutor: | CODE |
| LOW | lightrag/lightrag.py | 2056 | def _shutdown_parser_executor(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 2074 | async def _commit_cache_pair_before_finalize(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 2102 | async def _quarantine_cache_before_finalize( | CODE |
| LOW | lightrag/lightrag.py | 2691 | def _operation_truncation_record() -> dict[str, Any] | None: | CODE |
| LOW | lightrag/lightrag.py | 2705 | def _terminal_truncation_kwargs() -> dict[str, Any]: | CODE |
| LOW | lightrag/lightrag.py | 2728 | async def _journal_truncation_write_ahead( | CODE |
| LOW | lightrag/lightrag.py | 3139 | async def _upsert_custom_chunk_status( | CODE |
| LOW | lightrag/lightrag.py | 3229 | async def _union_doc_recovery_anchors( | CODE |
| LOW | lightrag/lightrag.py | 3269 | async def arollback_failed_custom_chunk_patches( | CODE |
| LOW | lightrag/lightrag.py | 3436 | async def _rollback_one_custom_chunk_patch( | CODE |
| LOW | lightrag/lightrag.py | 3568 | async def _persist_custom_chunk_recovery_warning( | CODE |
| LOW | lightrag/lightrag.py | 3692 | async def _prune_doc_recovery_anchors( | CODE |
| LOW | lightrag/lightrag.py | 3762 | async def _process_extract_entities( | CODE |
| LOW | lightrag/lightrag.py | 3814 | async def _discard_pending_index_ops( | CODE |
| LOW | lightrag/lightrag.py | 3995 | async def _record_chunk_reference_commit_failure(self, reason: str) -> None: | CODE |
| LOW | lightrag/lightrag.py | 4184 | async def _flush_cache_after_references() -> None: | CODE |
| LOW | lightrag/lightrag.py | 4299 | async def _insert_done_with_cleanup(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 4387 | def _normalize_custom_kg_entity_name(value: Any, *, field: str) -> str: | CODE |
| LOW | lightrag/lightrag.py | 5367 | async def _update_delete_retry_state( | CODE |
| LOW | lightrag/lightrag.py | 5448 | async def _get_existing_llm_cache_ids(self, cache_ids: list[str]) -> list[str]: | CODE |
| LOW | lightrag/lightrag.py | 5644 | def _patch_journal_candidates( | CODE |
| LOW | lightrag/lightrag.py | 5674 | async def _resolve_purge_recovery_proof( | CODE |
| LOW | lightrag/lightrag.py | 5882 | def _raise_missing_recovery_proof( | CODE |
| LOW | lightrag/lightrag.py | 6265 | async def _purge_derived_kg_contributions( | CODE |
| LOW | lightrag/lightrag.py | 7495 | def _admin_write_hold_ceiling(self) -> float: | CODE |
| LOW | lightrag/lightrag.py | 7513 | def _validate_admin_write_bounds(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 7557 | def _admin_write_lock_namespace(self) -> str: | CODE |
| LOW | lightrag/lightrag.py | 7760 | def _discard_uncommitted_graph_mutations(self, operation: str) -> None: | CODE |
| LOW | lightrag/lightrag.py | 7791 | async def _drive_pipeline_if_deferred(self, workspace: str) -> None: | CODE |
| LOW | lightrag/lightrag.py | 7848 | def _schedule_deferred_pipeline_drive(self, workspace: str) -> asyncio.Task | None: | CODE |
| LOW | lightrag/lightrag.py | 7910 | async def _cancel_admin_release_drives(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 7925 | async def _raise_if_recovery_required(self) -> None: | CODE |
| LOW | lightrag/query_validation.py | 101 | def meets_min_rag_query_weight(query: str) -> bool: | CODE |
| LOW | lightrag/operate.py | 184 | def _get_relationship_vdb_timeout_seconds(global_config: dict[str, Any]) -> float: | CODE |
| LOW | lightrag/operate.py | 201 | def _format_relation_edge_label(edge_key: tuple[str, str] | list[str]) -> str: | CODE |
| LOW | lightrag/operate.py | 209 | def _truncate_entity_identifier( | CODE |
| 7867 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | lightrag/lightrag.py | 7471 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | lightrag/lightrag.py | 7473 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | lightrag/lightrag.py | 233 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/lightrag.py | 235 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/constants.py | 790 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/constants.py | 794 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils.py | 4006 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils.py | 4008 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 2880 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 2882 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3270 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3272 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3325 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3327 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3577 | # ----------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3579 | # ----------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3812 | # ----------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3814 | # ----------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 736 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 738 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 2274 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 2276 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 6095 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 6097 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 6502 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 6504 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 634 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 636 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 3150 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 3156 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 4405 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 4407 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 4987 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 4989 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 6837 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 6839 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 86 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 90 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 265 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 267 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 724 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 726 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 130 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 133 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 186 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 188 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 500 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 502 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 1303 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 1305 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 1330 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 1332 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1178 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1180 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1228 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1230 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1368 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1370 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/base.py | 1763 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | lightrag/base.py | 1769 | # ------------------------------------------------------------------ | COMMENT |
| 1515 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | reproduce/Step_1_openai_compatible.py | 50 | except Exception as e: | CODE |
| LOW | reproduce/Step_0.py | 41 | except Exception as e: | CODE |
| MEDIUM | reproduce/Step_0.py | 42 | print(f"An error occurred while processing file {filename}: {e}") | CODE |
| LOW | reproduce/Step_0.py | 54 | except Exception as e: | CODE |
| MEDIUM | reproduce/Step_0.py | 55 | print(f"An error occurred while saving to the file {output_filename}: {e}") | CODE |
| LOW | reproduce/Step_1.py | 19 | except Exception as e: | CODE |
| LOW | reproduce/Step_3_openai_compatible.py | 53 | except Exception as e: | CODE |
| MEDIUM | reproduce/Step_3_openai_compatible.py | 49 | def process_query(query_text, rag_instance, query_param): | CODE |
| LOW | reproduce/Step_3.py | 22 | except Exception as e: | CODE |
| MEDIUM | reproduce/Step_3.py | 18 | def process_query(query_text, rag_instance, query_param): | CODE |
| LOW | lightrag/pipeline_metrics.py | 97 | except Exception as metric_error: # pragma: no cover - defensive | CODE |
| LOW | lightrag/pipeline_metrics.py | 115 | except Exception as metric_error: # pragma: no cover - defensive | CODE |
| LOW | lightrag/rerank.py | 84 | except Exception as e: | CODE |
| LOW | lightrag/rerank.py | 624 | except Exception as e: | CODE |
| LOW | lightrag/rerank.py | 639 | except Exception as e: | CODE |
| LOW | lightrag/rerank.py | 654 | except Exception as e: | CODE |
| LOW⚡ | lightrag/llm_roles.py | 262 | except Exception as e: | CODE |
| LOW | lightrag/llm_roles.py | 306 | except Exception as e: | CODE |
| LOW | lightrag/llm_roles.py | 381 | except Exception: | CODE |
| LOW | lightrag/lightrag.py | 16 | except Exception: # pragma: no cover - optional dependency | CODE |
| LOW | lightrag/lightrag.py | 2099 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 2134 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 2142 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 2221 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 2987 | except Exception as bookkeeping_error: | CODE |
| LOW | lightrag/lightrag.py | 3019 | except Exception as ingress_error: | CODE |
| LOW | lightrag/lightrag.py | 3049 | except Exception as probe_error: | CODE |
| LOW | lightrag/lightrag.py | 3120 | except Exception as drain_error: | CODE |
| LOW | lightrag/lightrag.py | 3360 | except Exception as rollback_error: | CODE |
| LOW | lightrag/lightrag.py | 3780 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3928 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3956 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3989 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 4045 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 4138 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 4789 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5257 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5326 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5463 | except Exception as verification_error: | CODE |
| LOW | lightrag/lightrag.py | 6209 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6241 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6378 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6563 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6601 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6667 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6680 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6705 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6718 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 7023 | except Exception as cache_err: | CODE |
| LOW | lightrag/lightrag.py | 7036 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 7093 | except Exception as cache_collect_error: | CODE |
| LOW | lightrag/lightrag.py | 7112 | except Exception as status_write_error: | CODE |
| LOW | lightrag/lightrag.py | 7206 | except Exception as cache_delete_error: | CODE |
| LOW | lightrag/lightrag.py | 7234 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 7267 | except Exception as status_update_error: | CODE |
| LOW | lightrag/lightrag.py | 7281 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 7300 | except Exception as status_update_error: | CODE |
| LOW | lightrag/lightrag.py | 7339 | except Exception as ingress_error: | CODE |
| LOW | lightrag/lightrag.py | 7362 | except Exception as probe_error: | CODE |
| LOW | lightrag/lightrag.py | 7401 | except Exception as persistence_error: | CODE |
| 784 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lightrag/base.py | 0 | get multiple vector data by their ids (read-your-writes), preserving order. args: ids: list of unique identifiers return | STRING |
| HIGH | lightrag/kg/deprecated/chroma_impl.py | 0 | get multiple vector data by their ids (read-your-writes), preserving order. args: ids: list of unique identifiers return | STRING |
| HIGH | lightrag/kg/nano_vector_db_impl.py | 0 | get multiple vector data by their ids (read-your-writes), preserving order. args: ids: list of unique identifiers return | STRING |
| HIGH | lightrag/base.py | 0 | get all edges in the graph. returns: a list of all edges, where each edge is a dictionary of its properties | STRING |
| HIGH | lightrag/kg/networkx_impl.py | 0 | get all edges in the graph. returns: a list of all edges, where each edge is a dictionary of its properties | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | get all edges in the graph. returns: a list of all edges, where each edge is a dictionary of its properties | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 0 | get all edges in the graph. returns: a list of all edges, where each edge is a dictionary of its properties | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 0 | get all edges in the graph. returns: a list of all edges, where each edge is a dictionary of its properties | STRING |
| HIGH | lightrag/kg/qdrant_impl.py | 0 | buffered vector upsert waiting for embedding and/or bulk flush. | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | buffered vector upsert waiting for embedding and/or bulk flush. | STRING |
| HIGH | lightrag/kg/opensearch_impl.py | 0 | buffered vector upsert waiting for embedding and/or bulk flush. | STRING |
| HIGH | lightrag/kg/milvus_impl.py | 0 | buffered vector upsert waiting for embedding and/or bulk flush. | STRING |
| HIGH | lightrag/kg/qdrant_impl.py | 0 | discard buffered upserts/deletes (pipeline aborting on error). | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | discard buffered upserts/deletes (pipeline aborting on error). | STRING |
| HIGH | lightrag/kg/postgres_impl.py | 0 | discard buffered upserts/deletes (pipeline aborting on error). | STRING |
| HIGH | lightrag/kg/opensearch_impl.py | 0 | discard buffered upserts/deletes (pipeline aborting on error). | STRING |
| HIGH | lightrag/kg/milvus_impl.py | 0 | discard buffered upserts/deletes (pipeline aborting on error). | STRING |
| HIGH | lightrag/kg/qdrant_impl.py | 0 | buffer an entity vector delete by computing its hash id. | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | buffer an entity vector delete by computing its hash id. | STRING |
| HIGH | lightrag/kg/opensearch_impl.py | 0 | buffer an entity vector delete by computing its hash id. | STRING |
| HIGH | lightrag/kg/milvus_impl.py | 0 | buffer an entity vector delete by computing its hash id. | STRING |
| HIGH | lightrag/kg/qdrant_impl.py | 0 | get multiple vector data by their ids (read-your-writes), preserving order. | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | get multiple vector data by their ids (read-your-writes), preserving order. | STRING |
| HIGH | lightrag/kg/milvus_impl.py | 0 | get multiple vector data by their ids (read-your-writes), preserving order. | STRING |
| HIGH | lightrag/kg/networkx_impl.py | 0 | record ``fingerprint`` as the file pair this process now holds. | STRING |
| HIGH | lightrag/kg/nano_vector_db_impl.py | 0 | record ``fingerprint`` as the file pair this process now holds. | STRING |
| HIGH | lightrag/kg/faiss_impl.py | 0 | record ``fingerprint`` as the file pair this process now holds. | STRING |
| HIGH | lightrag/kg/networkx_impl.py | 0 | retrieve a connected subgraph of nodes where the label includes the specified `node_label`. args: node_label: label of t | STRING |
| HIGH | lightrag/kg/postgres_impl.py | 0 | retrieve a connected subgraph of nodes where the label includes the specified `node_label`. args: node_label: label of t | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 0 | retrieve a connected subgraph of nodes where the label includes the specified `node_label`. args: node_label: label of t | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 0 | retrieve a connected subgraph of nodes where the label includes the specified `node_label`. args: node_label: label of t | STRING |
| HIGH | lightrag/kg/networkx_impl.py | 0 | get all nodes in the graph. returns: a list of all nodes, where each node is a dictionary of its properties | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | get all nodes in the graph. returns: a list of all nodes, where each node is a dictionary of its properties | STRING |
| HIGH | lightrag/kg/postgres_impl.py | 0 | get all nodes in the graph. returns: a list of all nodes, where each node is a dictionary of its properties | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 0 | get all nodes in the graph. returns: a list of all nodes, where each node is a dictionary of its properties | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 0 | get all nodes in the graph. returns: a list of all nodes, where each node is a dictionary of its properties | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | check if the storage is empty for the current workspace and namespace returns: bool: true if storage is empty, false oth | STRING |
| HIGH | lightrag/kg/postgres_impl.py | 0 | check if the storage is empty for the current workspace and namespace returns: bool: true if storage is empty, false oth | STRING |
| HIGH | lightrag/kg/redis_impl.py | 0 | check if the storage is empty for the current workspace and namespace returns: bool: true if storage is empty, false oth | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | get counts of documents in each status for all documents returns: dictionary mapping status names to counts, including ' | STRING |
| HIGH | lightrag/kg/postgres_impl.py | 0 | get counts of documents in each status for all documents returns: dictionary mapping status names to counts, including ' | STRING |
| HIGH | lightrag/kg/json_doc_status_impl.py | 0 | get counts of documents in each status for all documents returns: dictionary mapping status names to counts, including ' | STRING |
| HIGH | lightrag/kg/redis_impl.py | 0 | get counts of documents in each status for all documents returns: dictionary mapping status names to counts, including ' | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | get document by file path args: file_path: the file path to search for returns: union[dict[str, any], none]: document da | STRING |
| HIGH | lightrag/kg/postgres_impl.py | 0 | get document by file path args: file_path: the file path to search for returns: union[dict[str, any], none]: document da | STRING |
| HIGH | lightrag/kg/redis_impl.py | 0 | get document by file path args: file_path: the file path to search for returns: union[dict[str, any], none]: document da | STRING |
| HIGH | lightrag/kg/json_doc_status_impl.py | 0 | get document by file path args: file_path: the file path to search for returns: union[dict[str, any], none]: document da | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | deterministic digest over candidate doc ids in stable sort order. | STRING |
| HIGH | lightrag/kg/postgres_impl.py | 0 | deterministic digest over candidate doc ids in stable sort order. | STRING |
| HIGH | lightrag/kg/opensearch_impl.py | 0 | deterministic digest over candidate doc ids in stable sort order. | STRING |
| HIGH | lightrag/kg/json_doc_status_impl.py | 0 | deterministic digest over candidate doc ids in stable sort order. | STRING |
| HIGH | lightrag/kg/redis_impl.py | 0 | deterministic digest over candidate doc ids in stable sort order. | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | get the total degree (sum of relationships) of two nodes. args: src_id: label of the source node tgt_id: label of the ta | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 0 | get the total degree (sum of relationships) of two nodes. args: src_id: label of the source node tgt_id: label of the ta | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 0 | get the total degree (sum of relationships) of two nodes. args: src_id: label of the source node tgt_id: label of the ta | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | check existence of multiple nodes in a single unwind query. args: node_ids: list of node ids to check. returns: set of n | STRING |
| HIGH | lightrag/kg/postgres_impl.py | 0 | check existence of multiple nodes in a single unwind query. args: node_ids: list of node ids to check. returns: set of n | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 0 | check existence of multiple nodes in a single unwind query. args: node_ids: list of node ids to check. returns: set of n | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 0 | check existence of multiple nodes in a single unwind query. args: node_ids: list of node ids to check. returns: set of n | STRING |
| HIGH | lightrag/kg/postgres_impl.py | 0 | get documents with pagination support args: status_filter: filter by document status, none for all statuses page: page n | STRING |
| 60 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lightrag/llm_roles.py | 260 | except asyncio.CancelledError: | CODE |
| HIGH | lightrag/lightrag.py | 633 | except RuntimeError: | CODE |
| HIGH | lightrag/lightrag.py | 7922 | except (asyncio.CancelledError, Exception): | CODE |
| HIGH | lightrag/utils.py | 3424 | except Exception: | CODE |
| HIGH | lightrag/utils.py | 4683 | except RuntimeError: | CODE |
| HIGH | lightrag/utils.py | 6599 | except Exception: | CODE |
| HIGH | lightrag/utils.py | 6616 | except Exception: | CODE |
| HIGH | lightrag/utils.py | 86 | except (ValueError, OSError): | CODE |
| HIGH | lightrag/utils.py | 94 | except (ValueError, OSError): | CODE |
| HIGH | lightrag/utils.py | 3108 | except RuntimeError: | CODE |
| HIGH | lightrag/utils.py | 4697 | except (RuntimeError, DeprecationWarning): | CODE |
| HIGH | lightrag/utils.py | 2214 | except asyncio.CancelledError: | CODE |
| HIGH | lightrag/utils.py | 2253 | except asyncio.CancelledError: | CODE |
| HIGH | lightrag/utils.py | 2274 | except Exception: | CODE |
| HIGH | lightrag/utils.py | 2279 | except Exception: | CODE |
| HIGH | lightrag/utils.py | 2267 | except Exception: | CODE |
| HIGH | lightrag/utils.py | 1689 | except asyncio.TimeoutError: | CODE |
| HIGH | lightrag/utils.py | 1703 | except asyncio.TimeoutError: | CODE |
| HIGH | lightrag/tools/clean_llm_query_cache.py | 1235 | except Exception: | CODE |
| HIGH | lightrag/tools/clean_llm_query_cache.py | 1227 | except Exception: | CODE |
| HIGH | lightrag/tools/chunk_tracking_repair.py | 157 | except (AttributeError, sqlite3.Error): | CODE |
| HIGH | lightrag/tools/rebuild_vdb.py | 1196 | except Exception: | CODE |
| HIGH | lightrag/tools/rebuild_vdb.py | 1190 | except Exception: | CODE |
| HIGH | lightrag/tools/migrate_llm_cache.py | 1558 | except Exception: | CODE |
| HIGH | lightrag/tools/migrate_llm_cache.py | 1545 | except Exception: | CODE |
| HIGH | lightrag/tools/migrate_llm_cache.py | 1550 | except Exception: | CODE |
| HIGH | lightrag/tools/migrate_graph_storage.py | 1105 | except Exception: | CODE |
| HIGH | lightrag/llm/gemini.py | 533 | except Exception: | CODE |
| HIGH | lightrag/parser/llm_bridge.py | 100 | except Exception: | CODE |
| HIGH | lightrag/parser/markdown/parser.py | 587 | except OSError: | CODE |
| HIGH | lightrag/parser/markdown/raw_cache.py | 201 | except OSError: | CODE |
| HIGH | lightrag/parser/external/mineru/ir_builder.py | 533 | except json.JSONDecodeError: | CODE |
| HIGH | lightrag/parser/external/mineru/client.py | 516 | except OSError: | CODE |
| HIGH | lightrag/parser/docx/numbering_resolver.py | 269 | except Exception: | CODE |
| HIGH | lightrag/parser/docx/numbering_resolver.py | 318 | except Exception: | CODE |
| HIGH | lightrag/parser/docx/parse_document.py | 374 | except Exception: | CODE |
| HIGH | lightrag/parser/docx/omml/ommlparser.py | 216 | except TypeError: | CODE |
| HIGH | lightrag/parser/docx/omml/ommlparser.py | 556 | except TypeError: | CODE |
| HIGH | lightrag/kg/shared_storage.py | 1906 | except Exception: | CODE |
| HIGH | lightrag/kg/shared_storage.py | 4053 | except Exception: | CODE |
| HIGH | lightrag/kg/shared_storage.py | 4071 | except Exception: | CODE |
| HIGH | lightrag/kg/shared_storage.py | 290 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 4716 | except ConflictError: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 7027 | except OpenSearchException: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 7079 | except OpenSearchException: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 7135 | except OpenSearchException: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 4237 | except NotFoundError: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 4990 | except NotFoundError: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 5257 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 5372 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 6058 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 1222 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 2524 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 2639 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 4131 | except OpenSearchException: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 4452 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 4663 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 5129 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 5174 | except Exception: | CODE |
| HIGH | lightrag/kg/opensearch_impl.py | 5893 | except Exception: | CODE |
| 34 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightrag/pipeline_metrics.py | 34 | CODE | |
| LOW | lightrag/rerank.py | 1 | CODE | |
| LOW | lightrag/file_atomic.py | 29 | CODE | |
| LOW | lightrag/addon_params.py | 15 | CODE | |
| LOW | lightrag/table_markup.py | 17 | CODE | |
| LOW | lightrag/llm_roles.py | 11 | CODE | |
| LOW | lightrag/lightrag.py | 1 | CODE | |
| LOW | lightrag/lightrag.py | 215 | CODE | |
| LOW | lightrag/query_validation.py | 3 | CODE | |
| LOW | lightrag/__init__.py | 3 | CODE | |
| LOW | lightrag/types.py | 1 | CODE | |
| LOW | lightrag/operate.py | 1 | CODE | |
| LOW | lightrag/utils.py | 1 | CODE | |
| LOW | lightrag/utils.py | 431 | CODE | |
| LOW | lightrag/utils.py | 431 | CODE | |
| LOW | lightrag/utils.py | 431 | CODE | |
| LOW | lightrag/pipeline.py | 12 | CODE | |
| LOW | lightrag/pipeline.py | 133 | CODE | |
| LOW | lightrag/pipeline.py | 133 | CODE | |
| LOW | lightrag/storage_migrations.py | 14 | CODE | |
| LOW | lightrag/exceptions.py | 1 | CODE | |
| LOW | lightrag/multimodal_context.py | 62 | CODE | |
| LOW | lightrag/utils_graph.py | 1 | CODE | |
| LOW | lightrag/prompt.py | 1 | CODE | |
| LOW | lightrag/utils_pipeline.py | 10 | CODE | |
| LOW | lightrag/namespace.py | 1 | CODE | |
| LOW | lightrag/chunk_schema.py | 24 | CODE | |
| LOW | lightrag/base.py | 1 | CODE | |
| LOW | lightrag/prompt_multimodal.py | 31 | CODE | |
| LOW | lightrag/tools/kg_integrity_repair.py | 38 | CODE | |
| LOW | lightrag/tools/source_conflict_repair.py | 92 | CODE | |
| LOW | lightrag/tools/source_conflict_repair.py | 738 | CODE | |
| LOW | lightrag/tools/chunk_tracking_repair.py | 19 | CODE | |
| LOW | lightrag/tools/migrate_graph_storage.py | 67 | CODE | |
| LOW | lightrag/llm/_error_utils.py | 14 | CODE | |
| LOW | lightrag/llm/gemini.py | 10 | CODE | |
| LOW | lightrag/llm/_vision_utils.py | 20 | CODE | |
| LOW | lightrag/llm/azure_openai.py | 12 | CODE | |
| LOW | lightrag/llm/azure_openai.py | 12 | CODE | |
| LOW | lightrag/llm/azure_openai.py | 12 | CODE | |
| LOW | lightrag/parser/plugins.py | 25 | CODE | |
| LOW | lightrag/parser/param_schema.py | 30 | CODE | |
| LOW | lightrag/parser/native_dispatch.py | 16 | CODE | |
| LOW | lightrag/parser/registry.py | 16 | CODE | |
| LOW | lightrag/parser/registry.py | 32 | CODE | |
| LOW | lightrag/parser/_html_table.py | 13 | CODE | |
| LOW | lightrag/parser/llm_bridge.py | 17 | CODE | |
| LOW | lightrag/parser/cli.py | 20 | CODE | |
| LOW | lightrag/parser/_markdown.py | 10 | CODE | |
| LOW | lightrag/parser/routing.py | 1 | CODE | |
| LOW | lightrag/parser/debug.py | 17 | CODE | |
| LOW | lightrag/parser/noop.py | 18 | CODE | |
| LOW | lightrag/parser/native_base.py | 15 | CODE | |
| LOW | lightrag/parser/native_base.py | 33 | CODE | |
| LOW | lightrag/parser/exceptions.py | 10 | CODE | |
| LOW | lightrag/parser/base.py | 22 | CODE | |
| LOW | lightrag/parser/base.py | 31 | CODE | |
| LOW | lightrag/parser/markdown/ir_builder.py | 20 | CODE | |
| LOW | lightrag/parser/markdown/ir_builder.py | 23 | CODE | |
| LOW | lightrag/parser/markdown/parser.py | 41 | CODE | |
| 350 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker-compose.podman.yml | 1 | # Podman-compatible compose file for LightRAG | COMMENT |
| LOW | docker-compose.podman.yml | 21 | tags: | COMMENT |
| LOW | README-id.md | 161 | # make dev installs the test toolchain plus the full offline stack | COMMENT |
| LOW | README-ja.md | 161 | # make dev はテストツールチェーンに加えて、完全なオフラインスタック | COMMENT |
| LOW | README.md | 161 | COMMENT | |
| LOW | docker-entrypoint.sh | 1 | #!/bin/sh | COMMENT |
| LOW | docker-entrypoint.sh | 21 | # process can read/write them, covering bind-mounts/PVCs whose host content | COMMENT |
| LOW | requirements-offline-smart-heading.txt | 1 | # LightRAG Offline Dependencies - Native docx smart_heading (optional) | COMMENT |
| LOW | docker-compose.yml | 41 | # .env holds host paths so one file can serve both a source run and this | COMMENT |
| LOW | README-zh.md | 161 | # make dev 会安装测试工具链以及完整的离线依赖栈 | COMMENT |
| LOW | lightrag/file_atomic.py | 41 | COMMENT | |
| LOW | lightrag/lightrag.py | 221 | _RoleLLMMixin, | COMMENT |
| LOW | lightrag/lightrag.py | 241 | # On a graph storage that declares ``requires_single_writer`` (only | COMMENT |
| LOW | lightrag/lightrag.py | 261 | # manual operations, so queueing them is the point; the bound only keeps a | COMMENT |
| LOW | lightrag/lightrag.py | 341 | # ``_schedule_deferred_pipeline_drive``); a task held only by the loop's weak | COMMENT |
| LOW | lightrag/lightrag.py | 661 | # stranded mid-operation. The token is reset in a finally, so a nested or | COMMENT |
| LOW | lightrag/lightrag.py | 1501 | # when the caller hands us a partial ``addon_params['chunker']`` | COMMENT |
| LOW | lightrag/lightrag.py | 1581 | # Restore the tokenizer object itself, the same way __post_init__ restores | COMMENT |
| LOW | lightrag/lightrag.py | 2481 | ) | COMMENT |
| LOW | lightrag/lightrag.py | 2641 | ) | COMMENT |
| LOW | lightrag/lightrag.py | 2761 | }, | COMMENT |
| LOW | lightrag/lightrag.py | 2921 | # Patch mode AND resumed creates, not patch alone. Patch | COMMENT |
| LOW | lightrag/lightrag.py | 3001 | # The handoff decision consults the ingress mailbox: work that | COMMENT |
| LOW | lightrag/lightrag.py | 3081 | # cannot skip them: _exit_action keeps busy=True for a | COMMENT |
| LOW | lightrag/lightrag.py | 3381 | # every id first would have kept the sweep O(N) on the assumption that | COMMENT |
| LOW | lightrag/lightrag.py | 3881 | # placed beside the cache flush below would find nothing left. Commit | COMMENT |
| LOW | lightrag/lightrag.py | 3961 | # that takes the buffered DELETES with the upserts, and | COMMENT |
| LOW | lightrag/lightrag.py | 4021 | reachability* in the contract doc, | COMMENT |
| LOW | lightrag/lightrag.py | 4121 | # (``NetworkXStorage.index_done_callback``'s first block). | COMMENT |
| LOW | lightrag/lightrag.py | 4141 | ): | COMMENT |
| LOW | lightrag/lightrag.py | 4181 | # the abort decision, and a second failing sibling would surface as a | COMMENT |
| LOW | lightrag/lightrag.py | 4201 | # ``use_llm_func_with_cache``; the lock and why an in-process one | COMMENT |
| LOW | lightrag/lightrag.py | 4361 | offline ``lightrag.tools.kg_integrity_repair`` audit can | COMMENT |
| LOW | lightrag/lightrag.py | 4801 | # (the hold ceiling's, a disconnected client's). The flush | COMMENT |
| LOW | lightrag/lightrag.py | 5341 | # are not on disk either -- recorded like every other failed | COMMENT |
| LOW | lightrag/lightrag.py | 5501 | return | COMMENT |
| LOW | lightrag/lightrag.py | 6961 | ) | COMMENT |
| LOW | lightrag/lightrag.py | 7141 | # | COMMENT |
| LOW | lightrag/lightrag.py | 7321 | # so concurrent enqueues are permitted the whole time: an | COMMENT |
| LOW | lightrag/lightrag.py | 7701 | raise AdminWriteGateRefusedError( | COMMENT |
| LOW | lightrag/lightrag.py | 7721 | # the pipeline, and the "no other writer" clause above is exactly | COMMENT |
| LOW | lightrag/query_validation.py | 1 | """Shared validation for query text entering the server and the core API.""" | COMMENT |
| LOW | lightrag/query_validation.py | 21 | # minimum they should not. The cost of that is one retrieval that finds | COMMENT |
| LOW | lightrag/constants.py | 121 | # Bounds on any separator cascade, wherever it comes from. The recursive splitter | COMMENT |
| LOW | lightrag/constants.py | 141 | # CHUNK_SIZE default — heading-aligned paragraph merging needs more | COMMENT |
| LOW | lightrag/constants.py | 161 | # the ingestion path bounds: MAX_UPLOAD_SIZE bounds the compressed artifact on | COMMENT |
| LOW | lightrag/constants.py | 181 | # class — so the DOCX_* knobs below bound all three, enforced in the legacy | COMMENT |
| LOW | lightrag/constants.py | 201 | # above, these cap the bytes materialized into ``*.blocks.assets``: one image | COMMENT |
| LOW | lightrag/constants.py | 221 | # Overall wall-clock budget for downloading the result bundle from docling | COMMENT |
| LOW | lightrag/constants.py | 241 | # Native docx smart_heading (opt-in engine param) tunables. Each DEFAULT_* | COMMENT |
| LOW | lightrag/constants.py | 261 | "年,月,日,时,分,秒,个,人,只,条,次,项,天,号,元,角,件,名,台,种,倍," | COMMENT |
| LOW | lightrag/constants.py | 281 | # anchor, which is why there is no longer an IMPRINT_SPACE_PREFIXES knob); | COMMENT |
| LOW | lightrag/constants.py | 301 | # rich physical outline naturally admits more candidates, so the effective | COMMENT |
| LOW | lightrag/constants.py | 321 | # CB4 per-sub-document gate: once the whole document clears the gate above, | COMMENT |
| LOW | lightrag/constants.py | 341 | # paragraphs (0 disables the auxiliary body-run break; the primary close | COMMENT |
| LOW | lightrag/constants.py | 361 | # Marker prefix for full_docs.content when format=lightrag. | COMMENT |
| LOW | lightrag/constants.py | 381 | # Reserved doc_status.metadata key recording how far this document's KG write | COMMENT |
| LOW | lightrag/constants.py | 421 | ) | COMMENT |
| LOW | lightrag/constants.py | 521 | # Whether a doc_status backend missing a strict capability is a startup failure | COMMENT |
| LOW | lightrag/constants.py | 541 | # retries and ``/documents/scan`` bulk enqueues deliberately break through the | COMMENT |
| 422 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | README-id.md | 260 | ### Framework RAG Berbasis Graph yang Ringan | COMMENT |
| MEDIUM | README-ja.md | 7 | # 🚀 LightRAG: シンプルかつ高速な検索拡張生成(RAG) | COMMENT |
| MEDIUM | README-ja.md | 260 | ### 軽量なグラフベース RAG フレームワーク | COMMENT |
| MEDIUM | README.md | 261 | ### A Lightweight, Graph-Based RAG Framework | COMMENT |
| MEDIUM | README-zh.md | 7 | # 🚀 LightRAG: 简单且快速的检索增强生成(RAG)框架 | COMMENT |
| MEDIUM | reproduce/Step_1_openai_compatible.py | 77 | # Initialize RAG instance | COMMENT |
| MEDIUM | reproduce/Step_1.py | 42 | # Initialize RAG instance | COMMENT |
| MEDIUM | lightrag/lightrag.py | 5012 | # `bypass` skips retrieval, so the RAG minimum does not apply to it — | COMMENT |
| MEDIUM | lightrag/lightrag.py | 5135 | # `bypass` skips retrieval, so the RAG minimum does not apply to it — | COMMENT |
| MEDIUM | lightrag/constants.py | 41 | # pushing an otherwise-valid chunk past the provider context window; over budget | COMMENT |
| MEDIUM | lightrag/constants.py | 720 | # over the embedding model's context limit after chunking. Independent from | COMMENT |
| MEDIUM | lightrag/operate.py | 323 | # embedding model's own context limit — not a real-world budget. | COMMENT |
| MEDIUM | lightrag/operate.py | 4117 | # an otherwise-valid chunk past the provider context window. When the | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 2275 | # Pipeline orchestration | COMMENT |
| MEDIUM | lightrag/pipeline.py | 184 | # fully event-driven (``await get_document()``) and never polls. | COMMENT |
| MEDIUM | lightrag/pipeline.py | 7245 | # absolute legacy RAG-Anything/MinerU path, a ``..`` escape) | COMMENT |
| MEDIUM | lightrag/pipeline.py | 7473 | # it for their model's context window. | COMMENT |
| MEDIUM⚡ | lightrag/tools/download_cache.py | 158 | "text-embedding-ada-002", # Legacy embedding model | CODE |
| MEDIUM⚡ | lightrag/tools/download_cache.py | 159 | "text-embedding-3-small", # Small embedding model | CODE |
| MEDIUM⚡ | lightrag/tools/download_cache.py | 160 | "text-embedding-3-large", # Large embedding model | CODE |
| MEDIUM | lightrag/tools/source_conflict_repair.py | 762 | # embedding model — full_docs is a plain KV, and reading it is what lets the | COMMENT |
| MEDIUM⚡ | lightrag/tools/migrate_graph_storage.py | 605 | # Async orchestration — preconditions, write pipeline, compensation | COMMENT |
| MEDIUM | lightrag/llm/gemini.py | 586 | # model that burned the whole output budget on its reasoning trace is | COMMENT |
| MEDIUM | lightrag/llm/gemini.py | 646 | # A thinking model that spent its whole budget on the reasoning trace | COMMENT |
| MEDIUM | lightrag/llm/binding_options.py | 632 | # Whether the model may emit a hidden reasoning trace before its answer. | COMMENT |
| MEDIUM | lightrag/llm/ollama.py | 398 | # the reasoning trace). Raise like the OpenAI binding does, | COMMENT |
| MEDIUM | lightrag/parser/docx/parse_document.py | 668 | # (guardrails.is_visually_centered). | COMMENT |
| MEDIUM | lightrag/parser/docx/parse_document.py | 1170 | # --- smart path (pipeline + landing guardrails) --------------- | COMMENT |
| MEDIUM | lightrag/parser/docx/parse_document.py | 1190 | # Landing guardrails: any violation abandons the smart output for THIS | COMMENT |
| MEDIUM | lightrag/parser/docx/parse_document.py | 1244 | # three counts come from guardrails.plan_toc_output — the single visibility | COMMENT |
| MEDIUM | lightrag/parser/docx/smart_heading/features.py | 341 | #: is not visually centered (``guardrails.is_visually_centered``). | COMMENT |
| MEDIUM | lightrag/parser/docx/smart_heading/features.py | 431 | #: unit :func:`leading_pad_em` reports and ``guardrails.CENTER_MAX_LEADING_PAD_EM`` | COMMENT |
| MEDIUM⚡ | lightrag/parser/docx/smart_heading/heading_flow.py | 2712 | # whole-document orchestration | COMMENT |
| MEDIUM | lightrag/parser/docx/smart_heading/heading_flow.py | 1844 | #: - _Medical Graph RAG.docx's author line (96) absorbing its affiliation line | COMMENT |
| MEDIUM⚡ | lightrag/parser/docx/smart_heading/guardrails.py | 560 | # Landing guardrails: canonicalization, I1/I2/I3 machine checks, TOC | COMMENT |
| MEDIUM | lightrag/parser/docx/smart_heading/guardrails.py | 246 | # dependency parser hallucinates sentence boundaries mid-word on short | COMMENT |
| MEDIUM | lightrag/parser/docx/smart_heading/title_block.py | 1046 | # candidate reuses single=True judge semantics (± context window; a | COMMENT |
| MEDIUM | lightrag/kg/mongo_impl.py | 4510 | # built under a *different* embedding model must NOT be | COMMENT |
| MEDIUM⚡ | lightrag/kg/postgres_impl.py | 2314 | # with proper embedding model and dimension suffix for data isolation | STRING |
| MEDIUM | lightrag/kg/faiss_impl.py | 1160 | # the `is pdoc` identity check is defensive scaffolding: today the | COMMENT |
| MEDIUM | lightrag/kg/scan_job_store.py | 227 | # Timestamps, version, counters_dropped and the JSON scaffolding. | COMMENT |
| MEDIUM | lightrag/api/config.py | 394 | # RAG configuration | COMMENT |
| MEDIUM | lightrag/api/utils_api.py | 714 | # RAG Configuration | STRING |
| MEDIUM | lightrag/api/lightrag_server.py | 737 | # embedding model is configured. Without this, the provider's decorator | COMMENT |
| MEDIUM | lightrag/api/lightrag_server.py | 1426 | # ValueError inside a validator (the RAG query minimum, the non-empty | COMMENT |
| MEDIUM | lightrag/api/lightrag_server.py | 1437 | # A server with no configured embedding model cannot protect its vectors. | COMMENT |
| MEDIUM | lightrag/api/lightrag_server.py | 2511 | # Initialize RAG with unified configuration | COMMENT |
| MEDIUM | lightrag/api/lightrag_server.py | 3003 | # embedding model configuration binding/host address (if applicable)/model (if applicable) | COMMENT |
| MEDIUM | lightrag/api/routers/ollama_api.py | 459 | # Direct-LLM path: exempt from the RAG minimum, not from | COMMENT |
| MEDIUM | lightrag/api/routers/ollama_api.py | 679 | # the RAG branches normalize it themselves. | COMMENT |
| MEDIUM | lightrag/api/routers/query_routes.py | 172 | # Mode-independent: `bypass` is exempt from the RAG minimum below, not | COMMENT |
| MEDIUM | lightrag/evaluation/eval_rag_quality.py | 19 | # Specify custom RAG endpoint | STRING |
| MEDIUM⚡ | lightrag/evaluation/eval_rag_quality.py | 430 | # all RAG responses from being generated at once when eval is slow | COMMENT |
| MEDIUM⚡ | lightrag/evaluation/eval_rag_quality.py | 435 | # Stage 1: Generate RAG response | COMMENT |
| MEDIUM | lightrag/evaluation/eval_rag_quality.py | 542 | # down as if the RAG answer itself were bad. | COMMENT |
| MEDIUM | lightrag/evaluation/eval_rag_quality.py | 589 | # Stage 1: RAG generation - allow x2 concurrency to keep evaluation fed | COMMENT |
| MEDIUM | lightrag/evaluation/eval_rag_quality.py | 615 | max_connections=(max_async + 1) * 2, # Allow buffer for RAG stage | CODE |
| MEDIUM | lightrag/evaluation/eval_rag_quality.py | 808 | # Every case failed (e.g. an all-NaN RAGAS result, or every RAG | COMMENT |
| MEDIUM | lightrag/evaluation/eval_rag_quality.py | 996 | # Specify custom RAG endpoint | COMMENT |
| MEDIUM | …ation/sample_documents/05_evaluation_and_deployment.md | 1 | # RAG Evaluation Metrics and Deployment | COMMENT |
| 42 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | reproduce/Step_0.py | 7 | CODE | |
| LOW | reproduce/Step_3_openai_compatible.py | 57 | CODE | |
| LOW | reproduce/Step_3.py | 26 | CODE | |
| LOW | lightrag/rerank.py | 36 | CODE | |
| LOW | lightrag/rerank.py | 165 | CODE | |
| LOW | lightrag/rerank.py | 240 | CODE | |
| LOW | lightrag/table_markup.py | 133 | CODE | |
| LOW | lightrag/llm_roles.py | 309 | CODE | |
| LOW | lightrag/lightrag.py | 1638 | CODE | |
| LOW | lightrag/lightrag.py | 2102 | CODE | |
| LOW | lightrag/lightrag.py | 2163 | CODE | |
| LOW | lightrag/lightrag.py | 2394 | CODE | |
| LOW | lightrag/lightrag.py | 3692 | CODE | |
| LOW | lightrag/lightrag.py | 4340 | CODE | |
| LOW | lightrag/lightrag.py | 5114 | CODE | |
| LOW | lightrag/lightrag.py | 6265 | CODE | |
| LOW | lightrag/lightrag.py | 6727 | CODE | |
| LOW | lightrag/operate.py | 249 | CODE | |
| LOW | lightrag/operate.py | 372 | CODE | |
| LOW | lightrag/operate.py | 1102 | CODE | |
| LOW | lightrag/operate.py | 1508 | CODE | |
| LOW | lightrag/operate.py | 1755 | CODE | |
| LOW | lightrag/operate.py | 2027 | CODE | |
| LOW | lightrag/operate.py | 2429 | CODE | |
| LOW | lightrag/operate.py | 2782 | CODE | |
| LOW | lightrag/operate.py | 3514 | CODE | |
| LOW | lightrag/operate.py | 3942 | CODE | |
| LOW | lightrag/operate.py | 5051 | CODE | |
| LOW | lightrag/operate.py | 5280 | CODE | |
| LOW | lightrag/operate.py | 6350 | CODE | |
| LOW | lightrag/operate.py | 6621 | CODE | |
| LOW | lightrag/operate.py | 4094 | CODE | |
| LOW | lightrag/utils.py | 156 | CODE | |
| LOW | lightrag/utils.py | 1193 | CODE | |
| LOW | lightrag/utils.py | 4265 | CODE | |
| LOW | lightrag/utils.py | 4581 | CODE | |
| LOW | lightrag/utils.py | 4707 | CODE | |
| LOW | lightrag/utils.py | 5515 | CODE | |
| LOW | lightrag/utils.py | 6458 | CODE | |
| LOW | lightrag/utils.py | 6486 | CODE | |
| LOW | lightrag/utils.py | 6724 | CODE | |
| LOW | lightrag/utils.py | 6924 | CODE | |
| LOW | lightrag/utils.py | 7055 | CODE | |
| LOW | lightrag/utils.py | 7183 | CODE | |
| LOW | lightrag/utils.py | 7562 | CODE | |
| LOW | lightrag/utils.py | 1240 | CODE | |
| LOW | lightrag/utils.py | 3707 | CODE | |
| LOW | lightrag/utils.py | 3832 | CODE | |
| LOW | lightrag/utils.py | 3917 | CODE | |
| LOW | lightrag/utils.py | 1451 | CODE | |
| LOW | lightrag/utils.py | 1550 | CODE | |
| LOW | lightrag/utils.py | 1655 | CODE | |
| LOW | lightrag/utils.py | 1813 | CODE | |
| LOW | lightrag/utils.py | 1912 | CODE | |
| LOW | lightrag/pipeline.py | 740 | CODE | |
| LOW | lightrag/pipeline.py | 1724 | CODE | |
| LOW | lightrag/pipeline.py | 2507 | CODE | |
| LOW | lightrag/pipeline.py | 2913 | CODE | |
| LOW | lightrag/pipeline.py | 3924 | CODE | |
| LOW | lightrag/pipeline.py | 4409 | CODE | |
| 343 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lightrag/lightrag.py | 572 | Drive an async coroutine to completion from a synchronous wrapper. The synchronous wrappers (``insert``, ``query``, | STRING |
| HIGH | lightrag/utils.py | 2438 | Execute function with enhanced priority-based concurrency control and timeout handling Args: | STRING |
| HIGH | lightrag/utils.py | 7878 | Validate a workspace name used to build per-workspace directories. File-based storages place their data in a subdir | STRING |
| HIGH | lightrag/utils.py | 8179 | Reject a node/edge attribute mapping no graph backend could store. Args: attributes: Attribute mapping abou | STRING |
| HIGH | lightrag/utils.py | 8201 | Reject attribute names a backend would read as something other than a name. The *interpretation* rule, not the seri | STRING |
| HIGH | lightrag/utils.py | 8251 | Reject attribute names or values XML cannot encode. For a GraphML-backed store. Names are checked as well as values | STRING |
| HIGH | lightrag/utils.py | 8278 | Reject attribute values no graph backend can store. See ``graph_attribute_value_rejection`` for the rules and ` | STRING |
| HIGH | lightrag/pipeline.py | 753 | Pipeline for Processing Documents 1. Validate ids if provided or generate MD5 hash IDs and remove dupl | STRING |
| HIGH | lightrag/utils_graph.py | 65 | Return *data* reduced to well-typed, storable graph attributes. Two call shapes, because the two families of caller | STRING |
| HIGH | lightrag/tools/clean_llm_query_cache.py | 252 | Initialize storage instance with fallback to config.ini and defaults Args: storage_name: Storage im | STRING |
| HIGH | lightrag/tools/migrate_llm_cache.py | 289 | Initialize storage instance with fallback to config.ini and defaults Args: storage_name: Storage im | STRING |
| HIGH | lightrag/llm/jina.py | 85 | Generate embeddings for a list of texts using Jina AI's API. Args: texts: List of texts to embed. m | STRING |
| HIGH | lightrag/llm/voyageai.py | 64 | Generate embeddings for a list of texts using VoyageAI's API. Args: texts: List of texts to embed. | STRING |
| HIGH | lightrag/llm/gemini.py | 331 | Complete a prompt using Gemini's API with Chain of Thought (COT) support. This function supports automatic int | STRING |
| HIGH | lightrag/llm/gemini.py | 742 | Generate embeddings for a list of texts using Gemini's API. This function uses Google's Gemini embedding model to g | STRING |
| HIGH | lightrag/llm/openai.py | 323 | Complete a prompt using OpenAI's API with caching support and Chain of Thought (COT) integration. This function sup | STRING |
| HIGH | lightrag/llm/openai.py | 1070 | Generate embeddings for a list of texts using OpenAI's API with automatic text truncation. This function supports b | STRING |
| HIGH | lightrag/parser/docx/utils.py | 96 | Create Gemini client for AI Studio or Vertex AI. Supports two modes: - AI Studio (default): Uses GOOGLE_AP | STRING |
| HIGH | lightrag/parser/docx/utils.py | 173 | Create OpenAI client with optional custom base URL. Environment variables: - OPENAI_API_KEY: Required API | STRING |
| HIGH | lightrag/parser/docx/table_extractor.py | 250 | Extract table to 2D string array with metadata (paraIds, header info). Vertical merge behavior: | STRING |
| HIGH | lightrag/kg/postgres_impl.py | 790 | Execute a database operation with automatic retry for transient failures. Args: operation: | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 135 | Check if a node exists in the graph. Args: node_id: The ID of the node to check. | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 175 | Check if an edge exists between two nodes in the graph. Args: source_node_id: The ID of th | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 223 | Get node by its label identifier, return only node properties Args: node_id: The node label to look | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 278 | Get the degree (number of relationships) of a node with the given label. If multiple nodes have the same label, | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 396 | Retrieves all edges (relationships) for a particular node identified by its label. Args: source_nod | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 471 | Get edge properties between two nodes. Args: source_node_id: Label of the source node t | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 487 | Check if a node with the given label exists in the database Args: node_id: Label of the no | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 521 | Check if an edge exists between two nodes Args: source_node_id: Label of the source node | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 563 | Get node by its label identifier, return only node properties Args: node_id: The node label to look | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 654 | Get the degree (number of relationships) of a node with the given label. If multiple nodes have the same label, | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 791 | Get edge properties between two nodes. Args: source_node_id: Label of the source node t | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 925 | Retrieves all edges (relationships) for a particular node identified by its label. Args: source_nod | STRING |
| HIGH | lightrag/api/auth.py | 186 | Validate JWT token Args: token: JWT token Returns: dict: Dictionary c | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 881 | Delete an entity and all its relationships from the knowledge graph. Args: request (Delete | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 923 | Delete a relationship between two entities from the knowledge graph. Args: request (Delete | STRING |
| HIGH | lightrag/api/routers/query_routes.py | 519 | Comprehensive RAG query endpoint with non-streaming response. Parameter "stream" is ignored. **Query M | STRING |
| HIGH | lightrag/api/routers/query_routes.py | 838 | Advanced RAG query endpoint with flexible streaming response. This endpoint provides the most flexible | STRING |
| HIGH | lightrag/api/routers/query_routes.py | 1424 | Advanced data retrieval endpoint for structured RAG analysis. This endpoint provides raw retrieval res | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 266 | Validate an uploaded filename and return it unchanged when safe. Uploaded filenames are document identifiers a | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 5232 | Upload a file to the input directory and index it. This API endpoint accepts a file through an HTTP PO | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 5568 | Insert text into the RAG system. This endpoint allows you to insert text data into the RAG system for | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 5700 | Insert multiple texts into the RAG system. This endpoint allows you to insert multiple text entries in | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 6507 | Delete documents and all their associated data by their IDs using background processing. Deletes speci | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 6630 | Get the processing status of documents by tracking ID. This endpoint retrieves all documents associate | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 6706 | Get documents with pagination support. This endpoint retrieves documents with pagination, filtering, a | STRING |
| HIGH | lightrag/evaluation/eval_rag_quality.py | 306 | Generate RAG response by calling LightRAG API. Args: question: The user query. | STRING |
| HIGH | lightrag/chunker/paragraph_semantic.py | 2069 | Paragraph Semantic Chunking — the ``chunking="P"`` strategy. Reads structured blocks from a ``.blocks.jsonl`` sidec | STRING |
| HIGH | lightrag/chunker/recursive_character.py | 444 | Recursive character splitter — the ``"R"`` chunking strategy. Args: tokenizer: LightRAG tokenizer; used as | STRING |
| HIGH | tests/api/test_lightrag_ollama_chat.py | 147 | Send an HTTP request with retry mechanism Args: url: Request URL data: Request data stream: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/setup/test_misc.py | 297 | "LLM_BINDING_API_KEY=your_api_key", | STRING |
| HIGH | tests/setup/test_misc.py | 302 | "EMBEDDING_BINDING_API_KEY=your_api_key", | STRING |
| HIGH | docs/LightRAG-API-Server.md | 149 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 155 | # EMBEDDING_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server.md | 166 | # LLM_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server.md | 174 | # EMBEDDING_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server.md | 311 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 322 | EMBEDDING_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 833 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 1132 | LLM_BINDING_API_KEY=your-api-key | CODE |
| HIGH | docs/ParserServiceDeployment.md | 48 | "api_key": "your_api_key", | CODE |
| HIGH | docs/ProgramingWithCore.md | 1233 | export OPENAI_API_KEY=your-api-key | CODE |
| HIGH | docs/ProgramingWithCore.md | 1247 | OPENAI_API_KEY=your-api-key \ | CODE |
| HIGH | docs/ParserServiceDeployment-zh.md | 48 | "api_key": "your_api_key", | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 26 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 132 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 213 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 230 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 343 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 149 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 155 | # EMBEDDING_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server-zh.md | 166 | # LLM_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server-zh.md | 174 | # EMBEDDING_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server-zh.md | 311 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 322 | EMBEDDING_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 833 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 1132 | LLM_BINDING_API_KEY=your-api-key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 26 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 132 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 213 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 230 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 343 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | examples/lightrag_gemini_postgres_demo.py | 28 | GEMINI_API_KEY=your-api-key | STRING |
| HIGH⚡ | examples/lightrag_gemini_demo.py | 37 | "Please set it with: export GEMINI_API_KEY='your-api-key'" | CODE |
| HIGH | examples/lightrag_openai_opensearch_graph_demo.py | 23 | OPENAI_API_KEY=your-api-key | STRING |
| HIGH | …s/unofficial-sample/lightrag_llamaindex_direct_demo.py | 29 | OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY", "your-api-key-here") | CODE |
| HIGH⚡ | examples/unofficial-sample/lightrag_cloudflare_demo.py | 20 | cloudflare_api_key = "YOUR_API_KEY" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker-build-push.sh | 38 | # Check if buildx builder exists, create if not | COMMENT |
| LOW | lightrag/lightrag.py | 5223 | # Check if query_result is None | COMMENT |
| LOW | lightrag/operate.py | 3079 | # Check if this is a placeholder record | COMMENT |
| LOW | lightrag/operate.py | 3999 | # Check if JSON structured output mode is enabled | COMMENT |
| LOW | lightrag/operate.py | 4581 | # Check if any task raised an exception and ensure all exceptions are retrieved. | COMMENT |
| LOW | lightrag/operate.py | 4996 | # Check if pre-defined keywords are already provided | COMMENT |
| LOW | lightrag/operate.py | 6714 | # Check if any relations still have chunks after deduplication | COMMENT |
| LOW | lightrag/utils.py | 311 | # Check if the resolved path is within the base directory | COMMENT |
| LOW | lightrag/utils.py | 520 | # Check if record has the required attributes for an access log | COMMENT |
| LOW | lightrag/utils.py | 721 | # Check if func is already an EmbeddingFunc instance and unwrap it | COMMENT |
| LOW | lightrag/utils.py | 778 | # Check if user provided embedding_dim parameter | COMMENT |
| LOW | lightrag/utils.py | 802 | # Check if underlying function supports max_token_size and inject if not provided | COMMENT |
| LOW | lightrag/utils.py | 1580 | # Check if task was cancelled before worker started | COMMENT |
| LOW | lightrag/utils.py | 4515 | # Check if we already have identical content cached | COMMENT |
| LOW | lightrag/utils.py | 6709 | # Check if there are still unused chunks | COMMENT |
| LOW | lightrag/utils.py | 6981 | # Check if results are in the new index-based format | COMMENT |
| LOW | lightrag/pipeline.py | 2975 | # Check if corresponding content exists in full_docs. Strict where | COMMENT |
| LOW | lightrag/pipeline.py | 2984 | # Check if this is a failed document that should be preserved | COMMENT |
| LOW | lightrag/storage_migrations.py | 35 | # Check if migration is needed: | COMMENT |
| LOW | lightrag/storage_migrations.py | 55 | # Check if full_entities and full_relations are empty | COMMENT |
| LOW | lightrag/utils_graph.py | 619 | # Check if the entity exists | COMMENT |
| LOW | lightrag/utils_graph.py | 819 | # Check if the relation exists | COMMENT |
| LOW | lightrag/utils_graph.py | 2007 | # Check if storage has existing data | COMMENT |
| LOW | lightrag/utils_graph.py | 2375 | # Check if the normalized entity already exists. | COMMENT |
| LOW | lightrag/utils_graph.py | 2560 | # Check if both entities exist | COMMENT |
| LOW | lightrag/utils_graph.py | 2569 | # Check if relation already exists | COMMENT |
| LOW | lightrag/base.py | 368 | # Check if model_name exists (model_name is optional in EmbeddingFunc) | COMMENT |
| LOW | lightrag/tools/clean_llm_query_cache.py | 207 | # Check if config.ini has configuration | COMMENT |
| LOW | lightrag/tools/clean_llm_query_cache.py | 971 | # Check if choice is valid | COMMENT |
| LOW | lightrag/tools/clean_llm_query_cache.py | 1069 | # Check if user cancelled | COMMENT |
| LOW | lightrag/tools/clean_llm_query_cache.py | 1131 | # Check if there are any records to delete | COMMENT |
| LOW | lightrag/tools/download_cache.py | 131 | # Check if TIKTOKEN_CACHE_DIR is already set in environment | COMMENT |
| LOW | lightrag/tools/check_initialization.py | 101 | # Print results | COMMENT |
| LOW⚡ | lightrag/tools/migrate_llm_cache.py | 237 | # Check if storage requires configuration | COMMENT |
| LOW⚡ | lightrag/tools/migrate_llm_cache.py | 244 | # Check if has environment variables | COMMENT |
| LOW⚡ | lightrag/tools/migrate_llm_cache.py | 249 | # Check if has config.ini configuration | COMMENT |
| LOW | lightrag/tools/migrate_llm_cache.py | 216 | # Check if config.ini has configuration | COMMENT |
| LOW | lightrag/tools/migrate_llm_cache.py | 1068 | # Check if choice is valid | COMMENT |
| LOW | lightrag/tools/migrate_llm_cache.py | 1438 | # Check if user cancelled (setup_storage returns None for all fields) | COMMENT |
| LOW | lightrag/tools/migrate_llm_cache.py | 1442 | # Check if there are at least 2 storage types available | COMMENT |
| LOW | lightrag/llm/jina.py | 28 | # Check if the error response is HTML (common for 502, 503, etc.) | COMMENT |
| LOW | lightrag/llm/gemini.py | 284 | # Check if this part is thought content using the 'thought' attribute | COMMENT |
| LOW | lightrag/llm/binding_options.py | 296 | # Check if this is a dataclass and use dataclass fields | COMMENT |
| LOW⚡ | lightrag/llm/openai.py | 589 | # Check if this chunk has usage information (final chunk) | COMMENT |
| LOW⚡ | lightrag/llm/openai.py | 596 | # Check if choices exists and is not empty | COMMENT |
| LOW⚡ | lightrag/llm/openai.py | 604 | # Check if delta exists | COMMENT |
| LOW | lightrag/llm/openai.py | 53 | # Check if required Langfuse environment variables are set | COMMENT |
| LOW | lightrag/llm/openai.py | 820 | # Check if we should include reasoning content | COMMENT |
| LOW | lightrag/parser/docx/utils.py | 373 | # Check if it mentions billing which indicates permanent quota issue | COMMENT |
| LOW | lightrag/kg/qdrant_impl.py | 369 | # Check if legacy collection has workspace_id to determine migration strategy | COMMENT |
| LOW | lightrag/kg/qdrant_impl.py | 480 | # Check if we've reached the end | COMMENT |
| LOW⚡ | lightrag/kg/networkx_impl.py | 1197 | # Add neighbors to the queue with their degrees | COMMENT |
| LOW⚡ | lightrag/kg/networkx_impl.py | 1202 | # Check if there are unexplored neighbors (skipped due to depth limit) | COMMENT |
| LOW⚡ | lightrag/kg/networkx_impl.py | 1210 | # Check if we've reached max_nodes | COMMENT |
| LOW⚡ | lightrag/kg/networkx_impl.py | 1219 | # Check if graph is truncated - either due to max_nodes limit or depth limit | COMMENT |
| LOW | lightrag/kg/networkx_impl.py | 1135 | # Check if graph is truncated | COMMENT |
| LOW | lightrag/kg/networkx_impl.py | 1146 | # Check if node exists | COMMENT |
| LOW⚡ | lightrag/kg/mongo_impl.py | 4075 | # Check if we're using MongoDB Atlas (has search index capabilities) | COMMENT |
| LOW⚡ | lightrag/kg/mongo_impl.py | 4079 | # Check if we need to rebuild the index | COMMENT |
| LOW⚡ | lightrag/kg/mongo_impl.py | 4085 | # Check if index exists and drop it | COMMENT |
| 76 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | reproduce/Step_1_openai_compatible.py | 77 | # Initialize RAG instance | COMMENT |
| MEDIUM | reproduce/Step_1.py | 42 | # Initialize RAG instance | COMMENT |
| MEDIUM⚡ | lightrag/lightrag.py | 1789 | # Create a NEW EmbeddingFunc instance with the wrapped func to avoid mutating the caller's object | COMMENT |
| MEDIUM | lightrag/lightrag.py | 5020 | # Create a copy of param to avoid modifying the original | COMMENT |
| MEDIUM | lightrag/operate.py | 6935 | # Create a preliminary system prompt with empty content_data to calculate overhead. | COMMENT |
| MEDIUM | lightrag/utils.py | 7764 | # Create a list of (file_path, count, first_index) tuples | COMMENT |
| MEDIUM | lightrag/pipeline.py | 1431 | # Create a new record with unique ID for this duplicate attempt | COMMENT |
| MEDIUM | lightrag/tools/migrate_llm_cache.py | 716 | # Create a snapshot of matching items while holding the lock | COMMENT |
| MEDIUM | lightrag/llm/openai.py | 229 | # Create a merged config dict with precedence: explicit params > client_configs | COMMENT |
| MEDIUM | lightrag/llm/openai.py | 263 | # Create a merged config dict with precedence: explicit params > client_configs > defaults | COMMENT |
| MEDIUM | lightrag/llm/openai.py | 443 | # Create the OpenAI client (supports both OpenAI and Azure) | COMMENT |
| MEDIUM | lightrag/llm/openai.py | 1166 | # Create the OpenAI client (supports both OpenAI and Azure) | COMMENT |
| MEDIUM | lightrag/llm/bedrock.py | 348 | # Create a session that will be used throughout the streaming process | COMMENT |
| MEDIUM | lightrag/llm/bedrock.py | 359 | # Define the generator function that will manage the client lifecycle | COMMENT |
| MEDIUM⚡ | lightrag/kg/mongo_impl.py | 4090 | # Create the improved search index (async, no waiting) | COMMENT |
| MEDIUM | lightrag/kg/mongo_impl.py | 534 | # Create a copy of v for $set operation, excluding create_time to avoid conflicts | COMMENT |
| MEDIUM | lightrag/kg/mongo_impl.py | 4664 | # Define the aggregation pipeline with the converted query vector | COMMENT |
| MEDIUM | lightrag/kg/postgres_impl.py | 2171 | # Define the field changes needed | COMMENT |
| MEDIUM | lightrag/kg/faiss_impl.py | 159 | # Create an empty Faiss index for inner product (useful for normalized vectors = cosine similarity). | COMMENT |
| MEDIUM | lightrag/kg/shared_storage.py | 63 | # Define a direct print function for critical logs that must be visible in all processes | COMMENT |
| MEDIUM | lightrag/kg/shared_storage.py | 1672 | # Create a shared list object for history_messages | COMMENT |
| MEDIUM | lightrag/kg/shared_storage.py | 3725 | # Create a simple mutable object to store boolean value for compatibility with mutiprocess | COMMENT |
| MEDIUM | lightrag/api/run_with_gunicorn.py | 147 | # Define a custom application class that loads our config | COMMENT |
| MEDIUM | lightrag/api/run_with_gunicorn.py | 277 | # Create the application | COMMENT |
| MEDIUM | lightrag/api/lightrag_server.py | 1047 | # Create the EmbeddingFunc instance (now returns complete EmbeddingFunc with max_token_size) | COMMENT |
| MEDIUM | lightrag/api/routers/ollama_api.py | 240 | # Create an instance of the model | COMMENT |
| MEDIUM | lightrag/api/routers/query_routes.py | 623 | # Create a mapping from reference_id to chunk content | COMMENT |
| MEDIUM | lightrag/api/routers/document_routes.py | 4730 | # Create the bounded job record BEFORE publishing the manual intent | COMMENT |
| MEDIUM | tests/kg/test_graph_storage.py | 152 | # Initialize the storage instance | COMMENT |
| MEDIUM | tests/kg/postgres_impl/test_postgres_index_name.py | 84 | # Create a table name that results in exactly 63 bytes | COMMENT |
| MEDIUM | tests/chunker/test_rerank_chunking.py | 90 | # Create a very long document that exceeds character limit | COMMENT |
| MEDIUM | examples/graph_visual_with_html.py | 15 | # Create a Pyvis network | COMMENT |
| MEDIUM | examples/lightrag_openai_compatible_demo.py | 150 | # Initialize RAG instance | COMMENT |
| MEDIUM | examples/lightrag_openai_mongodb_graph_demo.py | 72 | # Initialize RAG instance | COMMENT |
| MEDIUM | examples/lightrag_openai_demo.py | 119 | # Initialize RAG instance | COMMENT |
| MEDIUM | examples/lightrag_ollama_demo.py | 139 | # Initialize RAG instance | COMMENT |
| MEDIUM | examples/graph_visual_with_neo4j.py | 159 | # Create a Neo4j driver | STRING |
| MEDIUM | …mples/unofficial-sample/lightrag_embedding_prefixes.py | 156 | # Initialize RAG instance | COMMENT |
| MEDIUM | …/unofficial-sample/lightrag_llamaindex_litellm_demo.py | 103 | # Initialize RAG instance | COMMENT |
| MEDIUM | …cial-sample/lightrag_openai_neo4j_milvus_redis_demo.py | 73 | # Initialize RAG instance | COMMENT |
| MEDIUM | …s/unofficial-sample/lightrag_llamaindex_direct_demo.py | 101 | # Initialize RAG instance | COMMENT |
| MEDIUM | …ficial-sample/lightrag_llamaindex_litellm_opik_demo.py | 114 | # Initialize RAG instance | COMMENT |
| MEDIUM | examples/unofficial-sample/lightrag_cloudflare_demo.py | 251 | # Initialize RAG instance | COMMENT |
| MEDIUM | examples/unofficial-sample/lightrag_lmdeploy_demo.py | 69 | # Initialize RAG instance | COMMENT |
| MEDIUM | examples/unofficial-sample/lightrag_nvidia_demo.py | 123 | # Initialize RAG instance | COMMENT |
| MEDIUM | scripts/setup/apple-container.sh | 272 | # This file is a copy of the user's .env (real API keys) — keep it private. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lightrag/utils.py | 7371 | ``{"chunk_ids": null}``), which mean UNKNOWN. Only in the UNKNOWN case may a | STRING |
| HIGH | lightrag/utils.py | 8141 | ``SET n += {k: null}`` silently *deletes* the property. | STRING |
| HIGH | lightrag/parser/docx/parser.py | 149 | # ``positions: [{"type": "paraid", "range": null}]``. | COMMENT |
| HIGH | lightrag/parser/docx/smart_heading/title_block.py | 1129 | - If false: set all six text fields to null, and classify EVERY index — {indices} — into exactly one of "headings" (a re | CODE |
| HIGH | lightrag/parser/docx/smart_heading/title_block.py | 1132 | {{"is_title_block": true|false, "main_title": string|null, "sub_title": string|null, "doc_number": string|null, "classif | CODE |
| HIGH | lightrag/kg/pgtable_impl.py | 753 | properties = lightrag_graph_nodes.properties || EXCLUDED.properties, | CODE |
| HIGH | lightrag/kg/pgtable_impl.py | 1573 | properties = lightrag_graph_nodes.properties || EXCLUDED.properties, | CODE |
| HIGH | lightrag/kg/mongo_impl.py | 1394 | # every doc with a real (non-null, existing) value. | COMMENT |
| HIGH | lightrag/kg/postgres_impl.py | 7236 | " $1::text || E'\\x01' ||" | CODE |
| HIGH | lightrag/kg/postgres_impl.py | 5996 | CURRENT_TIMESTAMP) sort FIRST and encode as ``[null, id]`` so the | STRING |
| HIGH | lightrag/api/lightrag_server.py | 148 | if (!data || data.type !== 'lightrag:set-docs-theme') return; | CODE |
| HIGH | lightrag/api/routers/graph_routes.py | 427 | "merge_error": null, | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 429 | "target_entity": null, | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 455 | "merge_error": null, | STRING |
| HIGH⚡ | …kg/redis_impl/test_redis_kv_create_time_integration.py | 356 | # pattern must REFUSE (tail position, float, null, quoted) plus non-JSON. | COMMENT |
| HIGH⚡ | …kg/redis_impl/test_redis_kv_create_time_integration.py | 364 | '{"create_time": null}', | CODE |
| HIGH⚡ | tests/kg/postgres_impl/test_pg_scheduling_pages.py | 199 | the cursor encodes [null, id] instead of failing closed — a row-value | STRING |
| HIGH | …sts/kg/postgres_impl/test_postgres_cypher_injection.py | 202 | "formula": "x < 5 && y > 3", | CODE |
| HIGH | …sts/kg/postgres_impl/test_postgres_cypher_injection.py | 213 | assert '`formula`: "x < 5 && y > 3"' in call["sql"] | CODE |
| HIGH | …s/kg/postgres_impl/test_postgres_upsert_edge_cypher.py | 183 | assert "$1::text || E'\\x01' ||" in lock_sql | CODE |
| HIGH | tests/kg/neo4j_impl/test_search_labels_sanitize.py | 34 | ("foo && bar", "foo bar"), | CODE |
| HIGH⚡ | tests/kg/pgtable_impl/test_pgtable_graph_storage.py | 350 | assert "lightrag_graph_nodes.properties || EXCLUDED.properties" in sql | CODE |
| HIGH⚡ | tests/kg/pgtable_impl/test_pgtable_graph_storage.py | 366 | assert "lightrag_graph_nodes.properties || EXCLUDED.properties" in sql | CODE |
| HIGH⚡ | tests/api/test_webui_title_injection.py | 129 | # null, not "": the client tests one falsy value, and the guard in the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightrag/api/routers/document_routes.py | 1151 | "metadata": {"author": "John Doe", "year": 2025}, | CODE |
| LOW | lightrag/api/routers/document_routes.py | 1190 | "metadata": {"author": "John Doe", "year": 2025}, | CODE |
| LOW | lightrag/api/routers/document_routes.py | 1308 | "metadata": {"author": "John Doe", "year": 2025}, | CODE |
| LOW | tests/setup/test_collect.py | 860 | prompt_secret_until_valid_with_default() {{ printf 'fake-key'; }} | CODE |
| LOW | tests/parser/docx/test_smart_heading_flow.py | 3778 | logs = [m for m in _log_messages(caplog) if "placeholder" in m] | CODE |
| LOW | tests/kg/json_impl/test_write_json_optimization.py | 30 | "name": "John Doe", | CODE |
| LOW⚡ | tests/api/config/test_api_config_vlm_enable.py | 76 | monkeypatch.setenv("VLM_LLM_BINDING_API_KEY", "placeholder") | CODE |
| LOW⚡ | tests/api/routes/test_description_api_validation.py | 229 | ["entity", "Alice", "Acme Corp", "founded", "Alice founded Acme Corp."], | CODE |
| LOW | tests/api/routes/test_description_api_validation.py | 241 | assert relation["tgt_id"] == "Acme Corp" | CODE |
| LOW | tests/api/routes/test_description_api_validation.py | 262 | ["entity", "Alice", "Acme Corp", "founded", " "], | CODE |
| LOW | tests/api/routes/test_description_api_validation.py | 277 | ["edge", "Alice", "Acme Corp", "founded", "Alice founded Acme Corp."], | CODE |
| LOW | tests/extraction/test_relation_evidence_floor_repair.py | 265 | @pytest.mark.parametrize("placeholder", sorted(RELATION_NO_EVIDENCE_SOURCE_IDS)) | CODE |
| LOW | tests/extraction/test_relation_evidence_floor_repair.py | 327 | @pytest.mark.parametrize("placeholder", sorted(RELATION_NO_EVIDENCE_SOURCE_IDS)) | CODE |
| LOW⚡ | tests/extraction/test_entity_extraction_stability.py | 510 | assert set(nodes) == {"Alice", "Acme Corp"} | CODE |
| LOW⚡ | tests/extraction/test_entity_extraction_stability.py | 511 | assert ("Alice", "Acme Corp") in edges | CODE |
| LOW⚡ | tests/extraction/test_entity_extraction_stability.py | 702 | assert set(entities.keys()) == {"Alice", "Acme Corp"} | CODE |
| LOW⚡ | tests/extraction/test_entity_extraction_stability.py | 706 | assert relation_data["tgt_id"] == "Acme Corp" | CODE |
| LOW | tests/extraction/test_entity_extraction_stability.py | 185 | "name": "Acme Corp", | CODE |
| LOW | tests/extraction/test_entity_extraction_stability.py | 193 | "target": "Acme Corp", | CODE |
| LOW | tests/extraction/test_entity_extraction_stability.py | 660 | assert next(iter(relationships.keys())) == ("Alice", "Acme Corp") | CODE |
| LOW | tests/extraction/test_entity_extraction_stability.py | 683 | assert relation_data["tgt_id"] == "Acme Corp" | CODE |
| LOW | lightrag_webui/src/locales/zh.json | 397 | "placeholder": "页面内搜索节点...", | CODE |
| LOW | lightrag_webui/src/locales/zh.json | 404 | "placeholder": "搜索节点名称...", | CODE |
| LOW | lightrag_webui/src/locales/zh.json | 444 | "placeholder": "输入查询内容 (支持模式前缀: /<Query Mode>)", | CODE |
| LOW | lightrag_webui/src/locales/zh.json | 509 | "placeholder": "请输入 API Key", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 397 | "placeholder": "ページ内のノードを検索...", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 404 | "placeholder": "ノード名を検索...", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 444 | "placeholder": "クエリを入力(プレフィックス対応: /<クエリモード>)", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 509 | "placeholder": "APIキーを入力", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 397 | "placeholder": "Knoten auf der Seite suchen...", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 404 | "placeholder": "Knotenname suchen...", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 444 | "placeholder": "Geben Sie Ihre Abfrage ein (Präfix unterstützt: /<Abfragemodus>)", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 509 | "placeholder": "API-Schlüssel eingeben", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 397 | "placeholder": "Поиск узлов на странице...", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 404 | "placeholder": "Поиск имени узла...", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 444 | "placeholder": "Введите ваш запрос (Поддержка префикса: /<Режим запроса>)", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 509 | "placeholder": "Введите ваш API ключ", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 397 | "placeholder": "Шукати вузли на сторінці...", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 404 | "placeholder": "Шукати ім'я вузла...", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 444 | "placeholder": "Введіть ваш запит (Підтримка префіксу: /<Режим запиту>)", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 509 | "placeholder": "Введіть ваш API ключ", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 397 | "placeholder": "Search nodes in page...", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 404 | "placeholder": "Search node name...", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 444 | "placeholder": "Enter your query (Support prefix: /<Query Mode>)", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 509 | "placeholder": "Enter your API key", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 397 | "placeholder": "Rechercher des nœuds dans la page...", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 404 | "placeholder": "Rechercher le nom du nœud...", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 444 | "placeholder": "Tapez votre requête (Préfixe de requête : /<Query Mode>)", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 509 | "placeholder": "Entrez votre clé API", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 397 | "placeholder": "페이지 내 노드 검색...", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 404 | "placeholder": "노드 이름 검색...", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 444 | "placeholder": "질문을 입력하세요 (접두사 지원: /<쿼리 모드>)", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 509 | "placeholder": "API 키 입력", | CODE |
| LOW | lightrag_webui/src/locales/vi.json | 397 | "placeholder": "Tìm kiếm nút trong trang...", | CODE |
| LOW | lightrag_webui/src/locales/vi.json | 404 | "placeholder": "Tìm kiếm tên nút...", | CODE |
| LOW | lightrag_webui/src/locales/vi.json | 444 | "placeholder": "Nhập truy vấn của bạn (Hỗ trợ tiền tố: /<Chế Độ Truy Vấn>)", | CODE |
| LOW | lightrag_webui/src/locales/vi.json | 509 | "placeholder": "Nhập khóa API của bạn", | CODE |
| LOW | lightrag_webui/src/locales/id.json | 397 | "placeholder": "Cari node di halaman...", | CODE |
| LOW | lightrag_webui/src/locales/id.json | 404 | "placeholder": "Cari nama node...", | CODE |
| LOW | lightrag_webui/src/locales/id.json | 444 | "placeholder": "Masukkan query Anda (mendukung prefix: /<Query Mode>)", | CODE |
| 17 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | lightrag/lightrag.py | 1788 | # Step 2: Apply priority wrapper decorator to EmbeddingFunc's inner func | COMMENT |
| LOW | lightrag/lightrag.py | 1770 | # Step 1: Capture embedding_func and max_token_size before applying rate_limit decorator | COMMENT |
| LOW⚡ | lightrag/operate.py | 6503 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 6509 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW⚡ | lightrag/operate.py | 6800 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 6806 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW | lightrag/operate.py | 6372 | # Step 1: Collect all text chunks for each entity | COMMENT |
| LOW | lightrag/operate.py | 6399 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned entities) | COMMENT |
| LOW | lightrag/operate.py | 6434 | # Step 3: Sort chunks for each entity by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 6447 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW | lightrag/operate.py | 6643 | # Step 1: Collect all text chunks for each relationship | COMMENT |
| LOW | lightrag/operate.py | 6678 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned relationships) | COMMENT |
| LOW | lightrag/operate.py | 6727 | # Step 3: Sort chunks for each relationship by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 6742 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW⚡ | lightrag/utils.py | 7329 | # Step 1: Remove chunks that are no longer needed | COMMENT |
| LOW⚡ | lightrag/utils.py | 7335 | # Step 2: Append genuine additions only (preserving order from new_chunk_ids). | COMMENT |
| LOW⚡ | lightrag/api/lightrag_server.py | 810 | # Step 3: Create optimized embedding function (calls underlying function directly) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 683 | # Step 1: Import provider function and extract default attributes | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 790 | # Step 2: Apply priority (user config > provider default) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 1006 | # Step 4: Wrap in EmbeddingFunc and return | COMMENT |
| LOW | lightrag/chunker/paragraph_semantic.py | 1351 | # Step 1: expand each oversized table paragraph into row-bounded | COMMENT |
| LOW | lightrag/chunker/paragraph_semantic.py | 1375 | # Step 2: greedy-pack pieces into chunks ≤ target_max. A piece | COMMENT |
| LOW | tests/kg/postgres_impl/test_postgres_migration.py | 662 | # Step 1: Simulate workspace_a initialization (Case 3 - only legacy exists) | COMMENT |
| LOW | tests/kg/postgres_impl/test_postgres_migration.py | 760 | # Step 2: Simulate workspace_b initialization (Case 3 - both exist, but legacy has B's data) | COMMENT |
| LOW | docs/OfflineDeployment.md | 212 | ### Step 1: Prepare in Online Environment | COMMENT |
| LOW | docs/OfflineDeployment.md | 231 | ### Step 2: Transfer to Offline Environment | COMMENT |
| LOW | docs/OfflineDeployment.md | 241 | ### Step 3: Install in Offline Environment | COMMENT |
| LOW | docs/OfflineDeployment.md | 262 | ### Step 4: Verify Installation | COMMENT |
| LOW⚡ | examples/lightrag_ag2_multiagent_demo.py | 267 | # Step 1: Set up LightRAG (async, runs on the background loop) | COMMENT |
| LOW⚡ | examples/lightrag_ag2_multiagent_demo.py | 270 | # Step 2: Create AG2 agents with LightRAG tools | COMMENT |
| LOW⚡ | examples/lightrag_ag2_multiagent_demo.py | 273 | # Step 3: Ask a complex question | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | lightrag/tools/clean_llm_query_cache.py | 872 | """Print comprehensive cleanup report | STRING |
| MEDIUM⚡ | lightrag/tools/migrate_llm_cache.py | 1526 | # Print comprehensive migration report | COMMENT |
| MEDIUM | lightrag/tools/migrate_llm_cache.py | 1358 | """Print comprehensive migration report | STRING |
| MEDIUM | lightrag/kg/mongo_impl.py | 3828 | """Try Atlas Search using compound query for comprehensive matching.""" | STRING |
| MEDIUM | lightrag/kg/shared_storage.py | 1296 | """Release all locks with comprehensive error handling, protected from cancellation""" | STRING |
| MEDIUM | lightrag/api/routers/document_routes.py | 6680 | # Handle both DocStatus enum and string cases for robust deserialization | COMMENT |
| MEDIUM | tests/tools/test_migrate_graph_storage_networkx.py | 53 | # the pgtable harness exercises. | COMMENT |
| LOW | tests/workspace/test_workspace_isolation.py | 696 | # back in Test 8.2 and is legitimately False here, while ns_a/ns_b were just set. | COMMENT |
| MEDIUM⚡ | tests/parser/docx/test_smart_heading_e2e.py | 321 | # harness | COMMENT |
| MEDIUM⚡ | tests/kg/postgres_impl/test_postgres_graph_batch.py | 16 | # Capture harness | COMMENT |
| MEDIUM | tests/api/routes/test_aquery_data_endpoint.py | 493 | "mode": "mix", # Use mixed mode to get the most comprehensive results | CODE |
| MEDIUM⚡ | …sts/chunker/test_paragraph_semantic_drop_references.py | 122 | # Filtering behaviour (assert on content markers, robust to LevelMerge) | COMMENT |
| MEDIUM⚡ | tests/chunker/test_chunking_raw_lightrag_parity.py | 62 | # Shared fixtures (mirrors the harness used by test_pipeline_release_closure) | COMMENT |
| MEDIUM | …ghtrag_webui/src/features/retrieval/useQuerySession.ts | 359 | // Use the robust COT parsing function | COMMENT |
| MEDIUM | lightrag_webui/src/features/retrieval/MessageList.tsx | 210 | // Handle copying message content with robust clipboard support | COMMENT |
| MEDIUM | .github/workflows/webui-tests.yml | 55 | # proves the test harness stayed out of the bundle. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | lightrag/lightrag.py | 1788 | # Step 2: Apply priority wrapper decorator to EmbeddingFunc's inner func | COMMENT |
| LOW | lightrag/lightrag.py | 1770 | # Step 1: Capture embedding_func and max_token_size before applying rate_limit decorator | COMMENT |
| LOW⚡ | lightrag/operate.py | 6503 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 6509 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW⚡ | lightrag/operate.py | 6800 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 6806 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW | lightrag/operate.py | 6372 | # Step 1: Collect all text chunks for each entity | COMMENT |
| LOW | lightrag/operate.py | 6399 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned entities) | COMMENT |
| LOW | lightrag/operate.py | 6434 | # Step 3: Sort chunks for each entity by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 6447 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW | lightrag/operate.py | 6643 | # Step 1: Collect all text chunks for each relationship | COMMENT |
| LOW | lightrag/operate.py | 6678 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned relationships) | COMMENT |
| LOW | lightrag/operate.py | 6727 | # Step 3: Sort chunks for each relationship by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 6742 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW⚡ | lightrag/utils.py | 7329 | # Step 1: Remove chunks that are no longer needed | COMMENT |
| LOW⚡ | lightrag/utils.py | 7335 | # Step 2: Append genuine additions only (preserving order from new_chunk_ids). | COMMENT |
| LOW⚡ | lightrag/api/lightrag_server.py | 810 | # Step 3: Create optimized embedding function (calls underlying function directly) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 683 | # Step 1: Import provider function and extract default attributes | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 790 | # Step 2: Apply priority (user config > provider default) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 1006 | # Step 4: Wrap in EmbeddingFunc and return | COMMENT |
| LOW | lightrag/chunker/paragraph_semantic.py | 1351 | # Step 1: expand each oversized table paragraph into row-bounded | COMMENT |
| LOW | lightrag/chunker/paragraph_semantic.py | 1375 | # Step 2: greedy-pack pieces into chunks ≤ target_max. A piece | COMMENT |
| LOW | tests/kg/postgres_impl/test_postgres_migration.py | 662 | # Step 1: Simulate workspace_a initialization (Case 3 - only legacy exists) | COMMENT |
| LOW | tests/kg/postgres_impl/test_postgres_migration.py | 760 | # Step 2: Simulate workspace_b initialization (Case 3 - both exist, but legacy has B's data) | COMMENT |
| LOW⚡ | examples/lightrag_ag2_multiagent_demo.py | 267 | # Step 1: Set up LightRAG (async, runs on the background loop) | COMMENT |
| LOW⚡ | examples/lightrag_ag2_multiagent_demo.py | 270 | # Step 2: Create AG2 agents with LightRAG tools | COMMENT |
| LOW⚡ | examples/lightrag_ag2_multiagent_demo.py | 273 | # Step 3: Ask a complex question | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightrag/llm_roles.py | 139 | def set_role_llm_metadata(self, role: str, **metadata: Any) -> None: | CODE |
| LOW⚡ | lightrag/lightrag.py | 1426 | def _set_runtime_addon_params(self, addon_params: Mapping[str, Any] | None) -> None: | CODE |
| LOW | lightrag/__init__.py | 5 | __all__ = [ | CODE |
| LOW⚡ | lightrag/multimodal_context.py | 83 | logger = logging.getLogger(__name__) | CODE |
| LOW | lightrag/multimodal_context.py | 1099 | __all__ = [ | CODE |
| LOW | lightrag/chunk_schema.py | 376 | __all__ = [ | CODE |
| LOW | lightrag/prompt_multimodal.py | 352 | __all__ = [ | STRING |
| LOW | lightrag/tools/chunk_tracking_repair.py | 160 | def set_metadata(self, **values: str) -> None: | CODE |
| LOW | lightrag/llm/gemini.py | 865 | __all__ = [ | CODE |
| LOW | lightrag/llm/azure_openai.py | 18 | __all__ = [ | CODE |
| LOW | lightrag/parser/_html_table.py | 208 | __all__ = [ | CODE |
| LOW | lightrag/parser/_markdown.py | 68 | __all__ = [ | CODE |
| LOW | lightrag/parser/markdown/ir_builder.py | 230 | __all__ = ["NativeMarkdownIRBuilder"] | CODE |
| LOW | lightrag/parser/markdown/raw_cache.py | 249 | __all__ = ["NativeImageRawCache", "native_md_options_signature"] | CODE |
| LOW | lightrag/parser/legacy/__init__.py | 14 | __all__ = ["LegacyExtractionError", "extract_text"] | CODE |
| LOW | lightrag/parser/external/_manifest.py | 159 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/_zip.py | 99 | __all__ = ["result_bundle_limits", "safe_extract_zip"] | CODE |
| LOW | lightrag/parser/external/_common.py | 326 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/__init__.py | 35 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/docling/ir_builder.py | 1068 | __all__ = ["DoclingIRBuilder"] | CODE |
| LOW | lightrag/parser/external/docling/manifest.py | 126 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/docling/client.py | 523 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/docling/cache.py | 250 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/docling/__init__.py | 33 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/mineru/ir_builder.py | 885 | __all__ = ["MinerUIRBuilder"] | CODE |
| LOW | lightrag/parser/external/mineru/manifest.py | 155 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/mineru/client.py | 742 | __all__ = ["MinerURawClient", "CONTENT_LIST_FILENAME"] | CODE |
| LOW | lightrag/parser/external/mineru/cache.py | 421 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/mineru/__init__.py | 21 | __all__ = [ | CODE |
| LOW | lightrag/parser/docx/ir_builder.py | 335 | __all__ = ["NativeDocxIRBuilder"] | CODE |
| LOW | lightrag/parser/docx/zip_budget.py | 199 | __all__ = [ | CODE |
| LOW | lightrag/api/routers/__init__.py | 14 | __all__ = ["OllamaAPI"] | CODE |
| LOW | lightrag/evaluation/__init__.py | 16 | __all__ = ["RAGEvaluator"] | CODE |
| LOW | lightrag/sidecar/__init__.py | 29 | __all__ = [ | CODE |
| LOW | lightrag/chunker/__init__.py | 97 | __all__ = [ | CODE |
| LOW⚡ | tests/llm/bedrock_impl/test_bedrock_llm.py | 643 | def set_role_llm_metadata(self, _role: str, **_metadata) -> None: | CODE |
| LOW | tests/parser/docx/_native_docx_fixtures.py | 329 | __all__ = ["Scenario", "SCENARIOS", "_block"] | CODE |
| LOW | …ts/parser/docx/test_extract_blocks_characterization.py | 54 | def _set_para_id(para, hex_id: str) -> None: | CODE |
| LOW | tests/parser/docx/test_smart_heading_features.py | 40 | def _set_doc_default_size(doc: Document, half_points: int) -> None: | CODE |
| LOW | tests/api/test_lightrag_ollama_chat.py | 70 | def set_verbose(cls, verbose: bool) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lightrag/api/config.py | 857 | # AI-generated content notice shown under every answer in the two query | COMMENT |
| HIGH | lightrag/api/lightrag_server.py | 1710 | # Whether the two query UIs label every answer as AI-generated | COMMENT |
| HIGH | lightrag_webui/src/components/retrieval/ChatMessage.tsx | 180 | // AI-generated content notice (ENABLE_AI_CONTENT_NOTICE): a trailing item on | COMMENT |
| HIGH | lightrag_webui/src/lib/aiContentNotice.test.ts | 29 | // AI-generated would be false. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightrag/llm_roles.py | 309 | CODE | |
| LOW | lightrag/llm_roles.py | 393 | CODE | |
| LOW | lightrag/llm_roles.py | 428 | CODE | |
| LOW | lightrag/operate.py | 2782 | CODE | |
| LOW | lightrag/operate.py | 3514 | CODE | |
| LOW | lightrag/utils.py | 5515 | CODE | |
| LOW | lightrag/pipeline.py | 740 | CODE | |
| LOW | lightrag/llm/gemini.py | 312 | CODE | |
| LOW | lightrag/llm/gemini.py | 730 | CODE | |
| LOW | lightrag/llm/openai.py | 305 | CODE | |
| LOW | lightrag/llm/openai.py | 1032 | CODE | |
| LOW | lightrag/llm/openai.py | 1054 | CODE | |
| LOW | lightrag/llm/openai.py | 1216 | CODE | |
| LOW | lightrag/llm/openai.py | 1298 | CODE | |
| LOW | lightrag/llm/openai.py | 1307 | CODE | |
| LOW | lightrag/llm/llama_index_impl.py | 224 | CODE | |
| LOW | lightrag/llm/bedrock.py | 187 | CODE | |
| LOW | lightrag/llm/bedrock.py | 551 | CODE | |
| LOW | lightrag/llm/hf.py | 290 | CODE | |
| LOW | lightrag/parser/external/mineru/cache.py | 278 | CODE | |
| LOW | lightrag/parser/docx/utils.py | 752 | CODE | |
| LOW | lightrag/parser/docx/utils.py | 803 | CODE | |
| LOW | lightrag/parser/docx/smart_heading/heading_flow.py | 391 | CODE | |
| LOW | lightrag/parser/docx/smart_heading/title_block.py | 504 | CODE | |
| LOW | lightrag/kg/opensearch_impl.py | 5714 | CODE | |
| LOW | lightrag/kg/scan_job_store.py | 258 | CODE | |
| LOW | lightrag/chunker/semantic_vector.py | 464 | CODE | |
| LOW | tests/pipeline/test_insert_done_error_handling.py | 91 | CODE | |
| LOW | tests/parser/external/docling/test_client.py | 65 | CODE | |
| LOW | tests/kg/mongo_impl/test_mongo_scheduling_pages.py | 102 | CODE | |
| LOW | tests/api/routes/test_document_routes_docx_archive.py | 126 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | examples/unofficial-sample/lightrag_cloudflare_demo.py | 32 | WORKING_DIR = "../dickens" # you can change output as desired | CODE |
| MEDIUM | examples/unofficial-sample/lightrag_nvidia_demo.py | 112 | # so you can adjust to be able to fit the NVIDIA model (future work) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker-compose.podman.yml | 3 | # Usage: | COMMENT |
| LOW⚡ | lightrag/llm/binding_options.py | 792 | # Usage: | COMMENT |
| LOW | scripts/setup/apple-container.sh | 35 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | lightrag/base.py | 1131 | CODE | |
| MEDIUM | lightrag/base.py | 1254 | CODE |