[EMNLP2025] "LightRAG: Simple and Fast Retrieval-Augmented Generation"
This report presents the forensic synthetic code analysis of HKUDS/LightRAG, a Python project with 37,652 GitHub stars. SynthScan v2.0 examined 276,773 lines of code across 711 source files, recording 6382 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 32.6 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 6382 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 |
|---|---|---|---|---|
| MEDIUM⚡ | lightrag/pipeline.py | 234 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 236 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 1155 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 1157 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 2841 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 2843 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 3088 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 3090 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 1582 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 1584 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 2116 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 2118 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 3351 | # ============================================================ | COMMENT |
| MEDIUM | lightrag/pipeline.py | 3353 | # ============================================================ | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 87 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/multimodal_context.py | 91 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 131 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 134 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 187 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 189 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 266 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 268 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 460 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 462 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 684 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/multimodal_context.py | 686 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 758 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 760 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 785 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightrag/utils_pipeline.py | 787 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 633 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 635 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 683 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 685 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 823 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/utils_pipeline.py | 825 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightrag/tools/rebuild_vdb.py | 578 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | lightrag/tools/rebuild_vdb.py | 580 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | lightrag/tools/rebuild_vdb.py | 764 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | lightrag/tools/rebuild_vdb.py | 766 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | lightrag/tools/rebuild_vdb.py | 884 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | lightrag/tools/rebuild_vdb.py | 886 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 421 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 423 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 433 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 587 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 589 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 596 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 633 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 635 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 641 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 663 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 665 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | lightrag/llm/binding_options.py | 675 | # ============================================================================= | COMMENT |
| MEDIUM | lightrag/llm/binding_options.py | 32 | # ============================================================================= | COMMENT |
| MEDIUM | lightrag/llm/binding_options.py | 34 | # ============================================================================= | COMMENT |
| MEDIUM | lightrag/llm/binding_options.py | 68 | # ============================================================================= | COMMENT |
| MEDIUM | lightrag/llm/binding_options.py | 538 | # ============================================================================= | COMMENT |
| MEDIUM | lightrag/llm/binding_options.py | 540 | # ============================================================================= | COMMENT |
| MEDIUM | lightrag/parser/param_schema.py | 54 | # --------------------------------------------------------------------------- | COMMENT |
| 815 more matches not shown… | ||||
| 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 | 22 | def chunk_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 | 125 | def register_role_llm_builder( | CODE |
| LOW⚡ | lightrag/llm_roles.py | 157 | def _get_effective_role_llm_kwargs(self, role: str) -> dict[str, Any]: | CODE |
| LOW⚡ | lightrag/llm_roles.py | 165 | def _get_effective_role_llm_timeout(self, role: str) -> int: | CODE |
| LOW⚡ | lightrag/llm_roles.py | 169 | def _get_effective_role_llm_max_async(self, role: str) -> int: | CODE |
| LOW | lightrag/llm_roles.py | 207 | def _rebuild_single_role_llm_func(self, role: str) -> None: | CODE |
| LOW | lightrag/llm_roles.py | 223 | def _schedule_retired_llm_queue_cleanup( | CODE |
| LOW⚡ | lightrag/llm_roles.py | 251 | def _finalize_retired_llm_queue_cleanup(self, task: asyncio.Task) -> None: | CODE |
| LOW⚡ | lightrag/llm_roles.py | 260 | async def wait_for_retired_llm_queues(self) -> None: | CODE |
| LOW | lightrag/llm_roles.py | 271 | def _apply_llm_role_config_update( | CODE |
| LOW | lightrag/llm_roles.py | 571 | async def get_embedding_queue_status(self) -> dict[str, Any]: | CODE |
| LOW⚡ | lightrag/lightrag.py | 771 | def _set_runtime_addon_params(self, addon_params: Mapping[str, Any] | None) -> None: | CODE |
| LOW⚡ | lightrag/lightrag.py | 775 | def _apply_chunk_size_overlay(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 897 | def _refresh_addon_params_cache(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 917 | def _ensure_addon_params_cache(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 950 | def _build_role_llm_cache_identity( | CODE |
| LOW | lightrag/lightrag.py | 1321 | def _get_parse_native_executor(self) -> ThreadPoolExecutor: | CODE |
| LOW | lightrag/lightrag.py | 1338 | def _shutdown_parser_executor(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 1617 | async def _process_extract_entities( | CODE |
| LOW | lightrag/lightrag.py | 1659 | async def _discard_pending_index_ops( | CODE |
| LOW | lightrag/lightrag.py | 1791 | async def _insert_done_with_cleanup(self) -> None: | CODE |
| LOW | lightrag/lightrag.py | 2558 | async def _update_delete_retry_state( | CODE |
| LOW | lightrag/lightrag.py | 2603 | async def _get_existing_llm_cache_ids(self, cache_ids: list[str]) -> list[str]: | CODE |
| LOW | lightrag/operate.py | 95 | def _get_relationship_vdb_timeout_seconds(global_config: dict[str, Any]) -> float: | CODE |
| LOW | lightrag/operate.py | 112 | def _format_relation_edge_label(edge_key: tuple[str, str] | list[str]) -> str: | CODE |
| LOW | lightrag/operate.py | 120 | def _truncate_entity_identifier( | CODE |
| LOW | lightrag/operate.py | 160 | def _truncate_section_context( | CODE |
| LOW | lightrag/operate.py | 265 | async def _handle_entity_relation_summary( | CODE |
| LOW | lightrag/operate.py | 510 | def _handle_single_entity_extraction( | CODE |
| LOW | lightrag/operate.py | 597 | def _handle_single_relationship_extraction( | CODE |
| LOW | lightrag/operate.py | 684 | def _normalize_text_extraction_record_attributes( | CODE |
| LOW | lightrag/operate.py | 706 | def _looks_like_json_extraction_result(result: str) -> bool: | CODE |
| LOW | lightrag/operate.py | 722 | async def _process_json_extraction_result( | CODE |
| LOW | lightrag/operate.py | 916 | async def rebuild_knowledge_from_chunks( | CODE |
| LOW | lightrag/operate.py | 1100 | async def _locked_rebuild_relationship(src, tgt, chunk_ids): | CODE |
| LOW | lightrag/operate.py | 1203 | async def _get_cached_extraction_results( | CODE |
| LOW | lightrag/operate.py | 1293 | async def _process_extraction_result( | CODE |
| LOW | lightrag/operate.py | 1424 | async def _rebuild_from_extraction_result( | CODE |
| LOW | lightrag/operate.py | 1725 | async def _rebuild_single_relationship( | CODE |
| LOW | lightrag/operate.py | 3007 | async def _locked_process_entity_name(entity_name, entities): | CODE |
| LOW | lightrag/operate.py | 4090 | def _strip_markdown_code_fence(text: str) -> str: | CODE |
| LOW | lightrag/operate.py | 5212 | async def _find_most_related_edges_from_entities( | CODE |
| LOW | lightrag/operate.py | 5268 | async def _find_related_text_unit_from_entities( | CODE |
| LOW | lightrag/operate.py | 5486 | async def _find_most_related_entities_from_relationships( | CODE |
| LOW | lightrag/operate.py | 5519 | async def _find_related_text_unit_from_relations( | CODE |
| LOW | lightrag/utils.py | 104 | def _patch_ascii_colors_console_handler() -> None: | CODE |
| LOW | lightrag/utils.py | 144 | async def safe_vdb_operation_with_exception( | CODE |
| LOW | lightrag/utils.py | 710 | def serialize_llm_cache_identity(identity: Any) -> str: | CODE |
| LOW | lightrag/utils.py | 715 | def _validate_cached_response_format(response_format: Any | None) -> None: | CODE |
| LOW | lightrag/utils.py | 741 | def get_unique_filename_in_parsed(target_dir: Path, original_name: str) -> str: | CODE |
| LOW | lightrag/utils.py | 876 | def priority_limit_async_func_call( | CODE |
| LOW | lightrag/utils.py | 1762 | async def get_aggregated_queue_stats(): | CODE |
| LOW | lightrag/utils.py | 2238 | def wrap_embedding_func_with_attrs(**kwargs): | CODE |
| LOW | lightrag/utils.py | 2336 | def _sanitize_string_for_json(text: str) -> str: | CODE |
| LOW | lightrag/utils.py | 2576 | def pack_user_ass_to_openai_messages(*args: str): | CODE |
| LOW | lightrag/utils.py | 2583 | def split_string_by_multi_markers(content: str, markers: list[str]) -> list[str]: | CODE |
| 3380 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/rerank.py | 58 | except Exception as e: | CODE |
| LOW | lightrag/rerank.py | 544 | except Exception as e: | CODE |
| LOW | lightrag/rerank.py | 559 | except Exception as e: | CODE |
| LOW | lightrag/rerank.py | 574 | except Exception as e: | CODE |
| LOW⚡ | lightrag/llm_roles.py | 257 | except Exception as e: | CODE |
| LOW | lightrag/llm_roles.py | 343 | except Exception: | CODE |
| LOW | lightrag/lightrag.py | 14 | except Exception: # pragma: no cover - optional dependency | CODE |
| LOW | lightrag/lightrag.py | 1385 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 1630 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 1733 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 1737 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 1755 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 2092 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 2513 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 2618 | except Exception as verification_error: | CODE |
| LOW | lightrag/lightrag.py | 2652 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 2841 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 2996 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3013 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3046 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3109 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3120 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3141 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3149 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3383 | except Exception as cache_err: | CODE |
| LOW | lightrag/lightrag.py | 3396 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3453 | except Exception as cache_collect_error: | CODE |
| LOW | lightrag/lightrag.py | 3472 | except Exception as status_write_error: | CODE |
| LOW | lightrag/lightrag.py | 3552 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3730 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3751 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3789 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3886 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3896 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3919 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3957 | except Exception as cache_delete_error: | CODE |
| LOW | lightrag/lightrag.py | 3974 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 3989 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 4002 | except Exception as e: | CODE |
| LOW | lightrag/lightrag.py | 4021 | except Exception as status_update_error: | CODE |
| LOW | lightrag/lightrag.py | 4049 | except Exception as persistence_error: | CODE |
| LOW | lightrag/operate.py | 590 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 677 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 748 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 827 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 907 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 1050 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 1091 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 1129 | except Exception as e: | CODE |
| LOW | lightrag/operate.py | 1174 | except Exception as e: | CODE |
| 662 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/base.py | 0 | get popular labels by node degree (most connected entities) args: limit: maximum number of labels(entity names) to retur | STRING |
| HIGH | lightrag/kg/networkx_impl.py | 0 | get popular labels by node degree (most connected entities) args: limit: maximum number of labels(entity names) to retur | STRING |
| HIGH | lightrag/kg/mongo_impl.py | 0 | get popular labels by node degree (most connected entities) args: limit: maximum number of labels(entity names) to retur | STRING |
| HIGH | lightrag/kg/neo4j_impl.py | 0 | get popular labels by node degree (most connected entities) args: limit: maximum number of labels(entity names) to retur | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 0 | get popular labels by node degree (most connected entities) args: limit: maximum number of labels(entity names) to retur | STRING |
| HIGH | lightrag/base.py | 0 | search labels(entity names) with fuzzy matching args: query: search query string limit: maximum number of results to ret | STRING |
| HIGH | lightrag/kg/networkx_impl.py | 0 | search labels(entity names) with fuzzy matching args: query: search query string limit: maximum number of results to ret | STRING |
| HIGH | lightrag/kg/memgraph_impl.py | 0 | search labels(entity names) with fuzzy matching args: query: search query string limit: maximum number of results to ret | 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 | 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 |
| 20 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 | 22 | CODE | |
| LOW | lightrag/rerank.py | 116 | CODE | |
| LOW | lightrag/rerank.py | 182 | CODE | |
| LOW | lightrag/table_markup.py | 133 | CODE | |
| LOW | lightrag/llm_roles.py | 271 | CODE | |
| LOW | lightrag/lightrag.py | 965 | CODE | |
| LOW | lightrag/lightrag.py | 1356 | CODE | |
| LOW | lightrag/lightrag.py | 1832 | CODE | |
| LOW | lightrag/lightrag.py | 2387 | CODE | |
| LOW | lightrag/lightrag.py | 2738 | CODE | |
| LOW | lightrag/lightrag.py | 3157 | CODE | |
| LOW | lightrag/operate.py | 160 | CODE | |
| LOW | lightrag/operate.py | 265 | CODE | |
| LOW | lightrag/operate.py | 916 | CODE | |
| LOW | lightrag/operate.py | 1293 | CODE | |
| LOW | lightrag/operate.py | 1478 | CODE | |
| LOW | lightrag/operate.py | 1725 | CODE | |
| LOW | lightrag/operate.py | 2008 | CODE | |
| LOW | lightrag/operate.py | 2337 | CODE | |
| LOW | lightrag/operate.py | 2922 | CODE | |
| LOW | lightrag/operate.py | 3328 | CODE | |
| LOW | lightrag/operate.py | 4103 | CODE | |
| LOW | lightrag/operate.py | 4323 | CODE | |
| LOW | lightrag/operate.py | 5268 | CODE | |
| LOW | lightrag/operate.py | 5519 | CODE | |
| LOW | lightrag/operate.py | 3416 | CODE | |
| LOW | lightrag/utils.py | 144 | CODE | |
| LOW | lightrag/utils.py | 876 | CODE | |
| LOW | lightrag/utils.py | 2651 | CODE | |
| LOW | lightrag/utils.py | 2793 | CODE | |
| LOW | lightrag/utils.py | 3048 | CODE | |
| LOW | lightrag/utils.py | 4071 | CODE | |
| LOW | lightrag/utils.py | 4251 | CODE | |
| LOW | lightrag/utils.py | 4335 | CODE | |
| LOW | lightrag/utils.py | 4756 | CODE | |
| LOW | lightrag/utils.py | 923 | CODE | |
| LOW | lightrag/utils.py | 1134 | CODE | |
| LOW | lightrag/utils.py | 1233 | CODE | |
| LOW | lightrag/utils.py | 1325 | CODE | |
| LOW | lightrag/utils.py | 1477 | CODE | |
| LOW | lightrag/utils.py | 1569 | CODE | |
| LOW | lightrag/pipeline.py | 943 | CODE | |
| LOW | lightrag/pipeline.py | 1586 | CODE | |
| LOW | lightrag/pipeline.py | 1954 | CODE | |
| LOW | lightrag/pipeline.py | 2120 | CODE | |
| LOW | lightrag/pipeline.py | 3235 | CODE | |
| LOW | lightrag/pipeline.py | 3355 | CODE | |
| LOW | lightrag/pipeline.py | 4319 | CODE | |
| LOW | lightrag/storage_migrations.py | 30 | CODE | |
| LOW | lightrag/storage_migrations.py | 100 | CODE | |
| LOW | lightrag/storage_migrations.py | 197 | CODE | |
| LOW | lightrag/multimodal_context.py | 192 | CODE | |
| LOW | lightrag/multimodal_context.py | 465 | CODE | |
| LOW | lightrag/multimodal_context.py | 589 | CODE | |
| LOW | lightrag/utils_graph.py | 268 | CODE | |
| LOW | lightrag/utils_graph.py | 534 | CODE | |
| LOW | lightrag/utils_graph.py | 755 | CODE | |
| 293 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lightrag/lightrag.py | 173 | Drive an async coroutine to completion from a synchronous wrapper. The synchronous wrappers (``insert``, ``query``, | STRING |
| HIGH | lightrag/utils.py | 2087 | Execute function with enhanced priority-based concurrency control and timeout handling Args: | STRING |
| HIGH | lightrag/utils.py | 4996 | Validate a workspace name used to build per-workspace directories. File-based storages place their data in a subdir | STRING |
| HIGH | lightrag/pipeline.py | 250 | Pipeline for Processing Documents 1. Validate ids if provided or generate MD5 hash IDs and remove dupl | STRING |
| HIGH | lightrag/tools/clean_llm_query_cache.py | 250 | Initialize storage instance with fallback to config.ini and defaults Args: storage_name: Storage im | STRING |
| HIGH | lightrag/tools/migrate_llm_cache.py | 263 | 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 | 61 | Generate embeddings for a list of texts using VoyageAI's API. Args: texts: List of texts to embed. | STRING |
| HIGH | lightrag/llm/gemini.py | 302 | Complete a prompt using Gemini's API with Chain of Thought (COT) support. This function supports automatic int | STRING |
| 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 | STRING |
| 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 | STRING |
| HIGH | lightrag/llm/openai.py | 956 | 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 | 94 | 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 | 171 | 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 | 665 | 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 | 431 | 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 | 917 | Retrieves all edges (relationships) for a particular node identified by its label. Args: source_nod | STRING |
| HIGH | lightrag/api/auth.py | 121 | Validate JWT token Args: token: JWT token Returns: dict: Dictionary c | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 738 | Delete an entity and all its relationships from the knowledge graph. Args: request (Delete | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 774 | Delete a relationship between two entities from the knowledge graph. Args: request (Delete | STRING |
| HIGH | lightrag/api/routers/query_routes.py | 330 | Comprehensive RAG query endpoint with non-streaming response. Parameter "stream" is ignored. **Query M | STRING |
| HIGH | lightrag/api/routers/query_routes.py | 600 | Advanced RAG query endpoint with flexible streaming response. This endpoint provides the most flexible | STRING |
| HIGH | lightrag/api/routers/query_routes.py | 1052 | Advanced data retrieval endpoint for structured RAG analysis. This endpoint provides raw retrieval res | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 119 | Sanitize uploaded filename to prevent Path Traversal attacks. Args: filename: The original filename fr | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 2591 | 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 | 2840 | 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 | 2944 | 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 | 3506 | Delete documents and all their associated data by their IDs using background processing. Deletes speci | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 3596 | 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 | 3630 | Get the processing status of documents by tracking ID. This endpoint retrieves all documents associate | STRING |
| HIGH | lightrag/api/routers/document_routes.py | 3706 | 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 | 2044 | 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 |
|---|---|---|---|---|
| LOW | docker-build-push.sh | 38 | # Check if buildx builder exists, create if not | COMMENT |
| LOW | lightrag/lightrag.py | 2482 | # Check if query_result is None | COMMENT |
| LOW | lightrag/operate.py | 1162 | # Check if any task raised an exception and ensure all exceptions are retrieved | COMMENT |
| LOW | lightrag/operate.py | 2560 | # Check if this is a placeholder record | COMMENT |
| LOW | lightrag/operate.py | 3358 | # Check if JSON structured output mode is enabled | COMMENT |
| LOW | lightrag/operate.py | 3756 | # Check if any task raised an exception and ensure all exceptions are retrieved | COMMENT |
| LOW | lightrag/operate.py | 4030 | # Check if pre-defined keywords are already provided | COMMENT |
| LOW | lightrag/operate.py | 5612 | # Check if any relations still have chunks after deduplication | COMMENT |
| LOW | lightrag/utils.py | 380 | # Check if record has the required attributes for an access log | COMMENT |
| LOW | lightrag/utils.py | 557 | # Check if func is already an EmbeddingFunc instance and unwrap it | COMMENT |
| LOW | lightrag/utils.py | 580 | # Check if user provided embedding_dim parameter | COMMENT |
| LOW | lightrag/utils.py | 604 | # Check if underlying function supports max_token_size and inject if not provided | COMMENT |
| LOW | lightrag/utils.py | 617 | # Check if total elements can be evenly divided by embedding_dim | COMMENT |
| LOW | lightrag/utils.py | 1262 | # Check if task was cancelled before worker started | COMMENT |
| LOW | lightrag/utils.py | 2944 | # Check if we already have identical content cached | COMMENT |
| LOW | lightrag/utils.py | 4056 | # Check if there are still unused chunks | COMMENT |
| LOW | lightrag/utils.py | 4304 | # Check if results are in the new index-based format | COMMENT |
| LOW | lightrag/pipeline.py | 1368 | # Check if corresponding content exists in full_docs | COMMENT |
| LOW | lightrag/pipeline.py | 1371 | # Check if this is a failed document that should be preserved | COMMENT |
| LOW | lightrag/pipeline.py | 1458 | # Check if document has corresponding content in full_docs (consistency check) | 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 | 103 | # Check if the entity exists | COMMENT |
| LOW | lightrag/utils_graph.py | 204 | # Check if the relation exists | COMMENT |
| LOW | lightrag/utils_graph.py | 867 | # Check if storage has existing data | COMMENT |
| LOW | lightrag/utils_graph.py | 981 | # Check if entity already exists | COMMENT |
| LOW | lightrag/utils_graph.py | 1100 | # Check if both entities exist | COMMENT |
| LOW | lightrag/utils_graph.py | 1109 | # Check if relation already exists | COMMENT |
| LOW | lightrag/base.py | 251 | # Check if model_name exists (model_name is optional in EmbeddingFunc) | COMMENT |
| LOW | lightrag/tools/clean_llm_query_cache.py | 205 | # Check if config.ini has configuration | COMMENT |
| LOW | lightrag/tools/clean_llm_query_cache.py | 969 | # Check if choice is valid | COMMENT |
| LOW | lightrag/tools/clean_llm_query_cache.py | 1067 | # Check if user cancelled | COMMENT |
| LOW | lightrag/tools/clean_llm_query_cache.py | 1129 | # 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/prepare_qdrant_legacy_data.py | 548 | # Print result | COMMENT |
| LOW⚡ | lightrag/tools/migrate_llm_cache.py | 211 | # Check if storage requires configuration | COMMENT |
| LOW⚡ | lightrag/tools/migrate_llm_cache.py | 218 | # Check if has environment variables | COMMENT |
| LOW⚡ | lightrag/tools/migrate_llm_cache.py | 223 | # Check if has config.ini configuration | COMMENT |
| LOW | lightrag/tools/migrate_llm_cache.py | 190 | # Check if config.ini has configuration | COMMENT |
| LOW | lightrag/tools/migrate_llm_cache.py | 1060 | # Check if choice is valid | COMMENT |
| LOW | lightrag/tools/migrate_llm_cache.py | 1429 | # Check if user cancelled (setup_storage returns None for all fields) | COMMENT |
| LOW | lightrag/tools/migrate_llm_cache.py | 1433 | # Check if there are at least 2 storage types available | COMMENT |
| LOW | lightrag/tools/lightrag_visualizer/graph_visualizer.py | 920 | # Check if node is behind camera | 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 | 258 | # Check if this part is thought content using the 'thought' attribute | COMMENT |
| LOW | lightrag/llm/binding_options.py | 213 | # Check if this is a dataclass and use dataclass fields | COMMENT |
| LOW⚡ | lightrag/llm/openai.py | 517 | # Check if this chunk has usage information (final chunk) | COMMENT |
| LOW⚡ | lightrag/llm/openai.py | 524 | # Check if choices exists and is not empty | COMMENT |
| LOW⚡ | lightrag/llm/openai.py | 532 | # Check if delta exists | COMMENT |
| LOW | lightrag/llm/openai.py | 47 | # Check if required Langfuse environment variables are set | COMMENT |
| LOW | lightrag/llm/openai.py | 715 | # Check if we should include reasoning content | COMMENT |
| LOW | lightrag/parser/docx/utils.py | 361 | # Check if it mentions billing which indicates permanent quota issue | COMMENT |
| LOW | lightrag/kg/qdrant_impl.py | 322 | # Check if legacy collection has workspace_id to determine migration strategy | COMMENT |
| LOW | lightrag/kg/qdrant_impl.py | 433 | # Check if we've reached the end | COMMENT |
| LOW | lightrag/kg/networkx_impl.py | 209 | # Check if data needs to be reloaded | COMMENT |
| LOW | lightrag/kg/networkx_impl.py | 524 | # Check if graph is truncated | COMMENT |
| LOW | lightrag/kg/networkx_impl.py | 535 | # Check if node exists | COMMENT |
| LOW⚡ | lightrag/kg/networkx_impl.py | 578 | # Add neighbors to the queue with their degrees | COMMENT |
| LOW⚡ | lightrag/kg/networkx_impl.py | 583 | # Check if there are unexplored neighbors (skipped due to depth limit) | COMMENT |
| 88 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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 | 147 | 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 | 308 | CODE | |
| LOW | lightrag/utils.py | 308 | CODE | |
| LOW | lightrag/utils.py | 308 | CODE | |
| LOW | lightrag/pipeline.py | 12 | CODE | |
| LOW | lightrag/pipeline.py | 77 | CODE | |
| LOW | lightrag/pipeline.py | 77 | 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/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 | 31 | 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/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 | 24 | CODE | |
| LOW | lightrag/parser/markdown/parser.py | 54 | CODE | |
| LOW | lightrag/parser/markdown/raw_cache.py | 22 | CODE | |
| LOW | lightrag/parser/markdown/extract.py | 32 | CODE | |
| LOW | lightrag/parser/legacy/extractors.py | 10 | CODE | |
| LOW | lightrag/parser/legacy/__init__.py | 9 | CODE | |
| LOW | lightrag/parser/legacy/__init__.py | 9 | CODE | |
| LOW | lightrag/parser/legacy/parser.py | 3 | CODE | |
| LOW | lightrag/parser/external/_manifest.py | 18 | CODE | |
| LOW | lightrag/parser/external/_base.py | 18 | CODE | |
| 167 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | README-ja.md | 7 | # 🚀 LightRAG: シンプルかつ高速な検索拡張生成(RAG) | COMMENT |
| MEDIUM | README-ja.md | 241 | ### 軽量なグラフベース RAG フレームワーク | COMMENT |
| MEDIUM | README.md | 241 | ### 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/operate.py | 3439 | # an otherwise-valid chunk past the provider context window. When the | COMMENT |
| MEDIUM⚡ | lightrag/pipeline.py | 1156 | # Pipeline orchestration | COMMENT |
| MEDIUM | lightrag/pipeline.py | 3940 | # 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/parser/docx/parse_document.py | 1161 | # --- smart path (pipeline + landing guardrails) --------------- | COMMENT |
| MEDIUM | lightrag/parser/docx/parse_document.py | 1181 | # Landing guardrails: any violation abandons the smart output for THIS | COMMENT |
| MEDIUM | lightrag/parser/docx/parse_document.py | 1235 | # three counts come from guardrails.plan_toc_output — the single visibility | COMMENT |
| MEDIUM⚡ | lightrag/parser/docx/smart_heading/heading_flow.py | 2483 | # whole-document orchestration | COMMENT |
| MEDIUM⚡ | lightrag/parser/docx/smart_heading/guardrails.py | 521 | # 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 | 963 | # candidate reuses single=True judge semantics (± context window; a | COMMENT |
| MEDIUM | lightrag/kg/mongo_impl.py | 3054 | # built under a *different* embedding model must NOT be | COMMENT |
| MEDIUM⚡ | lightrag/kg/postgres_impl.py | 1747 | # with proper embedding model and dimension suffix for data isolation | STRING |
| MEDIUM | lightrag/kg/faiss_impl.py | 779 | # check is always True — it's kept as defensive scaffolding so that | COMMENT |
| MEDIUM | lightrag/api/config.py | 286 | # RAG configuration | COMMENT |
| MEDIUM | lightrag/api/utils_api.py | 453 | # RAG Configuration | STRING |
| MEDIUM | lightrag/api/lightrag_server.py | 2041 | # Initialize RAG with unified configuration | COMMENT |
| MEDIUM | lightrag/api/lightrag_server.py | 2363 | # 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/workspace/test_workspace_isolation.py | 547 | # Purpose: Validate guardrails for workspace normalization and namespace | COMMENT |
| MEDIUM | tests/workspace/test_workspace_isolation.py | 1061 | # Test 11.2: Insert different data to each RAG instance (CONCURRENTLY) | COMMENT |
| MEDIUM⚡ | tests/parser/docx/test_smart_heading_flow.py | 2842 | # 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 |
| MEDIUM⚡ | tests/api/routes/test_graph_routes_pipeline_busy.py | 49 | # Test scaffolding | COMMENT |
| MEDIUM | docs/ProgramingWithCore.md | 32 | # Initialize RAG instance | COMMENT |
| MEDIUM | docs/DockerDeployment.md | 112 | ├── rag_storage/ # RAG data persistence | CODE |
| MEDIUM⚡ | examples/lightrag_gemini_postgres_demo.py | 102 | # Initialize RAG with PostgreSQL storages | COMMENT |
| MEDIUM⚡ | examples/lightrag_gemini_demo.py | 74 | # Initialize RAG | COMMENT |
| MEDIUM | examples/lightrag_openai_compatible_demo.py | 150 | # Initialize RAG instance | COMMENT |
| MEDIUM⚡ | examples/lightrag_vllm_demo.py | 106 | # Initialize RAG | 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_openai_opensearch_graph_demo.py | 89 | # Initialize RAG with OpenSearch storages | COMMENT |
| MEDIUM | examples/lightrag_ollama_demo.py | 139 | # Initialize RAG instance | COMMENT |
| 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 | 27 | # choose an embedding model | COMMENT |
| MEDIUM | examples/unofficial-sample/lightrag_cloudflare_demo.py | 251 | # Initialize RAG instance | COMMENT |
| 3 more matches not shown… | ||||
| 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 | 118 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 124 | # EMBEDDING_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server.md | 135 | # LLM_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server.md | 143 | # EMBEDDING_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server.md | 265 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 276 | EMBEDDING_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 761 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server.md | 1014 | LLM_BINDING_API_KEY=your-api-key | CODE |
| HIGH | docs/FileProcessingPipeline.md | 307 | "api_key": "your_api_key", | CODE |
| HIGH | docs/ProgramingWithCore.md | 852 | export OPENAI_API_KEY=your-api-key | CODE |
| HIGH | docs/ProgramingWithCore.md | 866 | OPENAI_API_KEY=your-api-key \ | CODE |
| HIGH | docs/FileProcessingPipeline-zh.md | 307 | "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 | 122 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 203 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 220 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration-zh.md | 333 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 118 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 124 | # EMBEDDING_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server-zh.md | 135 | # LLM_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server-zh.md | 143 | # EMBEDDING_BINDING_API_KEY=your_api_key | COMMENT |
| HIGH | docs/LightRAG-API-Server-zh.md | 265 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 276 | EMBEDDING_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 761 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/LightRAG-API-Server-zh.md | 1014 | 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 | 122 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 203 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 220 | LLM_BINDING_API_KEY=your_api_key | CODE |
| HIGH | docs/RoleSpecificLLMConfiguration.md | 333 | 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 |
|---|---|---|---|---|
| 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 | 1082 | # Create a NEW EmbeddingFunc instance with the wrapped func to avoid mutating the caller's object | COMMENT |
| MEDIUM | lightrag/lightrag.py | 2294 | # Create a copy of param to avoid modifying the original | COMMENT |
| MEDIUM | lightrag/operate.py | 5824 | # Create a preliminary system prompt with empty content_data to calculate overhead | COMMENT |
| MEDIUM | lightrag/utils.py | 4958 | # Create a list of (file_path, count, first_index) tuples | COMMENT |
| MEDIUM | lightrag/pipeline.py | 764 | # Create a new record with unique ID for this duplicate attempt | COMMENT |
| MEDIUM | lightrag/tools/migrate_llm_cache.py | 701 | # Create a snapshot of matching items while holding the lock | COMMENT |
| MEDIUM | lightrag/llm/openai.py | 173 | # Create a merged config dict with precedence: explicit params > client_configs | COMMENT |
| MEDIUM | lightrag/llm/openai.py | 205 | # Create a merged config dict with precedence: explicit params > client_configs > defaults | COMMENT |
| MEDIUM | lightrag/llm/openai.py | 375 | # Create the OpenAI client (supports both OpenAI and Azure) | COMMENT |
| MEDIUM | lightrag/llm/openai.py | 1040 | # Create the OpenAI client (supports both OpenAI and Azure) | COMMENT |
| MEDIUM | lightrag/llm/bedrock.py | 320 | # Create a session that will be used throughout the streaming process | COMMENT |
| MEDIUM | lightrag/llm/bedrock.py | 330 | # Define the generator function that will manage the client lifecycle | COMMENT |
| MEDIUM⚡ | lightrag/kg/mongo_impl.py | 2803 | # Create the improved search index (async, no waiting) | COMMENT |
| MEDIUM | lightrag/kg/mongo_impl.py | 444 | # Create a copy of v for $set operation, excluding create_time to avoid conflicts | COMMENT |
| MEDIUM | lightrag/kg/mongo_impl.py | 3205 | # Define the aggregation pipeline with the converted query vector | COMMENT |
| MEDIUM | lightrag/kg/postgres_impl.py | 1604 | # Define the field changes needed | COMMENT |
| MEDIUM | lightrag/kg/faiss_impl.py | 236 | # Create an empty Faiss index for inner product (useful for normalized vectors = cosine similarity). | COMMENT |
| MEDIUM | lightrag/kg/shared_storage.py | 24 | # Define a direct print function for critical logs that must be visible in all processes | COMMENT |
| MEDIUM | lightrag/kg/shared_storage.py | 1395 | # Create a shared list object for history_messages | COMMENT |
| MEDIUM | lightrag/kg/shared_storage.py | 1467 | # Create a simple mutable object to store boolean value for compatibility with mutiprocess | COMMENT |
| MEDIUM | lightrag/kg/json_kv_impl.py | 256 | # Create a copy to avoid modifying the original data | COMMENT |
| MEDIUM | lightrag/kg/json_kv_impl.py | 271 | # Create a copy to avoid modifying the original data | 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 | 974 | # Create the EmbeddingFunc instance (now returns complete EmbeddingFunc with max_token_size) | COMMENT |
| MEDIUM | lightrag/api/routers/ollama_api.py | 150 | # Create an instance of the model | COMMENT |
| MEDIUM | lightrag/api/routers/query_routes.py | 427 | # Create a mapping from reference_id to chunk content | COMMENT |
| MEDIUM | tests/kg/test_graph_storage.py | 108 | # Initialize the storage instance | COMMENT |
| MEDIUM | tests/kg/test_graph_storage.py | 1666 | # Initialize storage instance | STRING |
| MEDIUM | tests/kg/postgres_impl/test_postgres_index_name.py | 84 | # Create a table name that results in exactly 63 bytes | COMMENT |
| MEDIUM | tests/api/auth/test_token_auto_renewal.py | 16 | # Create a simple token renewal cache for testing | COMMENT |
| MEDIUM | tests/api/auth/test_token_auto_renewal.py | 323 | # Create a mock JWT payload | COMMENT |
| MEDIUM | tests/chunker/test_rerank_chunking.py | 39 | # 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 |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker-compose.podman.yml | 1 | # Podman-compatible compose file for LightRAG | COMMENT |
| LOW | README-ja.md | 161 | make dev | COMMENT |
| LOW | README.md | 161 | make dev | 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 | README-zh.md | 161 | make dev | COMMENT |
| LOW | lightrag/lightrag.py | 841 | # P-specific chunk_token_size backfill — P does NOT inherit the | COMMENT |
| LOW | lightrag/lightrag.py | 861 | ) | COMMENT |
| LOW | lightrag/constants.py | 81 | # Field length of file_path in Milvus Schema for entity and relation (Should not be changed) | COMMENT |
| LOW | lightrag/constants.py | 121 | COMMENT | |
| LOW | lightrag/constants.py | 141 | COMMENT | |
| LOW | lightrag/constants.py | 161 | DEFAULT_DOCX_SMART_ENNUM_BLACKLIST = ( | COMMENT |
| LOW | lightrag/constants.py | 181 | # (印发:XX / 印发 XX / 印发机关 XX / 印发机关:XX — 印发机关 is a closer, NOT an | COMMENT |
| LOW | lightrag/constants.py | 201 | # the effective threshold. The threshold is baseline-aware — a document with a | COMMENT |
| LOW | lightrag/constants.py | 221 | DEFAULT_DOCX_SMART_MIN_TOKENS = 1800 | COMMENT |
| LOW | lightrag/constants.py | 241 | # Open numbering series: close a series after this many consecutive body | COMMENT |
| LOW | lightrag/constants.py | 261 | ) | COMMENT |
| LOW | lightrag/constants.py | 341 | # Per-engine parsing concurrency defaults. mineru / docling are | COMMENT |
| LOW | lightrag/constants.py | 361 | # Query stage (interactive: query/keyword LLM calls and query-time embeddings) | COMMENT |
| LOW | lightrag/constants.py | 401 | DEFAULT_RERANK_MAX_ASYNC = DEFAULT_MAX_ASYNC | COMMENT |
| LOW | lightrag/constants.py | 421 | # keep occupying the favored seat (which would push every live waiter onto | COMMENT |
| LOW | lightrag/operate.py | 3421 | Returns: | COMMENT |
| LOW | lightrag/utils.py | 981 | max_queue_size if max_queue_size > 0 else 0, | COMMENT |
| LOW | lightrag/utils.py | 3881 | # LLMs emitting LaTeX inside JSON strings routinely under-escape backslashes: | COMMENT |
| LOW | lightrag/utils.py | 4781 | if not found_str: | COMMENT |
| LOW | lightrag/pipeline.py | 321 | # batch and sets ``request_pending`` whenever new work arrives | COMMENT |
| LOW | lightrag/pipeline.py | 641 | # | COMMENT |
| LOW | lightrag/pipeline.py | 1001 | # the same critical section that observed request_pending=False. | COMMENT |
| LOW | lightrag/pipeline.py | 1121 | # If the loop already released ``busy`` under the atomic exit | COMMENT |
| LOW | lightrag/pipeline.py | 1281 | # an escape here would orphan the workers — they keep draining the queues and | COMMENT |
| LOW | lightrag/pipeline.py | 1441 | # survives into the PENDING wait window (where the WebUI would render | COMMENT |
| LOW | lightrag/pipeline.py | 1641 | # is rewritten — would no longer resolve the hinted | COMMENT |
| LOW | lightrag/pipeline.py | 1801 | # below (before the doc enters q_analyze) so doc_status | COMMENT |
| LOW | lightrag/pipeline.py | 2001 | doc_id=doc_id_w, | COMMENT |
| LOW | lightrag/pipeline.py | 2201 | # The parsed body is no longer carried through q_analyze / | COMMENT |
| LOW | lightrag/pipeline.py | 2221 | await self._purge_stale_extraction_if_resuming( | COMMENT |
| LOW | lightrag/pipeline.py | 2241 | # with its legacy 6-arg signature so existing | COMMENT |
| LOW | lightrag/pipeline.py | 2361 | chunking_result = chunking_by_fixed_token( | COMMENT |
| LOW | lightrag/pipeline.py | 2521 | # hard split actually occurred, so its presence | COMMENT |
| LOW | lightrag/pipeline.py | 4201 | # Fail-fast polling loop. Three trigger paths: | COMMENT |
| LOW | lightrag/utils_pipeline.py | 201 | # alongside the document record after PROCESSED. | COMMENT |
| LOW | lightrag/utils_pipeline.py | 221 | # attempted but bailed". | COMMENT |
| LOW | lightrag/llm/binding_options.py | 41 | # - Handles default values and type information for each parameter | COMMENT |
| LOW | lightrag/llm/binding_options.py | 421 | # ============================================================================= | COMMENT |
| LOW | lightrag/llm/binding_options.py | 661 | COMMENT | |
| LOW | lightrag/llm/openai.py | 461 | except BadRequestError as e: | COMMENT |
| LOW | lightrag/parser/routing.py | 241 | # F/R/V/P selector in ``ProcessOptions``. ``process_options`` chooses | COMMENT |
| LOW | lightrag/parser/routing.py | 441 | # rather than letting the dispatcher fall back to the global | COMMENT |
| LOW | lightrag/parser/external/docling/cache.py | 41 | from lightrag.parser.external.docling import MANIFEST_ENGINE | COMMENT |
| LOW | lightrag/parser/external/docling/cache.py | 201 | # Compare against the *current* fixed constants from client.py, not | COMMENT |
| LOW | lightrag/parser/docx/parse_document.py | 1221 | if parse_metadata is not None: | COMMENT |
| LOW | lightrag/parser/docx/smart_heading/heading_flow.py | 301 | cb1_strong_body_recovered: bool = False | COMMENT |
| LOW | lightrag/parser/docx/smart_heading/heading_flow.py | 321 | #: numbered candidate became body — otherwise the veto leaves no trace. | COMMENT |
| LOW | lightrag/parser/docx/smart_heading/heading_flow.py | 481 | return ( | COMMENT |
| LOW | lightrag/parser/docx/smart_heading/heading_flow.py | 801 | COMMENT | |
| LOW | lightrag/parser/docx/smart_heading/heading_flow.py | 1081 | result = gate_candidates( | COMMENT |
| LOW | lightrag/parser/docx/smart_heading/heading_flow.py | 2741 | # this document's parse even on entry points that bypass startup validation | COMMENT |
| LOW | lightrag/parser/docx/smart_heading/heading_flow.py | 3061 | audit["rule_events"].extend(skeleton_audit) | COMMENT |
| LOW | lightrag/parser/docx/smart_heading/guardrails.py | 241 | # Judge sentence shape over the title PROSE, not a leading numbering label: | COMMENT |
| 66 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightrag/api/routers/document_routes.py | 689 | "metadata": {"author": "John Doe", "year": 2025}, | CODE |
| LOW | lightrag/api/routers/document_routes.py | 753 | "metadata": {"author": "John Doe"}, | CODE |
| LOW | lightrag/api/routers/document_routes.py | 795 | "metadata": {"author": "John Doe", "year": 2025}, | CODE |
| LOW | lightrag/api/routers/document_routes.py | 913 | "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 | 3708 | 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_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 | 386 | "placeholder": "页面内搜索节点...", | CODE |
| LOW | lightrag_webui/src/locales/zh.json | 393 | "placeholder": "搜索节点名称...", | CODE |
| LOW | lightrag_webui/src/locales/zh.json | 421 | "placeholder": "输入查询内容 (支持模式前缀: /<Query Mode>)", | CODE |
| LOW | lightrag_webui/src/locales/zh.json | 481 | "placeholder": "请输入 API Key", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 386 | "placeholder": "ページ内のノードを検索...", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 393 | "placeholder": "ノード名を検索...", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 421 | "placeholder": "クエリを入力(プレフィックス対応: /<クエリモード>)", | CODE |
| LOW | lightrag_webui/src/locales/ja.json | 481 | "placeholder": "APIキーを入力", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 386 | "placeholder": "Knoten auf der Seite suchen...", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 393 | "placeholder": "Knotenname suchen...", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 421 | "placeholder": "Geben Sie Ihre Abfrage ein (Präfix unterstützt: /<Abfragemodus>)", | CODE |
| LOW | lightrag_webui/src/locales/de.json | 481 | "placeholder": "API-Schlüssel eingeben", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 386 | "placeholder": "Поиск узлов на странице...", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 393 | "placeholder": "Поиск имени узла...", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 421 | "placeholder": "Введите ваш запрос (Поддержка префикса: /<Режим запроса>)", | CODE |
| LOW | lightrag_webui/src/locales/ru.json | 481 | "placeholder": "Введите ваш API ключ", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 386 | "placeholder": "Шукати вузли на сторінці...", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 393 | "placeholder": "Шукати ім'я вузла...", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 421 | "placeholder": "Введіть ваш запит (Підтримка префіксу: /<Режим запиту>)", | CODE |
| LOW | lightrag_webui/src/locales/uk.json | 481 | "placeholder": "Введіть ваш API ключ", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 386 | "placeholder": "Search nodes in page...", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 393 | "placeholder": "Search node name...", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 421 | "placeholder": "Enter your query (Support prefix: /<Query Mode>)", | CODE |
| LOW | lightrag_webui/src/locales/en.json | 481 | "placeholder": "Enter your API key", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 386 | "placeholder": "Rechercher des nœuds dans la page...", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 393 | "placeholder": "Rechercher le nom du nœud...", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 421 | "placeholder": "Tapez votre requête (Préfixe de requête : /<Query Mode>)", | CODE |
| LOW | lightrag_webui/src/locales/fr.json | 481 | "placeholder": "Entrez votre clé API", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 386 | "placeholder": "페이지 내 노드 검색...", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 393 | "placeholder": "노드 이름 검색...", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 421 | "placeholder": "질문을 입력하세요 (접두사 지원: /<쿼리 모드>)", | CODE |
| LOW | lightrag_webui/src/locales/ko.json | 481 | "placeholder": "API 키 입력", | CODE |
| LOW | lightrag_webui/src/locales/vi.json | 386 | "placeholder": "Tìm kiếm nút trong trang...", | CODE |
| LOW | lightrag_webui/src/locales/vi.json | 393 | "placeholder": "Tìm kiếm tên nút...", | CODE |
| LOW | lightrag_webui/src/locales/vi.json | 421 | "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 | 481 | "placeholder": "Nhập khóa API của bạn", | CODE |
| LOW | lightrag_webui/src/locales/zh_TW.json | 386 | "placeholder": "頁面內搜尋節點...", | CODE |
| LOW | lightrag_webui/src/locales/zh_TW.json | 393 | "placeholder": "搜尋節點名稱...", | CODE |
| LOW | lightrag_webui/src/locales/zh_TW.json | 421 | "placeholder": "輸入查詢內容 (支援模式前綴:/<Query Mode>)", | CODE |
| LOW | lightrag_webui/src/locales/zh_TW.json | 481 | "placeholder": "請輸入 API key", | CODE |
| 4 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lightrag/parser/docx/parser.py | 135 | # ``positions: [{"type": "paraid", "range": null}]``. | COMMENT |
| HIGH | lightrag/parser/docx/smart_heading/title_block.py | 1046 | - 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 | 1049 | {{"is_title_block": true|false, "main_title": string|null, "sub_title": string|null, "doc_number": string|null, "classif | CODE |
| HIGH | lightrag/kg/postgres_impl.py | 5892 | " $1::text || E'\\x01' ||" | CODE |
| HIGH | lightrag/api/lightrag_server.py | 126 | if (!data || data.type !== 'lightrag:set-docs-theme') return; | CODE |
| HIGH | lightrag/api/routers/graph_routes.py | 332 | "merge_error": null, | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 334 | "target_entity": null, | STRING |
| HIGH | lightrag/api/routers/graph_routes.py | 360 | "merge_error": null, | STRING |
| HIGH | …sts/kg/postgres_impl/test_postgres_cypher_injection.py | 135 | "formula": "x < 5 && y > 3", | CODE |
| HIGH | …sts/kg/postgres_impl/test_postgres_cypher_injection.py | 146 | assert '`formula`: "x < 5 && y > 3"' in call["sql"] | CODE |
| HIGH | …s/kg/postgres_impl/test_postgres_upsert_edge_cypher.py | 172 | 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 |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | lightrag/lightrag.py | 1081 | # Step 2: Apply priority wrapper decorator to EmbeddingFunc's inner func | COMMENT |
| LOW | lightrag/lightrag.py | 1063 | # Step 1: Capture embedding_func and max_token_size before applying rate_limit decorator | COMMENT |
| LOW⚡ | lightrag/operate.py | 5401 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 5407 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW⚡ | lightrag/operate.py | 5696 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 5702 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW | lightrag/operate.py | 5290 | # Step 1: Collect all text chunks for each entity | COMMENT |
| LOW | lightrag/operate.py | 5317 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned entities) | COMMENT |
| LOW | lightrag/operate.py | 5334 | # Step 3: Sort chunks for each entity by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 5347 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW | lightrag/operate.py | 5541 | # Step 1: Collect all text chunks for each relationship | COMMENT |
| LOW | lightrag/operate.py | 5576 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned relationships) | COMMENT |
| LOW | lightrag/operate.py | 5625 | # Step 3: Sort chunks for each relationship by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 5640 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW⚡ | lightrag/utils.py | 4550 | # Step 1: Remove chunks that are no longer needed | COMMENT |
| LOW⚡ | lightrag/utils.py | 4555 | # Step 2: Add new chunks (preserving order from new_chunk_ids) | COMMENT |
| LOW⚡ | lightrag/api/lightrag_server.py | 738 | # Step 3: Create optimized embedding function (calls underlying function directly) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 665 | # Step 1: Import provider function and extract default attributes | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 718 | # Step 2: Apply priority (user config > provider default) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 933 | # Step 4: Wrap in EmbeddingFunc and return | COMMENT |
| LOW | lightrag/chunker/paragraph_semantic.py | 1335 | # Step 1: expand each oversized table paragraph into row-bounded | COMMENT |
| LOW | lightrag/chunker/paragraph_semantic.py | 1359 | # 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 | 210 | ### Step 1: Prepare in Online Environment | COMMENT |
| LOW | docs/OfflineDeployment.md | 229 | ### Step 2: Transfer to Offline Environment | COMMENT |
| LOW | docs/OfflineDeployment.md | 239 | ### Step 3: Install in Offline Environment | COMMENT |
| LOW | docs/OfflineDeployment.md | 260 | ### 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 | 1081 | # Step 2: Apply priority wrapper decorator to EmbeddingFunc's inner func | COMMENT |
| LOW | lightrag/lightrag.py | 1063 | # Step 1: Capture embedding_func and max_token_size before applying rate_limit decorator | COMMENT |
| LOW⚡ | lightrag/operate.py | 5401 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 5407 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW⚡ | lightrag/operate.py | 5696 | # Step 5: Batch retrieve chunk data | COMMENT |
| LOW⚡ | lightrag/operate.py | 5702 | # Step 6: Build result chunks with valid data and update chunk tracking | COMMENT |
| LOW | lightrag/operate.py | 5290 | # Step 1: Collect all text chunks for each entity | COMMENT |
| LOW | lightrag/operate.py | 5317 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned entities) | COMMENT |
| LOW | lightrag/operate.py | 5334 | # Step 3: Sort chunks for each entity by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 5347 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW | lightrag/operate.py | 5541 | # Step 1: Collect all text chunks for each relationship | COMMENT |
| LOW | lightrag/operate.py | 5576 | # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned relationships) | COMMENT |
| LOW | lightrag/operate.py | 5625 | # Step 3: Sort chunks for each relationship by occurrence count (higher count = higher priority) | COMMENT |
| LOW | lightrag/operate.py | 5640 | # Step 4: Apply the selected chunk selection algorithm | COMMENT |
| LOW⚡ | lightrag/utils.py | 4550 | # Step 1: Remove chunks that are no longer needed | COMMENT |
| LOW⚡ | lightrag/utils.py | 4555 | # Step 2: Add new chunks (preserving order from new_chunk_ids) | COMMENT |
| LOW⚡ | lightrag/api/lightrag_server.py | 738 | # Step 3: Create optimized embedding function (calls underlying function directly) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 665 | # Step 1: Import provider function and extract default attributes | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 718 | # Step 2: Apply priority (user config > provider default) | COMMENT |
| LOW | lightrag/api/lightrag_server.py | 933 | # Step 4: Wrap in EmbeddingFunc and return | COMMENT |
| LOW | lightrag/chunker/paragraph_semantic.py | 1335 | # Step 1: expand each oversized table paragraph into row-bounded | COMMENT |
| LOW | lightrag/chunker/paragraph_semantic.py | 1359 | # Step 2: greedy-pack pieces into chunks ≤ target_max. A piece | COMMENT |
| LOW | tests/kg/postgres_impl/test_postgres_migration.py | 662 | # Step 1: Simulate workspace_a initialization (Case 3 - only legacy exists) | COMMENT |
| LOW | tests/kg/postgres_impl/test_postgres_migration.py | 760 | # Step 2: Simulate workspace_b initialization (Case 3 - both exist, but legacy has B's data) | COMMENT |
| LOW⚡ | examples/lightrag_ag2_multiagent_demo.py | 267 | # Step 1: Set up LightRAG (async, runs on the background loop) | COMMENT |
| LOW⚡ | examples/lightrag_ag2_multiagent_demo.py | 270 | # Step 2: Create AG2 agents with LightRAG tools | COMMENT |
| LOW⚡ | examples/lightrag_ag2_multiagent_demo.py | 273 | # Step 3: Ask a complex question | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightrag/llm_roles.py | 134 | def set_role_llm_metadata(self, role: str, **metadata: Any) -> None: | CODE |
| LOW⚡ | lightrag/lightrag.py | 771 | 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 | 84 | logger = logging.getLogger(__name__) | CODE |
| LOW | lightrag/multimodal_context.py | 1017 | __all__ = [ | CODE |
| LOW | lightrag/chunk_schema.py | 376 | __all__ = [ | CODE |
| LOW | lightrag/prompt_multimodal.py | 352 | __all__ = [ | STRING |
| LOW | lightrag/llm/gemini.py | 747 | __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 | 227 | __all__ = ["NativeMarkdownIRBuilder"] | CODE |
| LOW | lightrag/parser/markdown/raw_cache.py | 226 | __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 | 67 | __all__ = ["safe_extract_zip"] | CODE |
| LOW | lightrag/parser/external/_common.py | 143 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/__init__.py | 35 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/docling/ir_builder.py | 1072 | __all__ = ["DoclingIRBuilder"] | CODE |
| LOW | lightrag/parser/external/docling/manifest.py | 126 | __all__ = [ | CODE |
| LOW | lightrag/parser/external/docling/client.py | 490 | __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 | 702 | __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 | 346 | __all__ = ["NativeDocxIRBuilder"] | 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 | 60 | __all__ = [ | CODE |
| LOW⚡ | tests/llm/bedrock_impl/test_bedrock_llm.py | 538 | def set_role_llm_metadata(self, _role: str, **_metadata) -> None: | CODE |
| LOW | tests/parser/docx/_native_docx_fixtures.py | 330 | __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 | 38 | 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/pipeline.py | 993 | # Another process is busy, just set request flag and return | COMMENT |
| MEDIUM | lightrag/tools/clean_llm_query_cache.py | 870 | """Print comprehensive cleanup report | STRING |
| MEDIUM⚡ | lightrag/tools/migrate_llm_cache.py | 1517 | # Print comprehensive migration report | COMMENT |
| MEDIUM | lightrag/tools/migrate_llm_cache.py | 1349 | """Print comprehensive migration report | STRING |
| MEDIUM | lightrag/kg/mongo_impl.py | 2547 | """Try Atlas Search using compound query for comprehensive matching.""" | STRING |
| MEDIUM | lightrag/kg/shared_storage.py | 1066 | """Release all locks with comprehensive error handling, protected from cancellation""" | STRING |
| MEDIUM | lightrag/api/routers/document_routes.py | 3680 | # Handle both DocStatus enum and string cases for robust deserialization | COMMENT |
| MEDIUM⚡ | tests/parser/docx/test_smart_heading_e2e.py | 259 | # 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 | 121 | # 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 | 287 | // Use the new robust COT parsing function | COMMENT |
| MEDIUM | lightrag_webui/src/features/RetrievalView.tsx | 727 | // Handle copying message content with robust clipboard support | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightrag/llm_roles.py | 271 | CODE | |
| LOW | lightrag/llm_roles.py | 355 | CODE | |
| LOW | lightrag/llm_roles.py | 390 | CODE | |
| LOW | lightrag/operate.py | 2922 | CODE | |
| LOW | lightrag/utils.py | 3472 | CODE | |
| LOW | lightrag/pipeline.py | 238 | CODE | |
| LOW | lightrag/llm/gemini.py | 284 | CODE | |
| LOW | lightrag/llm/gemini.py | 612 | CODE | |
| LOW | lightrag/llm/openai.py | 241 | CODE | |
| LOW | lightrag/llm/openai.py | 920 | CODE | |
| LOW | lightrag/llm/openai.py | 940 | CODE | |
| LOW | lightrag/llm/openai.py | 1090 | CODE | |
| LOW | lightrag/llm/openai.py | 1172 | CODE | |
| LOW | lightrag/llm/openai.py | 1181 | CODE | |
| LOW | lightrag/llm/llama_index_impl.py | 201 | CODE | |
| LOW | lightrag/llm/bedrock.py | 167 | CODE | |
| LOW | lightrag/llm/bedrock.py | 452 | CODE | |
| LOW | lightrag/llm/hf.py | 168 | CODE | |
| LOW | lightrag/parser/external/mineru/cache.py | 278 | CODE | |
| LOW | lightrag/parser/docx/utils.py | 740 | CODE | |
| LOW | lightrag/parser/docx/utils.py | 791 | CODE | |
| LOW | lightrag/parser/docx/smart_heading/heading_flow.py | 361 | CODE | |
| LOW | lightrag/parser/docx/smart_heading/title_block.py | 421 | CODE | |
| LOW | lightrag/kg/opensearch_impl.py | 3420 | CODE | |
| LOW | lightrag/chunker/semantic_vector.py | 192 | CODE | |
| LOW | tests/parser/external/docling/test_client.py | 64 | CODE | |
| LOW | tests/api/routes/test_document_routes_docx_archive.py | 101 | 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 | 671 | # Usage: | COMMENT |