[EMNLP2025] LightRAG: Simple and Fast Retrieval-Augmented Generation
This report presents the forensic synthetic code analysis of HKUDS/LightRAG, a Python project with 39,253 GitHub stars. SynthScan v2.0 examined 404,882 lines of code across 993 source files, recording 10386 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 35.1 places this repository in the Strong AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 10386 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| 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 | 276 | def _apply_llm_role_config_update( | CODE |
| LOW | lightrag/llm_roles.py | 578 | async def get_embedding_queue_status(self) -> dict[str, Any]: | CODE |
| LOW⚡ | lightrag/lightrag.py | 1028 | def _set_runtime_addon_params(self, addon_params: Mapping[str, Any] | None) -> None: | CODE |
| LOW⚡ | lightrag/lightrag.py | 1032 | def _apply_chunk_size_overlay(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 1151 | def _refresh_addon_params_cache(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 1171 | def _ensure_addon_params_cache(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 1217 | def _build_role_llm_cache_identity( | CODE |
| LOW | lightrag/lightrag.py | 1621 | def _get_parse_native_executor(self) -> ThreadPoolExecutor: | CODE |
| LOW | lightrag/lightrag.py | 1638 | def _shutdown_parser_executor(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 2155 | def _operation_truncation_record() -> dict[str, Any] | None: | CODE |
| LOW | lightrag/lightrag.py | 2169 | def _terminal_truncation_kwargs() -> dict[str, Any]: | CODE |
| LOW | lightrag/lightrag.py | 2192 | async def _journal_truncation_write_ahead( | CODE |
| LOW | lightrag/lightrag.py | 2603 | async def _upsert_custom_chunk_status( | CODE |
| LOW | lightrag/lightrag.py | 2693 | async def _union_doc_recovery_anchors( | CODE |
| LOW | lightrag/lightrag.py | 2733 | async def arollback_failed_custom_chunk_patches( | CODE |
| LOW | lightrag/lightrag.py | 2900 | async def _rollback_one_custom_chunk_patch( | CODE |
| LOW | lightrag/lightrag.py | 3029 | async def _persist_custom_chunk_recovery_warning( | CODE |
| LOW | lightrag/lightrag.py | 3153 | async def _prune_doc_recovery_anchors( | CODE |
| LOW | lightrag/lightrag.py | 3223 | async def _process_extract_entities( | CODE |
| LOW | lightrag/lightrag.py | 3275 | async def _discard_pending_index_ops( | CODE |
| LOW | lightrag/lightrag.py | 3423 | async def _insert_done_with_cleanup(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 3499 | def _normalize_custom_kg_entity_name(value: Any, *, field: str) -> str: | CODE |
| LOW | lightrag/lightrag.py | 4361 | async def _update_delete_retry_state( | CODE |
| LOW | lightrag/lightrag.py | 4443 | async def _get_existing_llm_cache_ids(self, cache_ids: list[str]) -> list[str]: | CODE |
| LOW | lightrag/lightrag.py | 4610 | def _patch_journal_candidates( | CODE |
| LOW | lightrag/lightrag.py | 4640 | async def _resolve_purge_recovery_proof( | CODE |
| LOW | lightrag/lightrag.py | 4848 | def _raise_missing_recovery_proof( | CODE |
| LOW | lightrag/lightrag.py | 5227 | async def _purge_derived_kg_contributions( | CODE |
| LOW | lightrag/lightrag.py | 6433 | async def _raise_if_recovery_required(self) -> None: | CODE |
| LOW | lightrag/operate.py | 183 | def _get_relationship_vdb_timeout_seconds(global_config: dict[str, Any]) -> float: | CODE |
| LOW | lightrag/operate.py | 200 | def _format_relation_edge_label(edge_key: tuple[str, str] | list[str]) -> str: | CODE |
| LOW | lightrag/operate.py | 208 | def _truncate_entity_identifier( | CODE |
| LOW | lightrag/operate.py | 248 | def _truncate_section_context( | CODE |
| LOW | lightrag/operate.py | 371 | async def _handle_entity_relation_summary( | CODE |
| LOW | lightrag/operate.py | 660 | def _normalize_and_validate_entity_type(entity_type: str, context: str) -> str | None: | CODE |
| LOW | lightrag/operate.py | 708 | def _handle_single_entity_extraction( | CODE |
| LOW | lightrag/operate.py | 772 | def _handle_single_relationship_extraction( | CODE |
| LOW | lightrag/operate.py | 852 | def _normalize_text_extraction_record_attributes( | CODE |
| LOW | lightrag/operate.py | 889 | def _looks_like_json_extraction_result(result: str) -> bool: | CODE |
| LOW | lightrag/operate.py | 905 | async def _process_json_extraction_result( | CODE |
| LOW | lightrag/operate.py | 1091 | async def rebuild_knowledge_from_chunks( | CODE |
| LOW | lightrag/operate.py | 1312 | async def _locked_rebuild_relationship(src, tgt, chunk_ids): | CODE |
| LOW | lightrag/operate.py | 1404 | async def _get_cached_extraction_results( | CODE |
| LOW | lightrag/operate.py | 1497 | async def _process_extraction_result( | CODE |
| LOW | lightrag/operate.py | 1628 | async def _rebuild_from_extraction_result( | CODE |
| LOW | lightrag/operate.py | 1684 | def _surviving_chunk_file_paths( | CODE |
| 6409 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | lightrag/constants.py | 783 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/constants.py | 787 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils.py | 3662 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils.py | 3664 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 2698 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 2700 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 2961 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 2963 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3016 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3018 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3233 | # ----------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3235 | # ----------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3468 | # ----------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils.py | 3470 | # ----------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 660 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 662 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 2194 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 2196 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 5778 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 5780 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 6056 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 6058 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 558 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 560 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 3070 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 3076 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 4169 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 4171 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 4751 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 4753 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 6391 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 6393 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 88 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 92 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 685 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 687 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 132 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 135 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 188 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 190 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 267 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 269 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 461 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 463 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 1281 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 1283 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 1308 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 1310 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1156 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1158 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1206 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1208 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1346 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 1348 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/base.py | 1455 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | lightrag/base.py | 1461 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | lightrag/tools/rebuild_vdb.py | 575 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | lightrag/tools/rebuild_vdb.py | 577 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | lightrag/tools/rebuild_vdb.py | 760 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | lightrag/tools/rebuild_vdb.py | 762 | # ------------------------------------------------------------------ | COMMENT |
| 1365 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 | 348 | except Exception: | CODE |
| LOW | lightrag/lightrag.py | 15 | except Exception: # pragma: no cover - optional dependency | CODE |
| LOW | lightrag/lightrag.py | 1685 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 2451 | except Exception as bookkeeping_error: | CODE |
| LOW | lightrag/lightrag.py | 2483 | except Exception as ingress_error: | CODE |
| LOW | lightrag/lightrag.py | 2513 | except Exception as probe_error: | CODE |
| LOW | lightrag/lightrag.py | 2584 | except Exception as drain_error: | CODE |
| LOW | lightrag/lightrag.py | 2824 | except Exception as rollback_error: | CODE |
| LOW | lightrag/lightrag.py | 3241 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3349 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3353 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3381 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3889 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 4316 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 4458 | except Exception as verification_error: | CODE |
| LOW | lightrag/lightrag.py | 4492 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5171 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5203 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5340 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5525 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5563 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5629 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5642 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5667 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5680 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 5985 | except Exception as cache_err: | CODE |
| LOW | lightrag/lightrag.py | 5998 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6055 | except Exception as cache_collect_error: | CODE |
| LOW | lightrag/lightrag.py | 6074 | except Exception as status_write_error: | CODE |
| LOW | lightrag/lightrag.py | 6168 | except Exception as cache_delete_error: | CODE |
| LOW | lightrag/lightrag.py | 6196 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6229 | except Exception as status_update_error: | CODE |
| LOW | lightrag/lightrag.py | 6243 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 6262 | except Exception as status_update_error: | CODE |
| LOW | lightrag/lightrag.py | 6301 | except Exception as ingress_error: | CODE |
| LOW | lightrag/lightrag.py | 6324 | except Exception as probe_error: | CODE |
| LOW | lightrag/lightrag.py | 6363 | except Exception as persistence_error: | CODE |
| LOW | lightrag/lightrag.py | 6418 | except Exception as drain_error: | CODE |
| LOW | lightrag/operate.py | 765 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 845 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 1006 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 1082 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 1258 | except Exception as e: | CODE |
| 737 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 | 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 documents with pagination support args: status_filter: filter by document status, none for all statuses page: page 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 |
| HIGH | lightrag/kg/json_doc_status_impl.py | 0 | get documents with pagination support args: status_filter: filter by document status, none for all statuses page: page n | STRING |
| HIGH | lightrag/kg/redis_impl.py | 0 | get documents with pagination support args: status_filter: filter by document status, none for all statuses page: page n | 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 |
| 25 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 | 201 | 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 | 384 | CODE | |
| LOW | lightrag/utils.py | 384 | CODE | |
| LOW | lightrag/utils.py | 384 | CODE | |
| LOW | lightrag/pipeline.py | 12 | CODE | |
| LOW | lightrag/pipeline.py | 122 | CODE | |
| LOW | lightrag/pipeline.py | 122 | CODE | |
| LOW | lightrag/storage_migrations.py | 13 | CODE | |
| LOW | lightrag/exceptions.py | 1 | CODE | |
| LOW | lightrag/multimodal_context.py | 64 | 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 | 727 | CODE | |
| LOW | lightrag/tools/migrate_graph_storage.py | 58 | 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 | |
| LOW | lightrag/parser/markdown/parser.py | 87 | CODE | |
| LOW | lightrag/parser/markdown/raw_cache.py | 22 | CODE | |
| 297 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 | 276 | CODE | |
| LOW | lightrag/lightrag.py | 1232 | CODE | |
| LOW | lightrag/lightrag.py | 1656 | CODE | |
| LOW | lightrag/lightrag.py | 1858 | CODE | |
| LOW | lightrag/lightrag.py | 3153 | CODE | |
| LOW | lightrag/lightrag.py | 3464 | CODE | |
| LOW | lightrag/lightrag.py | 4184 | CODE | |
| LOW | lightrag/lightrag.py | 5227 | CODE | |
| LOW | lightrag/lightrag.py | 5689 | CODE | |
| LOW | lightrag/operate.py | 248 | CODE | |
| LOW | lightrag/operate.py | 371 | CODE | |
| LOW | lightrag/operate.py | 1091 | CODE | |
| LOW | lightrag/operate.py | 1497 | CODE | |
| LOW | lightrag/operate.py | 1718 | CODE | |
| LOW | lightrag/operate.py | 1990 | CODE | |
| LOW | lightrag/operate.py | 2392 | CODE | |
| LOW | lightrag/operate.py | 2745 | CODE | |
| LOW | lightrag/operate.py | 3477 | CODE | |
| LOW | lightrag/operate.py | 3905 | CODE | |
| LOW | lightrag/operate.py | 4817 | CODE | |
| LOW | lightrag/operate.py | 5043 | CODE | |
| LOW | lightrag/operate.py | 6005 | CODE | |
| LOW | lightrag/operate.py | 6256 | CODE | |
| LOW | lightrag/operate.py | 4012 | CODE | |
| LOW | lightrag/utils.py | 150 | CODE | |
| LOW | lightrag/utils.py | 1011 | CODE | |
| LOW | lightrag/utils.py | 3921 | CODE | |
| LOW | lightrag/utils.py | 4237 | CODE | |
| LOW | lightrag/utils.py | 4363 | CODE | |
| LOW | lightrag/utils.py | 5051 | CODE | |
| LOW | lightrag/utils.py | 5595 | CODE | |
| LOW | lightrag/utils.py | 5623 | CODE | |
| LOW | lightrag/utils.py | 5861 | CODE | |
| LOW | lightrag/utils.py | 6060 | CODE | |
| LOW | lightrag/utils.py | 6191 | CODE | |
| LOW | lightrag/utils.py | 6319 | CODE | |
| LOW | lightrag/utils.py | 6698 | CODE | |
| LOW | lightrag/utils.py | 1058 | CODE | |
| LOW | lightrag/utils.py | 3363 | CODE | |
| LOW | lightrag/utils.py | 3488 | CODE | |
| LOW | lightrag/utils.py | 3573 | CODE | |
| LOW | lightrag/utils.py | 1269 | CODE | |
| LOW | lightrag/utils.py | 1368 | CODE | |
| LOW | lightrag/utils.py | 1473 | CODE | |
| LOW | lightrag/utils.py | 1631 | CODE | |
| LOW | lightrag/utils.py | 1730 | CODE | |
| LOW | lightrag/pipeline.py | 664 | CODE | |
| LOW | lightrag/pipeline.py | 1644 | CODE | |
| LOW | lightrag/pipeline.py | 2427 | CODE | |
| LOW | lightrag/pipeline.py | 2833 | CODE | |
| LOW | lightrag/pipeline.py | 3842 | CODE | |
| LOW | lightrag/pipeline.py | 4173 | CODE | |
| LOW | lightrag/pipeline.py | 4569 | CODE | |
| 319 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | README-ja.md | 7 | # 🚀 LightRAG: シンプルかつ高速な検索拡張生成(RAG) | COMMENT |
| MEDIUM | README-ja.md | 259 | ### 軽量なグラフベース RAG フレームワーク | COMMENT |
| MEDIUM | README.md | 259 | ### 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/constants.py | 41 | # pushing an otherwise-valid chunk past the provider context window; over budget | COMMENT |
| MEDIUM | lightrag/constants.py | 713 | # over the embedding model's context limit after chunking. Independent from | COMMENT |
| MEDIUM | lightrag/operate.py | 322 | # embedding model's own context limit — not a real-world budget. | COMMENT |
| MEDIUM | lightrag/operate.py | 4035 | # an otherwise-valid chunk past the provider context window. When the | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 2195 | # Pipeline orchestration | COMMENT |
| MEDIUM | lightrag/pipeline.py | 173 | # fully event-driven (``await get_document()``) and never polls. | COMMENT |
| MEDIUM | lightrag/pipeline.py | 6799 | # absolute legacy RAG-Anything/MinerU path, a ``..`` escape) | COMMENT |
| MEDIUM | lightrag/pipeline.py | 7027 | # 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 | 751 | # embedding model — full_docs is a plain KV, and reading it is what lets the | COMMENT |
| MEDIUM⚡ | lightrag/tools/migrate_graph_storage.py | 569 | # Async orchestration — preconditions, write pipeline, compensation | COMMENT |
| MEDIUM | lightrag/llm/gemini.py | 562 | # model that burned the whole output budget on its reasoning trace is | COMMENT |
| MEDIUM | lightrag/llm/gemini.py | 622 | # 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 | 325 | # the reasoning trace). Raise like the OpenAI binding does, | COMMENT |
| MEDIUM | lightrag/parser/docx/parse_document.py | 667 | # (guardrails.is_visually_centered). | COMMENT |
| MEDIUM | lightrag/parser/docx/parse_document.py | 1168 | # --- smart path (pipeline + landing guardrails) --------------- | COMMENT |
| MEDIUM | lightrag/parser/docx/parse_document.py | 1188 | # Landing guardrails: any violation abandons the smart output for THIS | COMMENT |
| MEDIUM | lightrag/parser/docx/parse_document.py | 1242 | # 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 | 2710 | # whole-document orchestration | COMMENT |
| MEDIUM | lightrag/parser/docx/smart_heading/heading_flow.py | 1842 | #: - _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 | 3998 | # built under a *different* embedding model must NOT be | COMMENT |
| MEDIUM⚡ | lightrag/kg/postgres_impl.py | 2313 | # with proper embedding model and dimension suffix for data isolation | STRING |
| MEDIUM | lightrag/kg/faiss_impl.py | 1202 | # 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 | 391 | # RAG configuration | COMMENT |
| MEDIUM | lightrag/api/utils_api.py | 690 | # RAG Configuration | STRING |
| MEDIUM | lightrag/api/lightrag_server.py | 714 | # embedding model is configured. Without this, the provider's decorator | COMMENT |
| MEDIUM | lightrag/api/lightrag_server.py | 2332 | # Initialize RAG with unified configuration | COMMENT |
| MEDIUM | lightrag/api/lightrag_server.py | 2753 | # embedding model configuration binding/host address (if applicable)/model (if applicable) | COMMENT |
| MEDIUM | lightrag/evaluation/eval_rag_quality.py | 19 | # Specify custom RAG endpoint | STRING |
| MEDIUM⚡ | lightrag/evaluation/eval_rag_quality.py | 419 | # all RAG responses from being generated at once when eval is slow | COMMENT |
| MEDIUM⚡ | lightrag/evaluation/eval_rag_quality.py | 424 | # Stage 1: Generate RAG response | COMMENT |
| MEDIUM | lightrag/evaluation/eval_rag_quality.py | 572 | # Stage 1: RAG generation - allow x2 concurrency to keep evaluation fed | COMMENT |
| MEDIUM | lightrag/evaluation/eval_rag_quality.py | 598 | max_connections=(max_async + 1) * 2, # Allow buffer for RAG stage | CODE |
| MEDIUM | lightrag/evaluation/eval_rag_quality.py | 976 | # Specify custom RAG endpoint | COMMENT |
| MEDIUM | …ation/sample_documents/05_evaluation_and_deployment.md | 1 | # RAG Evaluation Metrics and Deployment | COMMENT |
| MEDIUM | …ation/sample_documents/05_evaluation_and_deployment.md | 3 | ## Key RAG Evaluation Metrics | COMMENT |
| MEDIUM | …rag/evaluation/sample_documents/02_rag_architecture.md | 1 | # RAG System Architecture | COMMENT |
| MEDIUM | …rag/evaluation/sample_documents/02_rag_architecture.md | 3 | ## Main Components of RAG Systems | COMMENT |
| MEDIUM | …valuation/sample_documents/03_lightrag_improvements.md | 1 | # LightRAG Improvements Over Traditional RAG | COMMENT |
| MEDIUM | tests/test_doc_processing_status_from_stored.py | 34 | # The RAG-Anything shape from HKUDS/RAG-Anything#73 | COMMENT |
| MEDIUM⚡ | tests/tools/test_migrate_graph_storage.py | 434 | # Async orchestration — fakes standing in for the storage backends | COMMENT |
| MEDIUM⚡ | tests/workspace/test_workspace_isolation.py | 547 | # Purpose: Validate guardrails for workspace normalization and namespace | COMMENT |
| MEDIUM | tests/workspace/test_workspace_isolation.py | 1076 | # Test 11.2: Insert different data to each RAG instance (CONCURRENTLY) | COMMENT |
| MEDIUM⚡ | tests/parser/docx/test_smart_heading_flow.py | 2892 | # These tests use the REAL guardrails.strong_body_reason: every record either | COMMENT |
| MEDIUM⚡ | tests/kg/qdrant_impl/test_qdrant_migration.py | 214 | # Use a large embedding model | COMMENT |
| 21 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lightrag/lightrag.py | 297 | Drive an async coroutine to completion from a synchronous wrapper. The synchronous wrappers (``insert``, ``query``, | STRING |
| HIGH | lightrag/utils.py | 2256 | Execute function with enhanced priority-based concurrency control and timeout handling Args: | STRING |
| HIGH | lightrag/utils.py | 7014 | Validate a workspace name used to build per-workspace directories. File-based storages place their data in a subdir | STRING |
| HIGH | lightrag/utils.py | 7315 | Reject a node/edge attribute mapping no graph backend could store. Args: attributes: Attribute mapping abou | STRING |
| HIGH | lightrag/utils.py | 7337 | Reject attribute names a backend would read as something other than a name. The *interpretation* rule, not the seri | STRING |
| HIGH | lightrag/utils.py | 7387 | 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 | 7414 | Reject attribute values no graph backend can store. See ``graph_attribute_value_rejection`` for the rules and ` | STRING |
| HIGH | lightrag/pipeline.py | 677 | Pipeline for Processing Documents 1. Validate ids if provided or generate MD5 hash IDs and remove dupl | STRING |
| HIGH | lightrag/utils_graph.py | 61 | 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 | 307 | Complete a prompt using Gemini's API with Chain of Thought (COT) support. This function supports automatic int | STRING |
| HIGH | lightrag/llm/gemini.py | 716 | 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 | 789 | 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 | 365 | Retrieves all edges (relationships) for a particular node identified by its label. Args: source_nod | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 440 | Get edge properties between two nodes. Args: source_node_id: Label of the source node t | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 476 | 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 | 510 | Check if an edge exists between two nodes Args: source_node_id: Label of the source node | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 552 | 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 | 643 | 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 | 780 | Get edge properties between two nodes. Args: source_node_id: Label of the source node t | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 914 | Retrieves all edges (relationships) for a particular node identified by its label. Args: source_nod | STRING |
| HIGH | lightrag/api/auth.py | 183 | Validate JWT token Args: token: JWT token Returns: dict: Dictionary c | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 786 | Delete an entity and all its relationships from the knowledge graph. Args: request (Delete | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 822 | Delete a relationship between two entities from the knowledge graph. Args: request (Delete | STRING |
| HIGH | lightrag/api/routers/query_routes.py | 448 | Comprehensive RAG query endpoint with non-streaming response. Parameter "stream" is ignored. **Query M | STRING |
| HIGH | lightrag/api/routers/query_routes.py | 737 | Advanced RAG query endpoint with flexible streaming response. This endpoint provides the most flexible | STRING |
| HIGH | lightrag/api/routers/query_routes.py | 1310 | Advanced data retrieval endpoint for structured RAG analysis. This endpoint provides raw retrieval res | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 265 | Validate an uploaded filename and return it unchanged when safe. Uploaded filenames are document identifiers a | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 5200 | 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 | 5531 | 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 | 5663 | 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 | 6368 | Delete documents and all their associated data by their IDs using background processing. Deletes speci | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 6491 | Clear all cache data from the LLM response cache storage. This endpoint clears all cached LLM response | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 6525 | Get the processing status of documents by tracking ID. This endpoint retrieves all documents associate | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 6601 | Get documents with pagination support. This endpoint retrieves documents with pagination, filtering, a | STRING |
| HIGH | lightrag/evaluation/eval_rag_quality.py | 295 | Generate RAG response by calling LightRAG API. Args: question: The user query. | STRING |
| HIGH | lightrag/chunker/paragraph_semantic.py | 2060 | Paragraph Semantic Chunking — the ``chunking="P"`` strategy. Reads structured blocks from a ``.blocks.jsonl`` sidec | 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 | 298 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 309 | EMBEDDING_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 815 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 1114 | LLM_BINDING_API_KEY=your-api-key | CODE |
| HIGH | docs/ParserServiceDeployment.md | 48 | "api_key": "your_api_key", | CODE |
| HIGH | docs/ProgramingWithCore.md | 978 | export OPENAI_API_KEY=your-api-key | CODE |
| HIGH | docs/ProgramingWithCore.md | 992 | 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 | 126 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 207 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 224 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 337 | 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 | 298 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 309 | EMBEDDING_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 815 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 1114 | 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 | 126 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 207 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 224 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 337 | 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-compose.podman.yml | 1 | # Podman-compatible compose file for LightRAG | 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 | lightrag/lightrag.py | 1101 | # paragraphs together. ``default_chunker_config`` already | COMMENT |
| LOW | lightrag/lightrag.py | 1181 | self._ensure_addon_params_cache() | COMMENT |
| LOW | lightrag/lightrag.py | 1941 | "pipeline_status", workspace=self.workspace | COMMENT |
| LOW | lightrag/lightrag.py | 2101 | prior_truncation = existing_journal["prior_llm_truncation"] | COMMENT |
| LOW | lightrag/lightrag.py | 2221 | _operation_truncation_record(), | COMMENT |
| LOW | lightrag/lightrag.py | 2381 | # write PROCESSED (the commit record) last with the | COMMENT |
| LOW | lightrag/lightrag.py | 2461 | # slot nor wrote any data, so we must NOT flush/discard the SHARED | COMMENT |
| LOW | lightrag/lightrag.py | 2541 | try: | COMMENT |
| LOW | lightrag/lightrag.py | 2841 | # has_custom_chunk_journal flag (no per-row hydration). | COMMENT |
| LOW | lightrag/lightrag.py | 3701 | namespace = f"{workspace}:GraphDB" if workspace else "GraphDB" | COMMENT |
| LOW | lightrag/lightrag.py | 4801 | # purge from destroying the chunk rows and anchor rows that are the | COMMENT |
| LOW | lightrag/lightrag.py | 5921 | ) | COMMENT |
| LOW | lightrag/lightrag.py | 6101 | # Delegated to the shared primitive rather than reimplemented here | COMMENT |
| LOW | lightrag/lightrag.py | 6281 | finally: | 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 |
| LOW | lightrag/constants.py | 561 | # Enabled by default. It used to be ``0`` and to cover three ingestion routes | COMMENT |
| LOW | lightrag/constants.py | 581 | # Input ceilings for the model-facing request fields. Deliberately NOT env knobs: | COMMENT |
| LOW | lightrag/constants.py | 621 | # limit. Deliberately fixed process-wide constants rather than anything derived | COMMENT |
| LOW | lightrag/constants.py | 641 | # exclusive reset acknowledges it — so an operator hammering /reprocess_failed | COMMENT |
| LOW | lightrag/constants.py | 661 | # characters because that is what is being bounded (CJK is 3 bytes/char). | COMMENT |
| LOW | lightrag/constants.py | 681 | # DEFAULT_PROCESSING_PRIORITY so analysis and ingestion work share the EXTRACT | COMMENT |
| LOW | lightrag/constants.py | 721 | # Default llm and embedding timeout | COMMENT |
| LOW | lightrag/constants.py | 741 | # workers); other waiters back off exponentially up to the DEFERRED cap. | COMMENT |
| LOW | lightrag/constants.py | 781 | ROLLBACK_REPORT_SAMPLE_CAP = 32 | COMMENT |
| LOW | lightrag/operate.py | 2141 | if all_keywords | COMMENT |
| LOW | lightrag/operate.py | 2821 | if relation_chunks_storage is not None: | COMMENT |
| LOW | lightrag/operate.py | 2921 | # of distinct contributing sources. On reprocess/resume the same source | COMMENT |
| LOW | lightrag/operate.py | 4021 | chunk_key = chunk_key_dp[0] | COMMENT |
| LOW | lightrag/operate.py | 4401 | # every run of the same document. That permutation reaches persisted state | COMMENT |
| LOW | lightrag/utils.py | 2701 | # | COMMENT |
| LOW | lightrag/utils.py | 2961 | # --------------------------------------------------------------------------- | COMMENT |
| LOW | lightrag/utils.py | 3021 | # the event loop: ``write_json`` for the JSON KV / doc-status stores, | COMMENT |
| LOW | lightrag/utils.py | 3241 | # reliable token-to-character mapping; see ``TiktokenTokenizer`` below for | COMMENT |
| LOW | lightrag/utils.py | 3461 | COMMENT | |
| LOW | lightrag/utils.py | 3661 | COMMENT | |
| LOW | lightrag/utils.py | 5481 | if not text: | COMMENT |
| LOW | lightrag/utils.py | 6721 | COMMENT | |
| LOW | lightrag/utils.py | 7061 | COMMENT | |
| LOW | lightrag/utils.py | 7221 | return None | COMMENT |
| LOW | lightrag/pipeline.py | 161 | # §7.3) — never as a side effect of an unrelated upload or rescan. | COMMENT |
| 226 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker-build-push.sh | 38 | # Check if buildx builder exists, create if not | COMMENT |
| LOW | lightrag/lightrag.py | 4285 | # Check if query_result is None | COMMENT |
| LOW | lightrag/operate.py | 3042 | # Check if this is a placeholder record | COMMENT |
| LOW | lightrag/operate.py | 3952 | # Check if JSON structured output mode is enabled | COMMENT |
| LOW | lightrag/operate.py | 4395 | # Check if any task raised an exception and ensure all exceptions are retrieved. | COMMENT |
| LOW | lightrag/operate.py | 4762 | # Check if pre-defined keywords are already provided | COMMENT |
| LOW | lightrag/operate.py | 6349 | # Check if any relations still have chunks after deduplication | COMMENT |
| LOW | lightrag/utils.py | 305 | # Check if the resolved path is within the base directory | COMMENT |
| LOW | lightrag/utils.py | 474 | # Check if record has the required attributes for an access log | COMMENT |
| LOW | lightrag/utils.py | 651 | # Check if func is already an EmbeddingFunc instance and unwrap it | COMMENT |
| LOW | lightrag/utils.py | 674 | # Check if user provided embedding_dim parameter | COMMENT |
| LOW | lightrag/utils.py | 698 | # Check if underlying function supports max_token_size and inject if not provided | COMMENT |
| LOW | lightrag/utils.py | 711 | # Check if total elements can be evenly divided by embedding_dim | COMMENT |
| LOW | lightrag/utils.py | 1398 | # Check if task was cancelled before worker started | COMMENT |
| LOW | lightrag/utils.py | 4171 | # Check if we already have identical content cached | COMMENT |
| LOW | lightrag/utils.py | 5846 | # Check if there are still unused chunks | COMMENT |
| LOW | lightrag/utils.py | 6117 | # Check if results are in the new index-based format | COMMENT |
| LOW | lightrag/pipeline.py | 2895 | # Check if corresponding content exists in full_docs. Strict where | COMMENT |
| LOW | lightrag/pipeline.py | 2904 | # Check if this is a failed document that should be preserved | COMMENT |
| LOW | lightrag/storage_migrations.py | 34 | # Check if migration is needed: | COMMENT |
| LOW | lightrag/storage_migrations.py | 54 | # Check if full_entities and full_relations are empty | COMMENT |
| LOW | lightrag/utils_graph.py | 343 | # Check if the entity exists | COMMENT |
| LOW | lightrag/utils_graph.py | 444 | # Check if the relation exists | COMMENT |
| LOW | lightrag/utils_graph.py | 1266 | # Check if storage has existing data | COMMENT |
| LOW | lightrag/utils_graph.py | 1419 | # Check if the normalized entity already exists. | COMMENT |
| LOW | lightrag/utils_graph.py | 1564 | # Check if both entities exist | COMMENT |
| LOW | lightrag/utils_graph.py | 1573 | # Check if relation already exists | COMMENT |
| LOW | lightrag/base.py | 261 | # 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 | 262 | # 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 | 329 | # Check if legacy collection has workspace_id to determine migration strategy | COMMENT |
| LOW | lightrag/kg/qdrant_impl.py | 440 | # Check if we've reached the end | COMMENT |
| LOW | lightrag/kg/networkx_impl.py | 349 | # Check if data needs to be reloaded | COMMENT |
| LOW | lightrag/kg/networkx_impl.py | 734 | # Check if graph is truncated | COMMENT |
| LOW | lightrag/kg/networkx_impl.py | 745 | # Check if node exists | COMMENT |
| LOW⚡ | lightrag/kg/networkx_impl.py | 796 | # Add neighbors to the queue with their degrees | COMMENT |
| LOW⚡ | lightrag/kg/networkx_impl.py | 801 | # Check if there are unexplored neighbors (skipped due to depth limit) | COMMENT |
| LOW⚡ | lightrag/kg/networkx_impl.py | 809 | # Check if we've reached max_nodes | COMMENT |
| LOW⚡ | lightrag/kg/networkx_impl.py | 818 | # Check if graph is truncated - either due to max_nodes limit or depth limit | COMMENT |
| LOW | lightrag/kg/networkx_impl.py | 947 | # Check if storage was updated by another process | COMMENT |
| 80 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 | 1374 | # Create a NEW EmbeddingFunc instance with the wrapped func to avoid mutating the caller's object | COMMENT |
| MEDIUM | lightrag/lightrag.py | 4091 | # Create a copy of param to avoid modifying the original | COMMENT |
| MEDIUM | lightrag/operate.py | 6564 | # Create a preliminary system prompt with empty content_data to calculate overhead | COMMENT |
| MEDIUM | lightrag/utils.py | 6900 | # Create a list of (file_path, count, first_index) tuples | COMMENT |
| MEDIUM | lightrag/pipeline.py | 1351 | # 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 | 347 | # Create a session that will be used throughout the streaming process | COMMENT |
| MEDIUM | lightrag/llm/bedrock.py | 358 | # Define the generator function that will manage the client lifecycle | COMMENT |
| MEDIUM⚡ | lightrag/kg/mongo_impl.py | 3747 | # Create the improved search index (async, no waiting) | COMMENT |
| MEDIUM | lightrag/kg/mongo_impl.py | 489 | # Create a copy of v for $set operation, excluding create_time to avoid conflicts | COMMENT |
| MEDIUM | lightrag/kg/mongo_impl.py | 4149 | # Define the aggregation pipeline with the converted query vector | COMMENT |
| MEDIUM | lightrag/kg/postgres_impl.py | 2170 | # Define the field changes needed | COMMENT |
| MEDIUM | lightrag/kg/faiss_impl.py | 269 | # Create an empty Faiss index for inner product (useful for normalized vectors = cosine similarity). | COMMENT |
| MEDIUM | lightrag/kg/shared_storage.py | 62 | # Define a direct print function for critical logs that must be visible in all processes | COMMENT |
| MEDIUM | lightrag/kg/shared_storage.py | 1671 | # Create a shared list object for history_messages | COMMENT |
| MEDIUM | lightrag/kg/shared_storage.py | 3554 | # 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 | 1024 | # Create the EmbeddingFunc instance (now returns complete EmbeddingFunc with max_token_size) | COMMENT |
| MEDIUM | lightrag/api/routers/ollama_api.py | 210 | # Create an instance of the model | COMMENT |
| MEDIUM | lightrag/api/routers/query_routes.py | 547 | # Create a mapping from reference_id to chunk content | COMMENT |
| MEDIUM | lightrag/api/routers/document_routes.py | 4698 | # 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 | 6507 | ``{"chunk_ids": null}``), which mean UNKNOWN. Only in the UNKNOWN case may a | STRING |
| HIGH | lightrag/utils.py | 7277 | ``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 | 1513 | properties = lightrag_graph_nodes.properties || EXCLUDED.properties, | CODE |
| HIGH | lightrag/kg/mongo_impl.py | 1351 | # every doc with a real (non-null, existing) value. | COMMENT |
| HIGH | lightrag/kg/postgres_impl.py | 7231 | " $1::text || E'\\x01' ||" | CODE |
| HIGH | lightrag/kg/postgres_impl.py | 5936 | CURRENT_TIMESTAMP) sort FIRST and encode as ``[null, id]`` so the | STRING |
| HIGH | lightrag/api/lightrag_server.py | 139 | if (!data || data.type !== 'lightrag:set-docs-theme') return; | CODE |
| HIGH | lightrag/api/routers/graph_routes.py | 374 | "merge_error": null, | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 376 | "target_entity": null, | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 402 | "merge_error": null, | STRING |
| 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 |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightrag/api/routers/document_routes.py | 1149 | "metadata": {"author": "John Doe", "year": 2025}, | CODE |
| LOW | lightrag/api/routers/document_routes.py | 1213 | "metadata": {"author": "John Doe"}, | CODE |
| LOW | lightrag/api/routers/document_routes.py | 1255 | "metadata": {"author": "John Doe", "year": 2025}, | CODE |
| LOW | lightrag/api/routers/document_routes.py | 1373 | "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 | 3758 | 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 | 390 | "placeholder": "页面内搜索节点...", | CODE |
| LOW | lightrag_webui/src/locales/zh.json | 397 | "placeholder": "搜索节点名称...", | CODE |
| LOW | lightrag_webui/src/locales/zh.json | 436 | "placeholder": "输入查询内容 (支持模式前缀: /<Query Mode>)", | CODE |
| LOW | lightrag_webui/src/locales/zh.json | 493 | "placeholder": "请输入 API Key", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 390 | "placeholder": "ページ内のノードを検索...", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 397 | "placeholder": "ノード名を検索...", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 436 | "placeholder": "クエリを入力(プレフィックス対応: /<クエリモード>)", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 493 | "placeholder": "APIキーを入力", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 390 | "placeholder": "Knoten auf der Seite suchen...", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 397 | "placeholder": "Knotenname suchen...", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 436 | "placeholder": "Geben Sie Ihre Abfrage ein (Präfix unterstützt: /<Abfragemodus>)", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 493 | "placeholder": "API-Schlüssel eingeben", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 390 | "placeholder": "Поиск узлов на странице...", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 397 | "placeholder": "Поиск имени узла...", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 436 | "placeholder": "Введите ваш запрос (Поддержка префикса: /<Режим запроса>)", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 493 | "placeholder": "Введите ваш API ключ", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 390 | "placeholder": "Шукати вузли на сторінці...", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 397 | "placeholder": "Шукати ім'я вузла...", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 436 | "placeholder": "Введіть ваш запит (Підтримка префіксу: /<Режим запиту>)", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 493 | "placeholder": "Введіть ваш API ключ", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 390 | "placeholder": "Search nodes in page...", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 397 | "placeholder": "Search node name...", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 436 | "placeholder": "Enter your query (Support prefix: /<Query Mode>)", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 493 | "placeholder": "Enter your API key", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 390 | "placeholder": "Rechercher des nœuds dans la page...", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 397 | "placeholder": "Rechercher le nom du nœud...", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 436 | "placeholder": "Tapez votre requête (Préfixe de requête : /<Query Mode>)", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 493 | "placeholder": "Entrez votre clé API", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 390 | "placeholder": "페이지 내 노드 검색...", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 397 | "placeholder": "노드 이름 검색...", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 436 | "placeholder": "질문을 입력하세요 (접두사 지원: /<쿼리 모드>)", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 493 | "placeholder": "API 키 입력", | CODE |
| LOW | lightrag_webui/src/locales/vi.json | 390 | "placeholder": "Tìm kiếm nút trong trang...", | CODE |
| LOW | lightrag_webui/src/locales/vi.json | 397 | "placeholder": "Tìm kiếm tên nút...", | CODE |
| LOW | lightrag_webui/src/locales/vi.json | 436 | "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 | 493 | "placeholder": "Nhập khóa API của bạn", | CODE |
| LOW | lightrag_webui/src/locales/zh_TW.json | 390 | "placeholder": "頁面內搜尋節點...", | CODE |
| LOW | lightrag_webui/src/locales/zh_TW.json | 397 | "placeholder": "搜尋節點名稱...", | CODE |
| 6 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | lightrag/lightrag.py | 1373 | # Step 2: Apply priority wrapper decorator to EmbeddingFunc's inner func | COMMENT |
| LOW | lightrag/lightrag.py | 1355 | # Step 1: Capture embedding_func and max_token_size before applying rate_limit decorator | COMMENT |
| LOW⚡ | lightrag/operate.py | 6138 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 6144 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW⚡ | lightrag/operate.py | 6433 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 6439 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW | lightrag/operate.py | 6027 | # Step 1: Collect all text chunks for each entity | COMMENT |
| LOW | lightrag/operate.py | 6054 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned entities) | COMMENT |
| LOW | lightrag/operate.py | 6071 | # Step 3: Sort chunks for each entity by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 6084 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW | lightrag/operate.py | 6278 | # Step 1: Collect all text chunks for each relationship | COMMENT |
| LOW | lightrag/operate.py | 6313 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned relationships) | COMMENT |
| LOW | lightrag/operate.py | 6362 | # Step 3: Sort chunks for each relationship by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 6377 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW⚡ | lightrag/utils.py | 6465 | # Step 1: Remove chunks that are no longer needed | COMMENT |
| LOW⚡ | lightrag/utils.py | 6471 | # Step 2: Append genuine additions only (preserving order from new_chunk_ids). | COMMENT |
| LOW⚡ | lightrag/api/lightrag_server.py | 787 | # Step 3: Create optimized embedding function (calls underlying function directly) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 660 | # Step 1: Import provider function and extract default attributes | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 767 | # Step 2: Apply priority (user config > provider default) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 983 | # 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 |
|---|---|---|---|---|
| LOW⚡ | lightrag/lightrag.py | 1373 | # Step 2: Apply priority wrapper decorator to EmbeddingFunc's inner func | COMMENT |
| LOW | lightrag/lightrag.py | 1355 | # Step 1: Capture embedding_func and max_token_size before applying rate_limit decorator | COMMENT |
| LOW⚡ | lightrag/operate.py | 6138 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 6144 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW⚡ | lightrag/operate.py | 6433 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 6439 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW | lightrag/operate.py | 6027 | # Step 1: Collect all text chunks for each entity | COMMENT |
| LOW | lightrag/operate.py | 6054 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned entities) | COMMENT |
| LOW | lightrag/operate.py | 6071 | # Step 3: Sort chunks for each entity by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 6084 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW | lightrag/operate.py | 6278 | # Step 1: Collect all text chunks for each relationship | COMMENT |
| LOW | lightrag/operate.py | 6313 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned relationships) | COMMENT |
| LOW | lightrag/operate.py | 6362 | # Step 3: Sort chunks for each relationship by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 6377 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW⚡ | lightrag/utils.py | 6465 | # Step 1: Remove chunks that are no longer needed | COMMENT |
| LOW⚡ | lightrag/utils.py | 6471 | # Step 2: Append genuine additions only (preserving order from new_chunk_ids). | COMMENT |
| LOW⚡ | lightrag/api/lightrag_server.py | 787 | # Step 3: Create optimized embedding function (calls underlying function directly) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 660 | # Step 1: Import provider function and extract default attributes | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 767 | # Step 2: Apply priority (user config > provider default) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 983 | # 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 |
|---|---|---|---|---|
| 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 | 3485 | """Try Atlas Search using compound query for comprehensive matching.""" | STRING |
| MEDIUM | lightrag/kg/shared_storage.py | 1295 | """Release all locks with comprehensive error handling, protected from cancellation""" | STRING |
| MEDIUM | lightrag/api/routers/document_routes.py | 6575 | # 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 | lightrag_webui/src/features/RetrievalView.tsx | 366 | // Use the new robust COT parsing function | COMMENT |
| MEDIUM | lightrag_webui/src/features/RetrievalView.tsx | 917 | // Handle copying message content with robust clipboard support | 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 | 1028 | 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 | 85 | logger = logging.getLogger(__name__) | CODE |
| LOW | lightrag/multimodal_context.py | 1060 | __all__ = [ | CODE |
| LOW | lightrag/chunk_schema.py | 376 | __all__ = [ | CODE |
| LOW | lightrag/prompt_multimodal.py | 352 | __all__ = [ | STRING |
| LOW | lightrag/llm/gemini.py | 839 | __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 | 228 | __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 | 1069 | __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 | 251 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/docling/__init__.py | 33 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/mineru/ir_builder.py | 785 | __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 | 68 | __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 |
|---|---|---|---|---|
| LOW | lightrag/llm_roles.py | 276 | CODE | |
| LOW | lightrag/llm_roles.py | 360 | CODE | |
| LOW | lightrag/llm_roles.py | 395 | CODE | |
| LOW | lightrag/operate.py | 2745 | CODE | |
| LOW | lightrag/operate.py | 3477 | CODE | |
| LOW | lightrag/utils.py | 5051 | CODE | |
| LOW | lightrag/pipeline.py | 664 | CODE | |
| LOW | lightrag/llm/gemini.py | 288 | CODE | |
| LOW | lightrag/llm/gemini.py | 704 | 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 | 201 | CODE | |
| LOW | lightrag/llm/bedrock.py | 187 | CODE | |
| LOW | lightrag/llm/bedrock.py | 531 | CODE | |
| LOW | lightrag/llm/hf.py | 176 | 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 | 5063 | CODE | |
| LOW | lightrag/kg/scan_job_store.py | 258 | CODE | |
| LOW | lightrag/chunker/semantic_vector.py | 197 | 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 |