[EMNLP2025] "LightRAG: Simple and Fast Retrieval-Augmented Generation"
4290 matches across 17 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | lightrag/pipeline.py | 204 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 206 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 2410 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 2412 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 3026 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 3028 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 1162 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 1164 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 1432 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 1434 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 1731 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 1733 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 2591 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 2593 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 3703 | # ============================================================ |
| MEDIUM | lightrag/pipeline.py | 3705 | # ============================================================ |
| MEDIUM | lightrag/multimodal_context.py | 87 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 91 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 131 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 134 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 187 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 189 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 266 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 268 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 462 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 464 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 686 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/multimodal_context.py | 688 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/utils_pipeline.py | 565 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/utils_pipeline.py | 567 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/utils_pipeline.py | 592 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/utils_pipeline.py | 594 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/utils_pipeline.py | 440 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/utils_pipeline.py | 442 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/utils_pipeline.py | 490 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/utils_pipeline.py | 492 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/utils_pipeline.py | 630 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/utils_pipeline.py | 632 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/llm/binding_options.py | 421 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 423 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 433 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 587 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 589 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 596 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 633 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 635 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 641 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 663 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 665 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 675 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 32 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 34 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 68 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 538 | # ============================================================================= |
| MEDIUM | lightrag/llm/binding_options.py | 540 | # ============================================================================= |
| MEDIUM | lightrag/parser/routing.py | 67 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/parser/routing.py | 69 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/parser/routing.py | 166 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/parser/routing.py | 178 | # --------------------------------------------------------------------------- |
| MEDIUM | lightrag/parser/external/docling/ir_builder.py | 97 | # ------------------------------------------------------------------ |
| 457 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | reproduce/Step_3_openai_compatible.py | 57 | def run_queries_and_save_to_json( |
| LOW | reproduce/Step_3.py | 26 | def run_queries_and_save_to_json( |
| LOW | lightrag/rerank.py | 22 | def chunk_documents_for_rerank( |
| LOW | lightrag/addon_params.py | 30 | def _emit_deprecated_addon_warnings(params: Mapping[str, Any]) -> None: |
| LOW | lightrag/llm_roles.py | 125 | def register_role_llm_builder( |
| LOW | lightrag/llm_roles.py | 157 | def _get_effective_role_llm_kwargs(self, role: str) -> dict[str, Any]: |
| LOW | lightrag/llm_roles.py | 165 | def _get_effective_role_llm_timeout(self, role: str) -> int: |
| LOW | lightrag/llm_roles.py | 169 | def _get_effective_role_llm_max_async(self, role: str) -> int: |
| LOW | lightrag/llm_roles.py | 206 | def _rebuild_single_role_llm_func(self, role: str) -> None: |
| LOW | lightrag/llm_roles.py | 222 | def _schedule_retired_llm_queue_cleanup( |
| LOW | lightrag/llm_roles.py | 250 | def _finalize_retired_llm_queue_cleanup(self, task: asyncio.Task) -> None: |
| LOW | lightrag/llm_roles.py | 259 | async def wait_for_retired_llm_queues(self) -> None: |
| LOW | lightrag/llm_roles.py | 270 | def _apply_llm_role_config_update( |
| LOW | lightrag/llm_roles.py | 564 | async def get_embedding_queue_status(self) -> dict[str, Any]: |
| LOW | lightrag/lightrag.py | 654 | def _set_runtime_addon_params(self, addon_params: Mapping[str, Any] | None) -> None: |
| LOW | lightrag/lightrag.py | 658 | def _apply_chunk_size_overlay(self) -> None: |
| LOW | lightrag/lightrag.py | 780 | def _refresh_addon_params_cache(self) -> None: |
| LOW | lightrag/lightrag.py | 800 | def _ensure_addon_params_cache(self) -> None: |
| LOW | lightrag/lightrag.py | 833 | def _build_role_llm_cache_identity( |
| LOW | lightrag/lightrag.py | 1438 | async def _process_extract_entities( |
| LOW | lightrag/lightrag.py | 2208 | async def _update_delete_retry_state( |
| LOW | lightrag/lightrag.py | 2253 | async def _get_existing_llm_cache_ids(self, cache_ids: list[str]) -> list[str]: |
| LOW | lightrag/operate.py | 84 | def _get_relationship_vdb_timeout_seconds(global_config: dict[str, Any]) -> float: |
| LOW | lightrag/operate.py | 101 | def _format_relation_edge_label(edge_key: tuple[str, str] | list[str]) -> str: |
| LOW | lightrag/operate.py | 109 | def _truncate_entity_identifier( |
| LOW | lightrag/operate.py | 187 | async def _handle_entity_relation_summary( |
| LOW | lightrag/operate.py | 410 | def _handle_single_entity_extraction( |
| LOW | lightrag/operate.py | 497 | def _handle_single_relationship_extraction( |
| LOW | lightrag/operate.py | 584 | def _normalize_text_extraction_record_attributes( |
| LOW | lightrag/operate.py | 606 | def _looks_like_json_extraction_result(result: str) -> bool: |
| LOW | lightrag/operate.py | 622 | async def _process_json_extraction_result( |
| LOW | lightrag/operate.py | 809 | async def rebuild_knowledge_from_chunks( |
| LOW | lightrag/operate.py | 993 | async def _locked_rebuild_relationship(src, tgt, chunk_ids): |
| LOW | lightrag/operate.py | 1096 | async def _get_cached_extraction_results( |
| LOW | lightrag/operate.py | 1186 | async def _process_extraction_result( |
| LOW | lightrag/operate.py | 1317 | async def _rebuild_from_extraction_result( |
| LOW | lightrag/operate.py | 1618 | async def _rebuild_single_relationship( |
| LOW | lightrag/operate.py | 2900 | async def _locked_process_entity_name(entity_name, entities): |
| LOW | lightrag/operate.py | 3938 | def _strip_markdown_code_fence(text: str) -> str: |
| LOW | lightrag/operate.py | 5016 | async def _find_most_related_edges_from_entities( |
| LOW | lightrag/operate.py | 5072 | async def _find_related_text_unit_from_entities( |
| LOW | lightrag/operate.py | 5290 | async def _find_most_related_entities_from_relationships( |
| LOW | lightrag/operate.py | 5323 | async def _find_related_text_unit_from_relations( |
| LOW | lightrag/utils.py | 97 | def _patch_ascii_colors_console_handler() -> None: |
| LOW | lightrag/utils.py | 137 | async def safe_vdb_operation_with_exception( |
| LOW | lightrag/utils.py | 703 | def serialize_llm_cache_identity(identity: Any) -> str: |
| LOW | lightrag/utils.py | 708 | def _validate_cached_response_format(response_format: Any | None) -> None: |
| LOW | lightrag/utils.py | 734 | def get_unique_filename_in_parsed(target_dir: Path, original_name: str) -> str: |
| LOW | lightrag/utils.py | 856 | def priority_limit_async_func_call( |
| LOW | lightrag/utils.py | 1383 | def wrap_embedding_func_with_attrs(**kwargs): |
| LOW | lightrag/utils.py | 1481 | def _sanitize_string_for_json(text: str) -> str: |
| LOW | lightrag/utils.py | 1721 | def pack_user_ass_to_openai_messages(*args: str): |
| LOW | lightrag/utils.py | 1728 | def split_string_by_multi_markers(content: str, markers: list[str]) -> list[str]: |
| LOW | lightrag/utils.py | 1741 | def truncate_list_by_token_size( |
| LOW | lightrag/utils.py | 1780 | def split_text_units_for_hard_fallback(text: str) -> list[str]: |
| LOW | lightrag/utils.py | 1796 | def split_text_by_token_limit( |
| LOW | lightrag/utils.py | 1850 | def _normalized_child_offsets( |
| LOW | lightrag/utils.py | 1938 | def enforce_chunk_token_limit_before_embedding( |
| LOW | lightrag/utils.py | 2798 | def sanitize_and_normalize_extracted_text( |
| LOW | lightrag/utils.py | 2951 | def sanitize_text_for_encoding(text: str, replacement_char: str = "") -> str: |
| 2063 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | reproduce/Step_1_openai_compatible.py | 50 | except Exception as e: |
| LOW | reproduce/Step_0.py | 41 | except Exception as e: |
| MEDIUM | reproduce/Step_0.py | 42 | print(f"An error occurred while processing file {filename}: {e}") |
| LOW | reproduce/Step_0.py | 54 | except Exception as e: |
| MEDIUM | reproduce/Step_0.py | 55 | print(f"An error occurred while saving to the file {output_filename}: {e}") |
| LOW | reproduce/Step_1.py | 19 | except Exception as e: |
| LOW | reproduce/Step_3_openai_compatible.py | 53 | except Exception as e: |
| MEDIUM | reproduce/Step_3_openai_compatible.py | 49 | def process_query(query_text, rag_instance, query_param): |
| LOW | reproduce/Step_3.py | 22 | except Exception as e: |
| MEDIUM | reproduce/Step_3.py | 18 | def process_query(query_text, rag_instance, query_param): |
| LOW | lightrag/rerank.py | 58 | except Exception as e: |
| LOW | lightrag/rerank.py | 544 | except Exception as e: |
| LOW | lightrag/rerank.py | 559 | except Exception as e: |
| LOW | lightrag/rerank.py | 574 | except Exception as e: |
| LOW | lightrag/llm_roles.py | 256 | except Exception as e: |
| LOW | lightrag/llm_roles.py | 342 | except Exception: |
| LOW | lightrag/lightrag.py | 12 | except Exception: # pragma: no cover - optional dependency |
| LOW | lightrag/lightrag.py | 1210 | except Exception as e: |
| LOW | lightrag/lightrag.py | 1451 | except Exception as e: |
| LOW | lightrag/lightrag.py | 1756 | except Exception as e: |
| LOW | lightrag/lightrag.py | 2167 | except Exception as e: |
| LOW | lightrag/lightrag.py | 2268 | except Exception as verification_error: |
| LOW | lightrag/lightrag.py | 2302 | except Exception as e: |
| LOW | lightrag/lightrag.py | 2482 | except Exception as e: |
| LOW | lightrag/lightrag.py | 2637 | except Exception as e: |
| LOW | lightrag/lightrag.py | 2654 | except Exception as e: |
| LOW | lightrag/lightrag.py | 2687 | except Exception as e: |
| LOW | lightrag/lightrag.py | 2750 | except Exception as e: |
| LOW | lightrag/lightrag.py | 2757 | except Exception as e: |
| LOW | lightrag/lightrag.py | 2778 | except Exception as e: |
| LOW | lightrag/lightrag.py | 2786 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3000 | except Exception as cache_err: |
| LOW | lightrag/lightrag.py | 3013 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3072 | except Exception as cache_collect_error: |
| LOW | lightrag/lightrag.py | 3091 | except Exception as status_write_error: |
| LOW | lightrag/lightrag.py | 3171 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3349 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3370 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3408 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3505 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3513 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3536 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3574 | except Exception as cache_delete_error: |
| LOW | lightrag/lightrag.py | 3591 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3606 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3619 | except Exception as e: |
| LOW | lightrag/lightrag.py | 3638 | except Exception as status_update_error: |
| LOW | lightrag/lightrag.py | 3662 | except Exception as persistence_error: |
| LOW | lightrag/operate.py | 490 | except Exception as e: |
| LOW | lightrag/operate.py | 577 | except Exception as e: |
| LOW | lightrag/operate.py | 648 | except Exception as e: |
| LOW | lightrag/operate.py | 720 | except Exception as e: |
| LOW | lightrag/operate.py | 800 | except Exception as e: |
| LOW | lightrag/operate.py | 943 | except Exception as e: |
| LOW | lightrag/operate.py | 984 | except Exception as e: |
| LOW | lightrag/operate.py | 1022 | except Exception as e: |
| LOW | lightrag/operate.py | 1067 | except Exception as e: |
| LOW | lightrag/operate.py | 1441 | except Exception as e: |
| LOW | lightrag/operate.py | 1847 | except Exception as e: |
| LOW | lightrag/operate.py | 1876 | except Exception as e: |
| 613 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| HIGH | lightrag/kg/qdrant_impl.py | 0 | buffered vector upsert waiting for embedding and/or bulk flush. |
| HIGH | lightrag/kg/mongo_impl.py | 0 | buffered vector upsert waiting for embedding and/or bulk flush. |
| HIGH | lightrag/kg/opensearch_impl.py | 0 | buffered vector upsert waiting for embedding and/or bulk flush. |
| HIGH | lightrag/kg/milvus_impl.py | 0 | buffered vector upsert waiting for embedding and/or bulk flush. |
| HIGH | lightrag/kg/qdrant_impl.py | 0 | buffer an entity vector delete by computing its hash id. |
| HIGH | lightrag/kg/mongo_impl.py | 0 | buffer an entity vector delete by computing its hash id. |
| HIGH | lightrag/kg/opensearch_impl.py | 0 | buffer an entity vector delete by computing its hash id. |
| HIGH | lightrag/kg/milvus_impl.py | 0 | buffer an entity vector delete by computing its hash id. |
| HIGH | lightrag/kg/qdrant_impl.py | 0 | get multiple vector data by their ids (read-your-writes), preserving order. |
| HIGH | lightrag/kg/mongo_impl.py | 0 | get multiple vector data by their ids (read-your-writes), preserving order. |
| HIGH | lightrag/kg/milvus_impl.py | 0 | get multiple vector data by their ids (read-your-writes), preserving order. |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| HIGH | lightrag/kg/mongo_impl.py | 0 | drop the storage by removing all documents in the collection. returns: dict[str, str]: status of the operation with keys |
| HIGH | lightrag/kg/mongo_impl.py | 0 | drop the storage by removing all documents in the collection. returns: dict[str, str]: status of the operation with keys |
| HIGH | lightrag/kg/mongo_impl.py | 0 | drop the storage by removing all documents in the collection. returns: dict[str, str]: status of the operation with keys |
| 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 ' |
| 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 ' |
| 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 ' |
| 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 ' |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| HIGH | tests/setup/test_misc.py | 0 | set -euo pipefail source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" reset_state load_existing_env_if_pr |
| HIGH | tests/setup/test_misc.py | 0 | set -euo pipefail source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" reset_state load_existing_env_if_pr |
| HIGH | tests/setup/test_misc.py | 0 | set -euo pipefail source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" reset_state load_existing_env_if_pr |
| HIGH | tests/setup/test_misc.py | 0 | set -euo pipefail source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" reset_state load_existing_env_if_pr |
| HIGH | tests/setup/test_misc.py | 0 | set -euo pipefail source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" reset_state load_existing_env_if_pr |
| HIGH | tests/setup/test_misc.py | 0 | set -euo pipefail source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" reset_state load_existing_env_if_pr |
| HIGH | tests/setup/test_misc.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| HIGH | tests/setup/test_misc.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| HIGH | tests/setup/test_misc.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| HIGH | tests/setup/test_misc.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| HIGH | tests/setup/test_misc.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| HIGH | tests/setup/test_misc.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| HIGH | tests/setup/test_misc.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| HIGH | tests/setup/test_misc.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| HIGH | tests/setup/test_misc.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| HIGH | tests/setup/test_misc.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| HIGH | tests/setup/test_validate.py | 0 | source "{repo_root}/scripts/setup/setup.sh" repo_root="{tmp_path}" security_check_env_file |
| 46 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | docker-build-push.sh | 38 | # Check if buildx builder exists, create if not |
| LOW | lightrag/lightrag.py | 2136 | # Check if query_result is None |
| LOW | lightrag/operate.py | 1055 | # Check if any task raised an exception and ensure all exceptions are retrieved |
| LOW | lightrag/operate.py | 2453 | # Check if this is a placeholder record |
| LOW | lightrag/operate.py | 3251 | # Check if JSON structured output mode is enabled |
| LOW | lightrag/operate.py | 3610 | # Check if any task raised an exception and ensure all exceptions are retrieved |
| LOW | lightrag/operate.py | 3878 | # Check if pre-defined keywords are already provided |
| LOW | lightrag/operate.py | 5416 | # Check if any relations still have chunks after deduplication |
| LOW | lightrag/utils.py | 373 | # Check if record has the required attributes for an access log |
| LOW | lightrag/utils.py | 550 | # Check if func is already an EmbeddingFunc instance and unwrap it |
| LOW | lightrag/utils.py | 573 | # Check if user provided embedding_dim parameter |
| LOW | lightrag/utils.py | 597 | # Check if underlying function supports max_token_size and inject if not provided |
| LOW | lightrag/utils.py | 610 | # Check if total elements can be evenly divided by embedding_dim |
| LOW | lightrag/utils.py | 953 | # Check if task was cancelled before worker started |
| LOW | lightrag/utils.py | 2089 | # Check if we already have identical content cached |
| LOW | lightrag/utils.py | 3078 | # Check if there are still unused chunks |
| LOW | lightrag/utils.py | 3326 | # Check if results are in the new index-based format |
| LOW | lightrag/pipeline.py | 1253 | # Check if corresponding content exists in full_docs |
| LOW | lightrag/pipeline.py | 1256 | # Check if this is a failed document that should be preserved |
| LOW | lightrag/pipeline.py | 1329 | # Check if document has corresponding content in full_docs (consistency check) |
| LOW | lightrag/pipeline.py | 1332 | # Check if document is in interrupted status |
| LOW | lightrag/storage_migrations.py | 34 | # Check if migration is needed: |
| LOW | lightrag/storage_migrations.py | 54 | # Check if full_entities and full_relations are empty |
| LOW | lightrag/utils_graph.py | 97 | # Check if the entity exists |
| LOW | lightrag/utils_graph.py | 198 | # Check if the relation exists |
| LOW | lightrag/utils_graph.py | 849 | # Check if storage has existing data |
| LOW | lightrag/utils_graph.py | 963 | # Check if entity already exists |
| LOW | lightrag/utils_graph.py | 1082 | # Check if both entities exist |
| LOW | lightrag/utils_graph.py | 1091 | # Check if relation already exists |
| LOW | lightrag/base.py | 237 | # Check if model_name exists (model_name is optional in EmbeddingFunc) |
| LOW | lightrag/tools/clean_llm_query_cache.py | 205 | # Check if config.ini has configuration |
| LOW | lightrag/tools/clean_llm_query_cache.py | 969 | # Check if choice is valid |
| LOW | lightrag/tools/clean_llm_query_cache.py | 1067 | # Check if user cancelled |
| LOW | lightrag/tools/clean_llm_query_cache.py | 1129 | # Check if there are any records to delete |
| LOW | lightrag/tools/download_cache.py | 39 | # Check if TIKTOKEN_CACHE_DIR is already set in environment |
| LOW | lightrag/tools/check_initialization.py | 101 | # Print results |
| LOW | lightrag/tools/prepare_qdrant_legacy_data.py | 548 | # Print result |
| LOW | lightrag/tools/migrate_llm_cache.py | 211 | # Check if storage requires configuration |
| LOW | lightrag/tools/migrate_llm_cache.py | 218 | # Check if has environment variables |
| LOW | lightrag/tools/migrate_llm_cache.py | 223 | # Check if has config.ini configuration |
| LOW | lightrag/tools/migrate_llm_cache.py | 190 | # Check if config.ini has configuration |
| LOW | lightrag/tools/migrate_llm_cache.py | 1060 | # Check if choice is valid |
| LOW | lightrag/tools/migrate_llm_cache.py | 1429 | # Check if user cancelled (setup_storage returns None for all fields) |
| LOW | lightrag/tools/migrate_llm_cache.py | 1433 | # Check if there are at least 2 storage types available |
| LOW | lightrag/tools/lightrag_visualizer/graph_visualizer.py | 920 | # Check if node is behind camera |
| LOW | lightrag/llm/jina.py | 28 | # Check if the error response is HTML (common for 502, 503, etc.) |
| LOW | lightrag/llm/gemini.py | 258 | # Check if this part is thought content using the 'thought' attribute |
| LOW | lightrag/llm/binding_options.py | 213 | # Check if this is a dataclass and use dataclass fields |
| LOW | lightrag/llm/openai.py | 516 | # Check if this chunk has usage information (final chunk) |
| LOW | lightrag/llm/openai.py | 523 | # Check if choices exists and is not empty |
| LOW | lightrag/llm/openai.py | 531 | # Check if delta exists |
| LOW | lightrag/llm/openai.py | 47 | # Check if required Langfuse environment variables are set |
| LOW | lightrag/llm/openai.py | 714 | # Check if we should include reasoning content |
| LOW | lightrag/parser/docx/numbering_resolver.py | 199 | # Check if this style has numPr |
| LOW | lightrag/parser/docx/parse_document.py | 601 | # Check if this block can be absorbed (table_chunk_role constraints) |
| LOW | lightrag/parser/docx/parse_document.py | 617 | # Check if combined size doesn't exceed MAX |
| LOW | lightrag/parser/docx/parse_document.py | 892 | # Check if this block starts with a split table chunk (has _chunk_heading metadata) |
| LOW | lightrag/parser/docx/parse_document.py | 1579 | # Check if this is a heading using the new function |
| LOW | lightrag/parser/docx/parse_document.py | 1761 | # Check if table needs splitting (disabled in fixlevel mode) |
| LOW | lightrag/parser/docx/utils.py | 361 | # Check if it mentions billing which indicates permanent quota issue |
| 106 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | reproduce/Step_0.py | 7 | |
| LOW | reproduce/Step_3_openai_compatible.py | 57 | |
| LOW | reproduce/Step_3.py | 26 | |
| LOW | lightrag/rerank.py | 22 | |
| LOW | lightrag/rerank.py | 116 | |
| LOW | lightrag/rerank.py | 182 | |
| LOW | lightrag/table_markup.py | 94 | |
| LOW | lightrag/llm_roles.py | 270 | |
| LOW | lightrag/lightrag.py | 848 | |
| LOW | lightrag/lightrag.py | 1182 | |
| LOW | lightrag/lightrag.py | 1496 | |
| LOW | lightrag/lightrag.py | 2043 | |
| LOW | lightrag/lightrag.py | 2383 | |
| LOW | lightrag/lightrag.py | 2794 | |
| LOW | lightrag/operate.py | 187 | |
| LOW | lightrag/operate.py | 809 | |
| LOW | lightrag/operate.py | 1186 | |
| LOW | lightrag/operate.py | 1371 | |
| LOW | lightrag/operate.py | 1618 | |
| LOW | lightrag/operate.py | 1901 | |
| LOW | lightrag/operate.py | 2230 | |
| LOW | lightrag/operate.py | 2815 | |
| LOW | lightrag/operate.py | 3221 | |
| LOW | lightrag/operate.py | 3951 | |
| LOW | lightrag/operate.py | 4169 | |
| LOW | lightrag/operate.py | 5072 | |
| LOW | lightrag/operate.py | 5323 | |
| LOW | lightrag/operate.py | 3309 | |
| LOW | lightrag/utils.py | 137 | |
| LOW | lightrag/utils.py | 856 | |
| LOW | lightrag/utils.py | 1796 | |
| LOW | lightrag/utils.py | 1938 | |
| LOW | lightrag/utils.py | 2180 | |
| LOW | lightrag/utils.py | 3093 | |
| LOW | lightrag/utils.py | 3273 | |
| LOW | lightrag/utils.py | 3357 | |
| LOW | lightrag/utils.py | 3778 | |
| LOW | lightrag/utils.py | 887 | |
| LOW | lightrag/utils.py | 924 | |
| LOW | lightrag/utils.py | 1016 | |
| LOW | lightrag/pipeline.py | 208 | |
| LOW | lightrag/pipeline.py | 990 | |
| LOW | lightrag/pipeline.py | 1436 | |
| LOW | lightrag/pipeline.py | 1608 | |
| LOW | lightrag/pipeline.py | 1735 | |
| LOW | lightrag/pipeline.py | 3164 | |
| LOW | lightrag/pipeline.py | 3707 | |
| LOW | lightrag/pipeline.py | 4592 | |
| LOW | lightrag/pipeline.py | 439 | |
| LOW | lightrag/storage_migrations.py | 30 | |
| LOW | lightrag/storage_migrations.py | 100 | |
| LOW | lightrag/storage_migrations.py | 197 | |
| LOW | lightrag/multimodal_context.py | 192 | |
| LOW | lightrag/multimodal_context.py | 467 | |
| LOW | lightrag/multimodal_context.py | 591 | |
| LOW | lightrag/utils_graph.py | 262 | |
| LOW | lightrag/utils_graph.py | 528 | |
| LOW | lightrag/utils_graph.py | 737 | |
| LOW | lightrag/utils_graph.py | 1198 | |
| LOW | lightrag/utils_graph.py | 1626 | |
| 247 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | lightrag/utils.py | 1246 | Execute function with enhanced priority-based concurrency control and timeout handling Args: |
| HIGH | lightrag/pipeline.py | 221 | Pipeline for Processing Documents 1. Validate ids if provided or generate MD5 hash IDs and remove dupl |
| HIGH | lightrag/tools/clean_llm_query_cache.py | 250 | Initialize storage instance with fallback to config.ini and defaults Args: storage_name: Storage im |
| HIGH | lightrag/tools/migrate_llm_cache.py | 263 | Initialize storage instance with fallback to config.ini and defaults Args: storage_name: Storage im |
| 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 |
| HIGH | lightrag/llm/voyageai.py | 61 | Generate embeddings for a list of texts using VoyageAI's API. Args: texts: List of texts to embed. |
| HIGH | lightrag/llm/gemini.py | 302 | Complete a prompt using Gemini's API with Chain of Thought (COT) support. This function supports automatic int |
| HIGH | lightrag/llm/gemini.py | 624 | Generate embeddings for a list of texts using Gemini's API. This function uses Google's Gemini embedding model to g |
| HIGH | lightrag/llm/openai.py | 259 | Complete a prompt using OpenAI's API with caching support and Chain of Thought (COT) integration. This function sup |
| HIGH | lightrag/llm/openai.py | 912 | Generate embeddings for a list of texts using OpenAI's API with automatic text truncation. This function supports b |
| HIGH | lightrag/parser/docx/utils.py | 94 | Create Gemini client for AI Studio or Vertex AI. Supports two modes: - AI Studio (default): Uses GOOGLE_AP |
| HIGH | lightrag/parser/docx/utils.py | 171 | Create OpenAI client with optional custom base URL. Environment variables: - OPENAI_API_KEY: Required API |
| HIGH | lightrag/kg/postgres_impl.py | 519 | Execute a database operation with automatic retry for transient failures. Args: operation: |
| HIGH | lightrag/kg/memgraph_impl.py | 134 | Check if a node exists in the graph. Args: node_id: The ID of the node to check. |
| HIGH | lightrag/kg/memgraph_impl.py | 174 | Check if an edge exists between two nodes in the graph. Args: source_node_id: The ID of th |
| HIGH | lightrag/kg/memgraph_impl.py | 222 | Get node by its label identifier, return only node properties Args: node_id: The node label to look |
| HIGH | lightrag/kg/memgraph_impl.py | 277 | Get the degree (number of relationships) of a node with the given label. If multiple nodes have the same label, |
| HIGH | lightrag/kg/memgraph_impl.py | 364 | Retrieves all edges (relationships) for a particular node identified by its label. Args: source_nod |
| HIGH | lightrag/kg/memgraph_impl.py | 430 | Get edge properties between two nodes. Args: source_node_id: Label of the source node t |
| HIGH | lightrag/kg/neo4j_impl.py | 440 | Check if a node with the given label exists in the database Args: node_id: Label of the no |
| HIGH | lightrag/kg/neo4j_impl.py | 474 | Check if an edge exists between two nodes Args: source_node_id: Label of the source node |
| HIGH | lightrag/kg/neo4j_impl.py | 516 | Get node by its label identifier, return only node properties Args: node_id: The node label to look |
| HIGH | lightrag/kg/neo4j_impl.py | 607 | Get the degree (number of relationships) of a node with the given label. If multiple nodes have the same label, |
| HIGH | lightrag/kg/neo4j_impl.py | 744 | Get edge properties between two nodes. Args: source_node_id: Label of the source node t |
| HIGH | lightrag/kg/neo4j_impl.py | 881 | Retrieves all edges (relationships) for a particular node identified by its label. Args: source_nod |
| HIGH | lightrag/api/auth.py | 121 | Validate JWT token Args: token: JWT token Returns: dict: Dictionary c |
| HIGH | lightrag/api/routers/query_routes.py | 330 | Comprehensive RAG query endpoint with non-streaming response. Parameter "stream" is ignored. This endp |
| HIGH | lightrag/api/routers/query_routes.py | 540 | Advanced RAG query endpoint with flexible streaming response. This endpoint provides the most flexible |
| HIGH | lightrag/api/routers/query_routes.py | 1043 | Advanced data retrieval endpoint for structured RAG analysis. This endpoint provides raw retrieval res |
| HIGH | lightrag/api/routers/document_routes.py | 113 | Sanitize uploaded filename to prevent Path Traversal attacks. Args: filename: The original filename fr |
| HIGH | lightrag/api/routers/document_routes.py | 1576 | Extract PDF content using pypdf (synchronous). Args: file_bytes: PDF file content as bytes password |
| HIGH | lightrag/api/routers/document_routes.py | 3094 | Upload a file to the input directory and index it. This API endpoint accepts a file through an HTTP PO |
| HIGH | lightrag/api/routers/document_routes.py | 3336 | Insert text into the RAG system. This endpoint allows you to insert text data into the RAG system for |
| HIGH | lightrag/api/routers/document_routes.py | 3440 | Insert multiple texts into the RAG system. This endpoint allows you to insert multiple text entries in |
| HIGH | lightrag/api/routers/document_routes.py | 3990 | Delete documents and all their associated data by their IDs using background processing. Deletes speci |
| HIGH | lightrag/api/routers/document_routes.py | 4080 | Clear all cache data from the LLM response cache storage. This endpoint clears all cached LLM response |
| HIGH | lightrag/api/routers/document_routes.py | 4114 | Delete an entity and all its relationships from the knowledge graph. Args: request (Delete |
| HIGH | lightrag/api/routers/document_routes.py | 4150 | Delete a relationship between two entities from the knowledge graph. Args: request (Delete |
| HIGH | lightrag/api/routers/document_routes.py | 4189 | Get the processing status of documents by tracking ID. This endpoint retrieves all documents associate |
| HIGH | lightrag/api/routers/document_routes.py | 4265 | Get documents with pagination support. This endpoint retrieves documents with pagination, filtering, a |
| HIGH | lightrag/evaluation/eval_rag_quality.py | 295 | Generate RAG response by calling LightRAG API. Args: question: The user query. |
| HIGH | lightrag/chunker/paragraph_semantic.py | 1275 | Paragraph Semantic Chunking — the ``chunking="P"`` strategy. Reads structured blocks emitted by the docx native par |
| HIGH | tests/api/test_lightrag_ollama_chat.py | 147 | Send an HTTP request with retry mechanism Args: url: Request URL data: Request data stream: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/setup/test_misc.py | 297 | "LLM_BINDING_API_KEY=your_api_key", |
| HIGH | tests/setup/test_misc.py | 302 | "EMBEDDING_BINDING_API_KEY=your_api_key", |
| HIGH | docs/LightRAG-API-Server.md | 118 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server.md | 124 | # EMBEDDING_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server.md | 135 | # LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server.md | 143 | # EMBEDDING_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server.md | 265 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server.md | 276 | EMBEDDING_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server.md | 759 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server.md | 996 | LLM_BINDING_API_KEY=your-api-key |
| HIGH | docs/ProgramingWithCore.md | 852 | export OPENAI_API_KEY=your-api-key |
| HIGH | docs/ProgramingWithCore.md | 866 | OPENAI_API_KEY=your-api-key \ |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 26 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 122 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 203 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 220 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 333 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server-zh.md | 118 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server-zh.md | 124 | # EMBEDDING_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server-zh.md | 135 | # LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server-zh.md | 143 | # EMBEDDING_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server-zh.md | 265 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server-zh.md | 276 | EMBEDDING_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server-zh.md | 759 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/LightRAG-API-Server-zh.md | 996 | LLM_BINDING_API_KEY=your-api-key |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 26 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 122 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 203 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 220 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 333 | LLM_BINDING_API_KEY=your_api_key |
| HIGH | examples/lightrag_gemini_postgres_demo.py | 28 | GEMINI_API_KEY=your-api-key |
| HIGH | examples/lightrag_gemini_demo.py | 37 | "Please set it with: export GEMINI_API_KEY='your-api-key'" |
| HIGH | examples/lightrag_openai_opensearch_graph_demo.py | 23 | OPENAI_API_KEY=your-api-key |
| HIGH | …s/unofficial-sample/lightrag_llamaindex_direct_demo.py | 29 | OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY", "your-api-key-here") |
| HIGH | examples/unofficial-sample/lightrag_cloudflare_demo.py | 20 | cloudflare_api_key = "YOUR_API_KEY" |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | reproduce/Step_1_openai_compatible.py | 77 | # Initialize RAG instance |
| MEDIUM | reproduce/Step_1.py | 42 | # Initialize RAG instance |
| MEDIUM | lightrag/lightrag.py | 964 | # Create a NEW EmbeddingFunc instance with the wrapped func to avoid mutating the caller's object |
| MEDIUM | lightrag/lightrag.py | 1951 | # Create a copy of param to avoid modifying the original |
| MEDIUM | lightrag/operate.py | 5619 | # Create a preliminary system prompt with empty content_data to calculate overhead |
| MEDIUM | lightrag/utils.py | 3980 | # Create a list of (file_path, count, first_index) tuples |
| MEDIUM | lightrag/pipeline.py | 790 | # Create a new record with unique ID for this duplicate attempt |
| MEDIUM | lightrag/tools/migrate_llm_cache.py | 701 | # Create a snapshot of matching items while holding the lock |
| MEDIUM | lightrag/llm/openai.py | 173 | # Create a merged config dict with precedence: explicit params > client_configs |
| MEDIUM | lightrag/llm/openai.py | 205 | # Create a merged config dict with precedence: explicit params > client_configs > defaults |
| MEDIUM | lightrag/llm/openai.py | 375 | # Create the OpenAI client (supports both OpenAI and Azure) |
| MEDIUM | lightrag/llm/openai.py | 996 | # Create the OpenAI client (supports both OpenAI and Azure) |
| MEDIUM | lightrag/llm/bedrock.py | 320 | # Create a session that will be used throughout the streaming process |
| MEDIUM | lightrag/llm/bedrock.py | 330 | # Define the generator function that will manage the client lifecycle |
| MEDIUM | lightrag/kg/mongo_impl.py | 2409 | # Create the improved search index (async, no waiting) |
| MEDIUM | lightrag/kg/mongo_impl.py | 363 | # Create a copy of v for $set operation, excluding create_time to avoid conflicts |
| MEDIUM | lightrag/kg/mongo_impl.py | 2738 | # Define the aggregation pipeline with the converted query vector |
| MEDIUM | lightrag/kg/postgres_impl.py | 1431 | # Define the field changes needed |
| MEDIUM | lightrag/kg/faiss_impl.py | 233 | # Create an empty Faiss index for inner product (useful for normalized vectors = cosine similarity). |
| MEDIUM | lightrag/kg/shared_storage.py | 17 | # Define a direct print function for critical logs that must be visible in all processes |
| MEDIUM | lightrag/kg/shared_storage.py | 1286 | # Create a shared list object for history_messages |
| MEDIUM | lightrag/kg/shared_storage.py | 1358 | # Create a simple mutable object to store boolean value for compatibility with mutiprocess |
| MEDIUM | lightrag/kg/json_kv_impl.py | 253 | # Create a copy to avoid modifying the original data |
| MEDIUM | lightrag/kg/json_kv_impl.py | 268 | # Create a copy to avoid modifying the original data |
| MEDIUM | lightrag/api/run_with_gunicorn.py | 118 | # Define a custom application class that loads our config |
| MEDIUM | lightrag/api/run_with_gunicorn.py | 248 | # Create the application |
| MEDIUM | lightrag/api/lightrag_server.py | 1834 | # Create the EmbeddingFunc instance (now returns complete EmbeddingFunc with max_token_size) |
| MEDIUM | lightrag/api/routers/ollama_api.py | 149 | # Create an instance of the model |
| MEDIUM | lightrag/api/routers/query_routes.py | 431 | # Create a mapping from reference_id to chunk content |
| MEDIUM | lightrag/api/routers/query_routes.py | 685 | # Create a mapping from reference_id to chunk content |
| MEDIUM | tests/kg/test_graph_storage.py | 108 | # Initialize the storage instance |
| MEDIUM | tests/kg/test_graph_storage.py | 1475 | # Initialize storage instance |
| MEDIUM | tests/kg/postgres_impl/test_postgres_index_name.py | 84 | # Create a table name that results in exactly 63 bytes |
| MEDIUM | tests/api/auth/test_token_auto_renewal.py | 16 | # Create a simple token renewal cache for testing |
| MEDIUM | tests/api/auth/test_token_auto_renewal.py | 323 | # Create a mock JWT payload |
| MEDIUM | tests/chunker/test_rerank_chunking.py | 39 | # Create a very long document that exceeds character limit |
| MEDIUM | examples/graph_visual_with_html.py | 15 | # Create a Pyvis network |
| MEDIUM | examples/lightrag_openai_compatible_demo.py | 150 | # Initialize RAG instance |
| MEDIUM | examples/lightrag_openai_mongodb_graph_demo.py | 72 | # Initialize RAG instance |
| MEDIUM | examples/lightrag_openai_demo.py | 119 | # Initialize RAG instance |
| MEDIUM | examples/lightrag_ollama_demo.py | 139 | # Initialize RAG instance |
| MEDIUM | examples/graph_visual_with_neo4j.py | 159 | # Create a Neo4j driver |
| MEDIUM | …mples/unofficial-sample/lightrag_embedding_prefixes.py | 156 | # Initialize RAG instance |
| MEDIUM | …/unofficial-sample/lightrag_llamaindex_litellm_demo.py | 103 | # Initialize RAG instance |
| MEDIUM | …cial-sample/lightrag_openai_neo4j_milvus_redis_demo.py | 73 | # Initialize RAG instance |
| MEDIUM | …s/unofficial-sample/lightrag_llamaindex_direct_demo.py | 101 | # Initialize RAG instance |
| MEDIUM | …ficial-sample/lightrag_llamaindex_litellm_opik_demo.py | 114 | # Initialize RAG instance |
| MEDIUM | examples/unofficial-sample/lightrag_cloudflare_demo.py | 251 | # Initialize RAG instance |
| MEDIUM | examples/unofficial-sample/lightrag_lmdeploy_demo.py | 69 | # Initialize RAG instance |
| MEDIUM | examples/unofficial-sample/lightrag_nvidia_demo.py | 123 | # Initialize RAG instance |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | lightrag/rerank.py | 1 | |
| LOW | lightrag/file_atomic.py | 29 | |
| LOW | lightrag/addon_params.py | 15 | |
| LOW | lightrag/table_markup.py | 17 | |
| LOW | lightrag/llm_roles.py | 11 | |
| LOW | lightrag/lightrag.py | 1 | |
| LOW | lightrag/lightrag.py | 140 | |
| LOW | lightrag/__init__.py | 3 | |
| LOW | lightrag/types.py | 1 | |
| LOW | lightrag/operate.py | 1 | |
| LOW | lightrag/utils.py | 1 | |
| LOW | lightrag/utils.py | 301 | |
| LOW | lightrag/utils.py | 301 | |
| LOW | lightrag/utils.py | 301 | |
| LOW | lightrag/pipeline.py | 12 | |
| LOW | lightrag/storage_migrations.py | 13 | |
| LOW | lightrag/exceptions.py | 1 | |
| LOW | lightrag/multimodal_context.py | 64 | |
| LOW | lightrag/utils_graph.py | 1 | |
| LOW | lightrag/prompt.py | 1 | |
| LOW | lightrag/utils_pipeline.py | 10 | |
| LOW | lightrag/namespace.py | 1 | |
| LOW | lightrag/chunk_schema.py | 24 | |
| LOW | lightrag/base.py | 1 | |
| LOW | lightrag/prompt_multimodal.py | 31 | |
| LOW | lightrag/llm/gemini.py | 10 | |
| LOW | lightrag/llm/_vision_utils.py | 20 | |
| LOW | lightrag/llm/azure_openai.py | 12 | |
| LOW | lightrag/llm/azure_openai.py | 12 | |
| LOW | lightrag/llm/azure_openai.py | 12 | |
| LOW | lightrag/parser/cli.py | 17 | |
| LOW | lightrag/parser/_markdown.py | 10 | |
| LOW | lightrag/parser/routing.py | 1 | |
| LOW | lightrag/parser/debug.py | 16 | |
| LOW | lightrag/parser/external/_manifest.py | 18 | |
| LOW | lightrag/parser/external/_zip.py | 10 | |
| LOW | lightrag/parser/external/_common.py | 11 | |
| LOW | lightrag/parser/external/__init__.py | 16 | |
| LOW | lightrag/parser/external/__init__.py | 16 | |
| LOW | lightrag/parser/external/__init__.py | 16 | |
| LOW | lightrag/parser/external/__init__.py | 16 | |
| LOW | lightrag/parser/external/__init__.py | 16 | |
| LOW | lightrag/parser/external/__init__.py | 16 | |
| LOW | lightrag/parser/external/__init__.py | 24 | |
| LOW | lightrag/parser/external/__init__.py | 24 | |
| LOW | lightrag/parser/external/__init__.py | 24 | |
| LOW | lightrag/parser/external/__init__.py | 24 | |
| LOW | lightrag/parser/external/__init__.py | 24 | |
| LOW | lightrag/parser/external/__init__.py | 24 | |
| LOW | lightrag/parser/external/__init__.py | 24 | |
| LOW | lightrag/parser/external/__init__.py | 33 | |
| LOW | lightrag/parser/external/docling/ir_builder.py | 43 | |
| LOW | lightrag/parser/external/docling/manifest.py | 11 | |
| LOW | lightrag/parser/external/docling/client.py | 20 | |
| LOW | lightrag/parser/external/docling/cache.py | 30 | |
| LOW | lightrag/parser/external/docling/__init__.py | 8 | |
| LOW | lightrag/parser/external/docling/__init__.py | 23 | |
| LOW | lightrag/parser/external/docling/__init__.py | 26 | |
| LOW | lightrag/parser/external/docling/__init__.py | 29 | |
| LOW | lightrag/parser/external/mineru/ir_builder.py | 43 | |
| 80 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | lightrag/lightrag.py | 945 | # Step 1: Capture embedding_func and max_token_size before applying rate_limit decorator |
| LOW | lightrag/lightrag.py | 963 | # Step 2: Apply priority wrapper decorator to EmbeddingFunc's inner func |
| LOW | lightrag/operate.py | 5094 | # Step 1: Collect all text chunks for each entity |
| LOW | lightrag/operate.py | 5121 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned entities) |
| LOW | lightrag/operate.py | 5138 | # Step 3: Sort chunks for each entity by occurrence count (higher count = higher priority) |
| LOW | lightrag/operate.py | 5151 | # Step 4: Apply the selected chunk selection algorithm |
| LOW | lightrag/operate.py | 5205 | # Step 5: Batch retrieve chunk data |
| LOW | lightrag/operate.py | 5211 | # Step 6: Build result chunks with valid data and update chunk tracking |
| LOW | lightrag/operate.py | 5345 | # Step 1: Collect all text chunks for each relationship |
| LOW | lightrag/operate.py | 5380 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned relationships) |
| LOW | lightrag/operate.py | 5429 | # Step 3: Sort chunks for each relationship by occurrence count (higher count = higher priority) |
| LOW | lightrag/operate.py | 5444 | # Step 4: Apply the selected chunk selection algorithm |
| LOW | lightrag/operate.py | 5500 | # Step 5: Batch retrieve chunk data |
| LOW | lightrag/operate.py | 5506 | # Step 6: Build result chunks with valid data and update chunk tracking |
| LOW | lightrag/utils.py | 3572 | # Step 1: Remove chunks that are no longer needed |
| LOW | lightrag/utils.py | 3577 | # Step 2: Add new chunks (preserving order from new_chunk_ids) |
| LOW | lightrag/kg/milvus_impl.py | 1089 | # Step 3: Rename origin collection (keep for safety) |
| LOW | lightrag/kg/milvus_impl.py | 1109 | # Step 4: Rename temporary collection to original name |
| LOW | lightrag/kg/milvus_impl.py | 1004 | # Step 1: Create temporary collection with new schema |
| LOW | lightrag/kg/milvus_impl.py | 1025 | # Step 2: Copy data using query_iterator (solves query window limitation) |
| LOW | lightrag/api/lightrag_server.py | 1503 | # Step 1: Import provider function and extract default attributes |
| LOW | lightrag/api/lightrag_server.py | 1556 | # Step 2: Apply priority (user config > provider default) |
| LOW | lightrag/api/lightrag_server.py | 1576 | # Step 3: Create optimized embedding function (calls underlying function directly) |
| LOW | lightrag/api/lightrag_server.py | 1771 | # Step 4: Wrap in EmbeddingFunc and return |
| LOW | lightrag/chunker/paragraph_semantic.py | 849 | # Step 1: expand each oversized table paragraph into row-bounded |
| LOW | lightrag/chunker/paragraph_semantic.py | 873 | # Step 2: greedy-pack pieces into chunks ≤ target_max. A piece |
| LOW | tests/kg/postgres_impl/test_postgres_migration.py | 662 | # Step 1: Simulate workspace_a initialization (Case 3 - only legacy exists) |
| 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) |
| LOW | examples/lightrag_ag2_multiagent_demo.py | 267 | # Step 1: Set up LightRAG (async, runs on the background loop) |
| LOW | examples/lightrag_ag2_multiagent_demo.py | 270 | # Step 2: Create AG2 agents with LightRAG tools |
| LOW | examples/lightrag_ag2_multiagent_demo.py | 273 | # Step 3: Ask a complex question |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | docker-compose.podman.yml | 1 | # Podman-compatible compose file for LightRAG |
| LOW | lightrag/lightrag.py | 721 | if "chunk_overlap_token_size" not in sub: |
| LOW | lightrag/lightrag.py | 741 | chunker_cfg["paragraph_semantic"].setdefault( |
| LOW | lightrag/lightrag.py | 1581 | # Relationship storage is undirected, so keep only the last update |
| LOW | lightrag/lightrag.py | 4081 | # `addon_params` is declared as an InitVar on the dataclass so it can still be |
| LOW | lightrag/constants.py | 101 | ) |
| LOW | lightrag/constants.py | 281 | # because both engines are resource-intensive (GPU/CPU + memory) and tend to |
| LOW | lightrag/utils.py | 3801 | |
| LOW | lightrag/pipeline.py | 281 | # processing loop because (a) full_docs is upserted before |
| LOW | lightrag/pipeline.py | 661 | # this, two enqueues for the same content (e.g. /upload during |
| LOW | lightrag/pipeline.py | 1041 | "Another process is already processing the document queue. Request queued." |
| LOW | lightrag/pipeline.py | 1481 | # Stamp parsing_start_time on the in-memory status_doc so |
| LOW | lightrag/pipeline.py | 1661 | # Mirror analyze-stage outcome as a 3-way decision so the |
| LOW | lightrag/pipeline.py | 1841 | # follows the standardized file-chunker contract |
| LOW | lightrag/pipeline.py | 2061 | # Explicit selector in process_options: reflect |
| LOW | lightrag/pipeline.py | 2121 | "Applied hard fallback split before embedding for " |
| LOW | lightrag/utils_pipeline.py | 181 | # tables missing ``w14:paraId``) that admins should be able to surface |
| LOW | lightrag/utils_pipeline.py | 201 | # operators can distinguish "analyze actually completed" from "analyze |
| LOW | lightrag/utils_pipeline.py | 701 | # over all chunk_results. It has been moved into |
| LOW | lightrag/llm/binding_options.py | 41 | # - Handles default values and type information for each parameter |
| LOW | lightrag/llm/binding_options.py | 421 | # ============================================================================= |
| LOW | lightrag/llm/binding_options.py | 661 | |
| LOW | lightrag/llm/openai.py | 461 | # A "could not parse JSON body" 400 is transient (corrupted/truncated |
| LOW | lightrag/parser/routing.py | 161 | skip_kg=PROCESS_OPTION_SKIP_KG in chars, |
| LOW | lightrag/parser/external/docling/cache.py | 41 | |
| LOW | lightrag/kg/mongo_impl.py | 1081 | |
| LOW | lightrag/kg/mongo_impl.py | 1101 | # "target_node_id" : "ProductX", |
| LOW | lightrag/kg/postgres_impl.py | 5081 | |
| LOW | lightrag/kg/postgres_impl.py | 6041 | target_node_id (str): Label of the target node (used as identifier) |
| LOW | lightrag/kg/faiss_impl.py | 241 | # Minimal pending area for deferred embedding: custom-id -> _PendingFaissDoc. |
| LOW | lightrag/kg/shared_storage.py | 1301 | # Exclusive subset of ``scanning``: only True during the |
| LOW | lightrag/kg/milvus_impl.py | 1361 | self._validate_embedding_func() |
| LOW | lightrag/kg/milvus_impl.py | 1381 | # "hnsw_m": 32, |
| LOW | lightrag/api/routers/document_routes.py | 2581 | except Exception as move_error: |
| LOW | lightrag/api/routers/document_routes.py | 2681 | # True for the rest of the task lifecycle (releases in |
| LOW | lightrag/api/routers/document_routes.py | 3161 | Raises: |
| LOW | lightrag/chunker/paragraph_semantic.py | 821 | candidates.append({"index": idx, "text": text, "position": cumulative}) |
| LOW | tests/chunker/test_chunking.py | 661 | split_by_character=None, |
| LOW | tests/chunker/test_chunking.py | 1021 | chunk_overlap_token_size=2, |
| LOW | …ts/chunker/test_paragraph_semantic_split_long_block.py | 61 | # recursive-character splitting so ``target_max`` is honored without |
| LOW | docs/LightRAG-API-Server.md | 1001 | VLM_PROCESS_ENABLE=false |
| LOW | docs/LightRAG-API-Server.md | 1021 | # EMBEDDING_DOCUMENT_PREFIX="search_document: " |
| LOW | docs/RoleSpecificLLMConfiguration-zh.md | 241 | # have a valid OpenAI configuration. |
| LOW | docs/LightRAG-API-Server-zh.md | 1001 | VLM_PROCESS_ENABLE=false |
| LOW | docs/LightRAG-API-Server-zh.md | 1021 | # EMBEDDING_DOCUMENT_PREFIX="search_document: " |
| LOW | docs/RoleSpecificLLMConfiguration.md | 241 | # have a valid OpenAI configuration. |
| LOW | examples/milvus_kwargs_configuration_demo.py | 21 | # os.environ["MILVUS_USER"] = "root" |
| LOW | examples/milvus_kwargs_configuration_demo.py | 41 | "index_type": "HNSW", |
| LOW | k8s-deploy/databases/neo4j/values.yaml | 1 | # Version |
| LOW | k8s-deploy/databases/neo4j/values.yaml | 21 | # description: Memory, the unit is Gi. |
| LOW | k8s-deploy/databases/postgresql/values.yaml | 1 | ## description: service version. |
| LOW | k8s-deploy/databases/postgresql/values.yaml | 21 | ## default: 0.5 |
| LOW | k8s-deploy/databases/redis/values.yaml | 1 | ## description: Cluster version. |
| LOW | k8s-deploy/databases/redis/values.yaml | 21 | |
| LOW | k8s-deploy/databases/mongodb/values.yaml | 1 | ## description: Cluster version. |
| LOW | k8s-deploy/databases/qdrant/values.yaml | 1 | ## description: The version of Qdrant. |
| LOW | k8s-deploy/databases/elasticsearch/values.yaml | 1 | ## description: The version of ElasticSearch. |
| LOW | k8s-deploy/lightrag/values.yaml | 1 | replicaCount: 1 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | lightrag/pipeline.py | 2722 | # ``positions: [{"type": "paraid", "range": null}]``. |
| HIGH | lightrag/kg/postgres_impl.py | 6082 | " $1::text || E'\\x01' ||" |
| HIGH | lightrag/api/lightrag_server.py | 123 | if (!data || data.type !== 'lightrag:set-docs-theme') return; |
| HIGH | lightrag/api/routers/graph_routes.py | 308 | "merge_error": null, |
| HIGH | lightrag/api/routers/graph_routes.py | 310 | "target_entity": null, |
| HIGH | lightrag/api/routers/graph_routes.py | 336 | "merge_error": null, |
| HIGH | …sts/kg/postgres_impl/test_postgres_cypher_injection.py | 135 | "formula": "x < 5 && y > 3", |
| HIGH | …sts/kg/postgres_impl/test_postgres_cypher_injection.py | 146 | assert '`formula`: "x < 5 && y > 3"' in call["sql"] |
| HIGH | …s/kg/postgres_impl/test_postgres_upsert_edge_cypher.py | 171 | assert "$1::text || E'\\x01' ||" in lock_sql |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | lightrag/pipeline.py | 1038 | # Another process is busy, just set request flag and return |
| MEDIUM | lightrag/tools/clean_llm_query_cache.py | 870 | """Print comprehensive cleanup report |
| MEDIUM | lightrag/tools/migrate_llm_cache.py | 1517 | # Print comprehensive migration report |
| MEDIUM | lightrag/tools/migrate_llm_cache.py | 1349 | """Print comprehensive migration report |
| MEDIUM | lightrag/kg/mongo_impl.py | 2153 | """Try Atlas Search using compound query for comprehensive matching.""" |
| MEDIUM | lightrag/kg/shared_storage.py | 984 | """Release all locks with comprehensive error handling, protected from cancellation""" |
| MEDIUM | lightrag/api/routers/document_routes.py | 4239 | # Handle both DocStatus enum and string cases for robust deserialization |
| MEDIUM | tests/api/routes/test_aquery_data_endpoint.py | 493 | "mode": "mix", # Use mixed mode to get the most comprehensive results |
| MEDIUM | tests/chunker/test_chunking_raw_lightrag_parity.py | 56 | # Shared fixtures (mirrors the harness used by test_pipeline_release_closure) |
| MEDIUM | lightrag_webui/src/features/RetrievalTesting.tsx | 269 | // Use the new robust COT parsing function |
| MEDIUM | lightrag_webui/src/features/RetrievalTesting.tsx | 635 | // Handle copying message content with robust clipboard support |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | lightrag/api/routers/document_routes.py | 680 | "metadata": {"author": "John Doe", "year": 2025}, |
| LOW | lightrag/api/routers/document_routes.py | 744 | "metadata": {"author": "John Doe"}, |
| LOW | lightrag/api/routers/document_routes.py | 786 | "metadata": {"author": "John Doe", "year": 2025}, |
| LOW | lightrag/api/routers/document_routes.py | 904 | "metadata": {"author": "John Doe", "year": 2025}, |
| LOW | tests/kg/json_impl/test_write_json_optimization.py | 30 | "name": "John Doe", |
| LOW | tests/api/routes/test_description_api_validation.py | 228 | ["entity", "Alice", "Acme Corp", "founded", "Alice founded Acme Corp."], |
| LOW | tests/api/routes/test_description_api_validation.py | 240 | assert relation["tgt_id"] == "Acme Corp" |
| LOW | tests/api/routes/test_description_api_validation.py | 261 | ["entity", "Alice", "Acme Corp", "founded", " "], |
| LOW | tests/api/routes/test_description_api_validation.py | 276 | ["edge", "Alice", "Acme Corp", "founded", "Alice founded Acme Corp."], |
| LOW | tests/extraction/test_entity_extraction_stability.py | 420 | assert set(nodes) == {"Alice", "Acme Corp"} |
| LOW | tests/extraction/test_entity_extraction_stability.py | 421 | assert ("Alice", "Acme Corp") in edges |
| LOW | tests/extraction/test_entity_extraction_stability.py | 612 | assert set(entities.keys()) == {"Alice", "Acme Corp"} |
| LOW | tests/extraction/test_entity_extraction_stability.py | 616 | assert relation_data["tgt_id"] == "Acme Corp" |
| LOW | tests/extraction/test_entity_extraction_stability.py | 184 | "name": "Acme Corp", |
| LOW | tests/extraction/test_entity_extraction_stability.py | 192 | "target": "Acme Corp", |
| LOW | tests/extraction/test_entity_extraction_stability.py | 570 | assert next(iter(relationships.keys())) == ("Alice", "Acme Corp") |
| LOW | tests/extraction/test_entity_extraction_stability.py | 593 | assert relation_data["tgt_id"] == "Acme Corp" |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | examples/unofficial-sample/lightrag_cloudflare_demo.py | 32 | WORKING_DIR = "../dickens" # you can change output as desired |
| MEDIUM | examples/unofficial-sample/lightrag_nvidia_demo.py | 112 | # so you can adjust to be able to fit the NVIDIA model (future work) |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | docker-compose.podman.yml | 3 | # Usage: |
| LOW | lightrag/llm/binding_options.py | 671 | # Usage: |