Repository Analysis

HKUDS/LightRAG

[EMNLP2025] "LightRAG: Simple and Fast Retrieval-Augmented Generation"

32.6 Strong AI signal View on GitHub

Analysis Overview

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).

32.6
Adjusted Score
32.6
Raw Score
100%
Time Factor
2026-07-14
Last Push
37.7K
Stars
Python
Language
276.8K
Lines of Code
711
Files
6.4K
Pattern Hits
2026-07-14
Scan Date
0.24
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 174MEDIUM 1051LOW 5157

Directory Score Breakdown

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.

Pattern Findings

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.

Decorative Section Separators875 hits · 3289 pts
SeverityFileLineSnippetContext
MEDIUMlightrag/pipeline.py234 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py236 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py1155 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py1157 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py2841 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py2843 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py3088 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py3090 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py1582 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py1584 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py2116 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py2118 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py3351 # ============================================================COMMENT
MEDIUMlightrag/pipeline.py3353 # ============================================================COMMENT
MEDIUMlightrag/multimodal_context.py87# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py91# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py131# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py134# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py187# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py189# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py266# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py268# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py460# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py462# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py684# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/multimodal_context.py686# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/utils_pipeline.py758# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/utils_pipeline.py760# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/utils_pipeline.py785# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/utils_pipeline.py787# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/utils_pipeline.py633# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/utils_pipeline.py635# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/utils_pipeline.py683# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/utils_pipeline.py685# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/utils_pipeline.py823# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/utils_pipeline.py825# ---------------------------------------------------------------------------COMMENT
MEDIUMlightrag/tools/rebuild_vdb.py578 # ------------------------------------------------------------------COMMENT
MEDIUMlightrag/tools/rebuild_vdb.py580 # ------------------------------------------------------------------COMMENT
MEDIUMlightrag/tools/rebuild_vdb.py764 # ------------------------------------------------------------------COMMENT
MEDIUMlightrag/tools/rebuild_vdb.py766 # ------------------------------------------------------------------COMMENT
MEDIUMlightrag/tools/rebuild_vdb.py884 # ------------------------------------------------------------------COMMENT
MEDIUMlightrag/tools/rebuild_vdb.py886 # ------------------------------------------------------------------COMMENT
MEDIUMlightrag/llm/binding_options.py421# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py423# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py433# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py587# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py589# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py596# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py633# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py635# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py641# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py663# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py665# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py675# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py32# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py34# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py68# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py538# =============================================================================COMMENT
MEDIUMlightrag/llm/binding_options.py540# =============================================================================COMMENT
MEDIUMlightrag/parser/param_schema.py54# ---------------------------------------------------------------------------COMMENT
815 more matches not shown…
Hyper-Verbose Identifiers3440 hits · 2909 pts
SeverityFileLineSnippetContext
LOWreproduce/Step_3_openai_compatible.py57def run_queries_and_save_to_json(CODE
LOWreproduce/Step_3.py26def run_queries_and_save_to_json(CODE
LOWlightrag/rerank.py22def chunk_documents_for_rerank(CODE
LOWlightrag/addon_params.py30def _emit_deprecated_addon_warnings(params: Mapping[str, Any]) -> None:CODE
LOWlightrag/table_markup.py83def header_grid_to_thead_html(grid: list[list[str]]) -> str:CODE
LOWlightrag/llm_roles.py125 def register_role_llm_builder(CODE
LOWlightrag/llm_roles.py157 def _get_effective_role_llm_kwargs(self, role: str) -> dict[str, Any]:CODE
LOWlightrag/llm_roles.py165 def _get_effective_role_llm_timeout(self, role: str) -> int:CODE
LOWlightrag/llm_roles.py169 def _get_effective_role_llm_max_async(self, role: str) -> int:CODE
LOWlightrag/llm_roles.py207 def _rebuild_single_role_llm_func(self, role: str) -> None:CODE
LOWlightrag/llm_roles.py223 def _schedule_retired_llm_queue_cleanup(CODE
LOWlightrag/llm_roles.py251 def _finalize_retired_llm_queue_cleanup(self, task: asyncio.Task) -> None:CODE
LOWlightrag/llm_roles.py260 async def wait_for_retired_llm_queues(self) -> None:CODE
LOWlightrag/llm_roles.py271 def _apply_llm_role_config_update(CODE
LOWlightrag/llm_roles.py571 async def get_embedding_queue_status(self) -> dict[str, Any]:CODE
LOWlightrag/lightrag.py771 def _set_runtime_addon_params(self, addon_params: Mapping[str, Any] | None) -> None:CODE
LOWlightrag/lightrag.py775 def _apply_chunk_size_overlay(self) -> None:CODE
LOWlightrag/lightrag.py897 def _refresh_addon_params_cache(self) -> None:CODE
LOWlightrag/lightrag.py917 def _ensure_addon_params_cache(self) -> None:CODE
LOWlightrag/lightrag.py950 def _build_role_llm_cache_identity(CODE
LOWlightrag/lightrag.py1321 def _get_parse_native_executor(self) -> ThreadPoolExecutor:CODE
LOWlightrag/lightrag.py1338 def _shutdown_parser_executor(self) -> None:CODE
LOWlightrag/lightrag.py1617 async def _process_extract_entities(CODE
LOWlightrag/lightrag.py1659 async def _discard_pending_index_ops(CODE
LOWlightrag/lightrag.py1791 async def _insert_done_with_cleanup(self) -> None:CODE
LOWlightrag/lightrag.py2558 async def _update_delete_retry_state(CODE
LOWlightrag/lightrag.py2603 async def _get_existing_llm_cache_ids(self, cache_ids: list[str]) -> list[str]:CODE
LOWlightrag/operate.py95def _get_relationship_vdb_timeout_seconds(global_config: dict[str, Any]) -> float:CODE
LOWlightrag/operate.py112def _format_relation_edge_label(edge_key: tuple[str, str] | list[str]) -> str:CODE
LOWlightrag/operate.py120def _truncate_entity_identifier(CODE
LOWlightrag/operate.py160def _truncate_section_context(CODE
LOWlightrag/operate.py265async def _handle_entity_relation_summary(CODE
LOWlightrag/operate.py510def _handle_single_entity_extraction(CODE
LOWlightrag/operate.py597def _handle_single_relationship_extraction(CODE
LOWlightrag/operate.py684def _normalize_text_extraction_record_attributes(CODE
LOWlightrag/operate.py706def _looks_like_json_extraction_result(result: str) -> bool:CODE
LOWlightrag/operate.py722async def _process_json_extraction_result(CODE
LOWlightrag/operate.py916async def rebuild_knowledge_from_chunks(CODE
LOWlightrag/operate.py1100 async def _locked_rebuild_relationship(src, tgt, chunk_ids):CODE
LOWlightrag/operate.py1203async def _get_cached_extraction_results(CODE
LOWlightrag/operate.py1293async def _process_extraction_result(CODE
LOWlightrag/operate.py1424async def _rebuild_from_extraction_result(CODE
LOWlightrag/operate.py1725async def _rebuild_single_relationship(CODE
LOWlightrag/operate.py3007 async def _locked_process_entity_name(entity_name, entities):CODE
LOWlightrag/operate.py4090def _strip_markdown_code_fence(text: str) -> str:CODE
LOWlightrag/operate.py5212async def _find_most_related_edges_from_entities(CODE
LOWlightrag/operate.py5268async def _find_related_text_unit_from_entities(CODE
LOWlightrag/operate.py5486async def _find_most_related_entities_from_relationships(CODE
LOWlightrag/operate.py5519async def _find_related_text_unit_from_relations(CODE
LOWlightrag/utils.py104def _patch_ascii_colors_console_handler() -> None:CODE
LOWlightrag/utils.py144async def safe_vdb_operation_with_exception(CODE
LOWlightrag/utils.py710def serialize_llm_cache_identity(identity: Any) -> str:CODE
LOWlightrag/utils.py715def _validate_cached_response_format(response_format: Any | None) -> None:CODE
LOWlightrag/utils.py741def get_unique_filename_in_parsed(target_dir: Path, original_name: str) -> str:CODE
LOWlightrag/utils.py876def priority_limit_async_func_call(CODE
LOWlightrag/utils.py1762 async def get_aggregated_queue_stats():CODE
LOWlightrag/utils.py2238def wrap_embedding_func_with_attrs(**kwargs):CODE
LOWlightrag/utils.py2336def _sanitize_string_for_json(text: str) -> str:CODE
LOWlightrag/utils.py2576def pack_user_ass_to_openai_messages(*args: str):CODE
LOWlightrag/utils.py2583def split_string_by_multi_markers(content: str, markers: list[str]) -> list[str]:CODE
3380 more matches not shown…
Excessive Try-Catch Wrapping722 hits · 590 pts
SeverityFileLineSnippetContext
LOWreproduce/Step_1_openai_compatible.py50 except Exception as e:CODE
LOWreproduce/Step_0.py41 except Exception as e:CODE
MEDIUMreproduce/Step_0.py42 print(f"An error occurred while processing file {filename}: {e}")CODE
LOWreproduce/Step_0.py54 except Exception as e:CODE
MEDIUMreproduce/Step_0.py55 print(f"An error occurred while saving to the file {output_filename}: {e}")CODE
LOWreproduce/Step_1.py19 except Exception as e:CODE
LOWreproduce/Step_3_openai_compatible.py53 except Exception as e:CODE
MEDIUMreproduce/Step_3_openai_compatible.py49def process_query(query_text, rag_instance, query_param):CODE
LOWreproduce/Step_3.py22 except Exception as e:CODE
MEDIUMreproduce/Step_3.py18def process_query(query_text, rag_instance, query_param):CODE
LOWlightrag/rerank.py58 except Exception as e:CODE
LOWlightrag/rerank.py544 except Exception as e:CODE
LOWlightrag/rerank.py559 except Exception as e:CODE
LOWlightrag/rerank.py574 except Exception as e:CODE
LOWlightrag/llm_roles.py257 except Exception as e:CODE
LOWlightrag/llm_roles.py343 except Exception:CODE
LOWlightrag/lightrag.py14except Exception: # pragma: no cover - optional dependencyCODE
LOWlightrag/lightrag.py1385 except Exception as e:CODE
LOWlightrag/lightrag.py1630 except Exception as e:CODE
LOWlightrag/lightrag.py1733 except Exception as e:CODE
LOWlightrag/lightrag.py1737 except Exception as e:CODE
LOWlightrag/lightrag.py1755 except Exception as e:CODE
LOWlightrag/lightrag.py2092 except Exception as e:CODE
LOWlightrag/lightrag.py2513 except Exception as e:CODE
LOWlightrag/lightrag.py2618 except Exception as verification_error:CODE
LOWlightrag/lightrag.py2652 except Exception as e:CODE
LOWlightrag/lightrag.py2841 except Exception as e:CODE
LOWlightrag/lightrag.py2996 except Exception as e:CODE
LOWlightrag/lightrag.py3013 except Exception as e:CODE
LOWlightrag/lightrag.py3046 except Exception as e:CODE
LOWlightrag/lightrag.py3109 except Exception as e:CODE
LOWlightrag/lightrag.py3120 except Exception as e:CODE
LOWlightrag/lightrag.py3141 except Exception as e:CODE
LOWlightrag/lightrag.py3149 except Exception as e:CODE
LOWlightrag/lightrag.py3383 except Exception as cache_err:CODE
LOWlightrag/lightrag.py3396 except Exception as e:CODE
LOWlightrag/lightrag.py3453 except Exception as cache_collect_error:CODE
LOWlightrag/lightrag.py3472 except Exception as status_write_error:CODE
LOWlightrag/lightrag.py3552 except Exception as e:CODE
LOWlightrag/lightrag.py3730 except Exception as e:CODE
LOWlightrag/lightrag.py3751 except Exception as e:CODE
LOWlightrag/lightrag.py3789 except Exception as e:CODE
LOWlightrag/lightrag.py3886 except Exception as e:CODE
LOWlightrag/lightrag.py3896 except Exception as e:CODE
LOWlightrag/lightrag.py3919 except Exception as e:CODE
LOWlightrag/lightrag.py3957 except Exception as cache_delete_error:CODE
LOWlightrag/lightrag.py3974 except Exception as e:CODE
LOWlightrag/lightrag.py3989 except Exception as e:CODE
LOWlightrag/lightrag.py4002 except Exception as e:CODE
LOWlightrag/lightrag.py4021 except Exception as status_update_error:CODE
LOWlightrag/lightrag.py4049 except Exception as persistence_error:CODE
LOWlightrag/operate.py590 except Exception as e:CODE
LOWlightrag/operate.py677 except Exception as e:CODE
LOWlightrag/operate.py748 except Exception as e:CODE
LOWlightrag/operate.py827 except Exception as e:CODE
LOWlightrag/operate.py907 except Exception as e:CODE
LOWlightrag/operate.py1050 except Exception as e:CODE
LOWlightrag/operate.py1091 except Exception as e:CODE
LOWlightrag/operate.py1129 except Exception as e:CODE
LOWlightrag/operate.py1174 except Exception as e:CODE
662 more matches not shown…
Cross-File Repetition80 hits · 400 pts
SeverityFileLineSnippetContext
HIGHlightrag/base.py0get multiple vector data by their ids (read-your-writes), preserving order. args: ids: list of unique identifiers returnSTRING
HIGHlightrag/kg/deprecated/chroma_impl.py0get multiple vector data by their ids (read-your-writes), preserving order. args: ids: list of unique identifiers returnSTRING
HIGHlightrag/kg/nano_vector_db_impl.py0get multiple vector data by their ids (read-your-writes), preserving order. args: ids: list of unique identifiers returnSTRING
HIGHlightrag/base.py0get all edges in the graph. returns: a list of all edges, where each edge is a dictionary of its propertiesSTRING
HIGHlightrag/kg/networkx_impl.py0get all edges in the graph. returns: a list of all edges, where each edge is a dictionary of its propertiesSTRING
HIGHlightrag/kg/mongo_impl.py0get all edges in the graph. returns: a list of all edges, where each edge is a dictionary of its propertiesSTRING
HIGHlightrag/kg/memgraph_impl.py0get all edges in the graph. returns: a list of all edges, where each edge is a dictionary of its propertiesSTRING
HIGHlightrag/kg/neo4j_impl.py0get all edges in the graph. returns: a list of all edges, where each edge is a dictionary of its propertiesSTRING
HIGHlightrag/base.py0get popular labels by node degree (most connected entities) args: limit: maximum number of labels(entity names) to returSTRING
HIGHlightrag/kg/networkx_impl.py0get popular labels by node degree (most connected entities) args: limit: maximum number of labels(entity names) to returSTRING
HIGHlightrag/kg/mongo_impl.py0get popular labels by node degree (most connected entities) args: limit: maximum number of labels(entity names) to returSTRING
HIGHlightrag/kg/neo4j_impl.py0get popular labels by node degree (most connected entities) args: limit: maximum number of labels(entity names) to returSTRING
HIGHlightrag/kg/memgraph_impl.py0get popular labels by node degree (most connected entities) args: limit: maximum number of labels(entity names) to returSTRING
HIGHlightrag/base.py0search labels(entity names) with fuzzy matching args: query: search query string limit: maximum number of results to retSTRING
HIGHlightrag/kg/networkx_impl.py0search labels(entity names) with fuzzy matching args: query: search query string limit: maximum number of results to retSTRING
HIGHlightrag/kg/memgraph_impl.py0search labels(entity names) with fuzzy matching args: query: search query string limit: maximum number of results to retSTRING
HIGHlightrag/kg/qdrant_impl.py0buffered vector upsert waiting for embedding and/or bulk flush.STRING
HIGHlightrag/kg/mongo_impl.py0buffered vector upsert waiting for embedding and/or bulk flush.STRING
HIGHlightrag/kg/opensearch_impl.py0buffered vector upsert waiting for embedding and/or bulk flush.STRING
HIGHlightrag/kg/milvus_impl.py0buffered vector upsert waiting for embedding and/or bulk flush.STRING
HIGHlightrag/kg/qdrant_impl.py0discard buffered upserts/deletes (pipeline aborting on error).STRING
HIGHlightrag/kg/mongo_impl.py0discard buffered upserts/deletes (pipeline aborting on error).STRING
HIGHlightrag/kg/postgres_impl.py0discard buffered upserts/deletes (pipeline aborting on error).STRING
HIGHlightrag/kg/opensearch_impl.py0discard buffered upserts/deletes (pipeline aborting on error).STRING
HIGHlightrag/kg/milvus_impl.py0discard buffered upserts/deletes (pipeline aborting on error).STRING
HIGHlightrag/kg/qdrant_impl.py0buffer an entity vector delete by computing its hash id.STRING
HIGHlightrag/kg/mongo_impl.py0buffer an entity vector delete by computing its hash id.STRING
HIGHlightrag/kg/opensearch_impl.py0buffer an entity vector delete by computing its hash id.STRING
HIGHlightrag/kg/milvus_impl.py0buffer an entity vector delete by computing its hash id.STRING
HIGHlightrag/kg/qdrant_impl.py0get multiple vector data by their ids (read-your-writes), preserving order.STRING
HIGHlightrag/kg/mongo_impl.py0get multiple vector data by their ids (read-your-writes), preserving order.STRING
HIGHlightrag/kg/milvus_impl.py0get multiple vector data by their ids (read-your-writes), preserving order.STRING
HIGHlightrag/kg/networkx_impl.py0retrieve a connected subgraph of nodes where the label includes the specified `node_label`. args: node_label: label of tSTRING
HIGHlightrag/kg/postgres_impl.py0retrieve a connected subgraph of nodes where the label includes the specified `node_label`. args: node_label: label of tSTRING
HIGHlightrag/kg/memgraph_impl.py0retrieve a connected subgraph of nodes where the label includes the specified `node_label`. args: node_label: label of tSTRING
HIGHlightrag/kg/neo4j_impl.py0retrieve a connected subgraph of nodes where the label includes the specified `node_label`. args: node_label: label of tSTRING
HIGHlightrag/kg/networkx_impl.py0get all nodes in the graph. returns: a list of all nodes, where each node is a dictionary of its propertiesSTRING
HIGHlightrag/kg/mongo_impl.py0get all nodes in the graph. returns: a list of all nodes, where each node is a dictionary of its propertiesSTRING
HIGHlightrag/kg/postgres_impl.py0get all nodes in the graph. returns: a list of all nodes, where each node is a dictionary of its propertiesSTRING
HIGHlightrag/kg/memgraph_impl.py0get all nodes in the graph. returns: a list of all nodes, where each node is a dictionary of its propertiesSTRING
HIGHlightrag/kg/neo4j_impl.py0get all nodes in the graph. returns: a list of all nodes, where each node is a dictionary of its propertiesSTRING
HIGHlightrag/kg/mongo_impl.py0check if the storage is empty for the current workspace and namespace returns: bool: true if storage is empty, false othSTRING
HIGHlightrag/kg/postgres_impl.py0check if the storage is empty for the current workspace and namespace returns: bool: true if storage is empty, false othSTRING
HIGHlightrag/kg/redis_impl.py0check if the storage is empty for the current workspace and namespace returns: bool: true if storage is empty, false othSTRING
HIGHlightrag/kg/mongo_impl.py0get documents with pagination support args: status_filter: filter by document status, none for all statuses page: page nSTRING
HIGHlightrag/kg/postgres_impl.py0get documents with pagination support args: status_filter: filter by document status, none for all statuses page: page nSTRING
HIGHlightrag/kg/json_doc_status_impl.py0get documents with pagination support args: status_filter: filter by document status, none for all statuses page: page nSTRING
HIGHlightrag/kg/redis_impl.py0get documents with pagination support args: status_filter: filter by document status, none for all statuses page: page nSTRING
HIGHlightrag/kg/mongo_impl.py0get counts of documents in each status for all documents returns: dictionary mapping status names to counts, including 'STRING
HIGHlightrag/kg/postgres_impl.py0get counts of documents in each status for all documents returns: dictionary mapping status names to counts, including 'STRING
HIGHlightrag/kg/json_doc_status_impl.py0get counts of documents in each status for all documents returns: dictionary mapping status names to counts, including 'STRING
HIGHlightrag/kg/redis_impl.py0get counts of documents in each status for all documents returns: dictionary mapping status names to counts, including 'STRING
HIGHlightrag/kg/mongo_impl.py0get document by file path args: file_path: the file path to search for returns: union[dict[str, any], none]: document daSTRING
HIGHlightrag/kg/postgres_impl.py0get document by file path args: file_path: the file path to search for returns: union[dict[str, any], none]: document daSTRING
HIGHlightrag/kg/redis_impl.py0get document by file path args: file_path: the file path to search for returns: union[dict[str, any], none]: document daSTRING
HIGHlightrag/kg/json_doc_status_impl.py0get document by file path args: file_path: the file path to search for returns: union[dict[str, any], none]: document daSTRING
HIGHlightrag/kg/mongo_impl.py0get the total degree (sum of relationships) of two nodes. args: src_id: label of the source node tgt_id: label of the taSTRING
HIGHlightrag/kg/memgraph_impl.py0get the total degree (sum of relationships) of two nodes. args: src_id: label of the source node tgt_id: label of the taSTRING
HIGHlightrag/kg/neo4j_impl.py0get the total degree (sum of relationships) of two nodes. args: src_id: label of the source node tgt_id: label of the taSTRING
HIGHlightrag/kg/mongo_impl.py0check existence of multiple nodes in a single unwind query. args: node_ids: list of node ids to check. returns: set of nSTRING
20 more matches not shown…
Deep Nesting353 hits · 244 pts
SeverityFileLineSnippetContext
LOWreproduce/Step_0.py7CODE
LOWreproduce/Step_3_openai_compatible.py57CODE
LOWreproduce/Step_3.py26CODE
LOWlightrag/rerank.py22CODE
LOWlightrag/rerank.py116CODE
LOWlightrag/rerank.py182CODE
LOWlightrag/table_markup.py133CODE
LOWlightrag/llm_roles.py271CODE
LOWlightrag/lightrag.py965CODE
LOWlightrag/lightrag.py1356CODE
LOWlightrag/lightrag.py1832CODE
LOWlightrag/lightrag.py2387CODE
LOWlightrag/lightrag.py2738CODE
LOWlightrag/lightrag.py3157CODE
LOWlightrag/operate.py160CODE
LOWlightrag/operate.py265CODE
LOWlightrag/operate.py916CODE
LOWlightrag/operate.py1293CODE
LOWlightrag/operate.py1478CODE
LOWlightrag/operate.py1725CODE
LOWlightrag/operate.py2008CODE
LOWlightrag/operate.py2337CODE
LOWlightrag/operate.py2922CODE
LOWlightrag/operate.py3328CODE
LOWlightrag/operate.py4103CODE
LOWlightrag/operate.py4323CODE
LOWlightrag/operate.py5268CODE
LOWlightrag/operate.py5519CODE
LOWlightrag/operate.py3416CODE
LOWlightrag/utils.py144CODE
LOWlightrag/utils.py876CODE
LOWlightrag/utils.py2651CODE
LOWlightrag/utils.py2793CODE
LOWlightrag/utils.py3048CODE
LOWlightrag/utils.py4071CODE
LOWlightrag/utils.py4251CODE
LOWlightrag/utils.py4335CODE
LOWlightrag/utils.py4756CODE
LOWlightrag/utils.py923CODE
LOWlightrag/utils.py1134CODE
LOWlightrag/utils.py1233CODE
LOWlightrag/utils.py1325CODE
LOWlightrag/utils.py1477CODE
LOWlightrag/utils.py1569CODE
LOWlightrag/pipeline.py943CODE
LOWlightrag/pipeline.py1586CODE
LOWlightrag/pipeline.py1954CODE
LOWlightrag/pipeline.py2120CODE
LOWlightrag/pipeline.py3235CODE
LOWlightrag/pipeline.py3355CODE
LOWlightrag/pipeline.py4319CODE
LOWlightrag/storage_migrations.py30CODE
LOWlightrag/storage_migrations.py100CODE
LOWlightrag/storage_migrations.py197CODE
LOWlightrag/multimodal_context.py192CODE
LOWlightrag/multimodal_context.py465CODE
LOWlightrag/multimodal_context.py589CODE
LOWlightrag/utils_graph.py268CODE
LOWlightrag/utils_graph.py534CODE
LOWlightrag/utils_graph.py755CODE
293 more matches not shown…
Docstring Block Structure45 hits · 225 pts
SeverityFileLineSnippetContext
HIGHlightrag/lightrag.py173Drive an async coroutine to completion from a synchronous wrapper. The synchronous wrappers (``insert``, ``query``,STRING
HIGHlightrag/utils.py2087 Execute function with enhanced priority-based concurrency control and timeout handling Args: STRING
HIGHlightrag/utils.py4996Validate a workspace name used to build per-workspace directories. File-based storages place their data in a subdirSTRING
HIGHlightrag/pipeline.py250 Pipeline for Processing Documents 1. Validate ids if provided or generate MD5 hash IDs and remove duplSTRING
HIGHlightrag/tools/clean_llm_query_cache.py250Initialize storage instance with fallback to config.ini and defaults Args: storage_name: Storage imSTRING
HIGHlightrag/tools/migrate_llm_cache.py263Initialize storage instance with fallback to config.ini and defaults Args: storage_name: Storage imSTRING
HIGHlightrag/llm/jina.py85Generate embeddings for a list of texts using Jina AI's API. Args: texts: List of texts to embed. mSTRING
HIGHlightrag/llm/voyageai.py61Generate embeddings for a list of texts using VoyageAI's API. Args: texts: List of texts to embed. STRING
HIGHlightrag/llm/gemini.py302 Complete a prompt using Gemini's API with Chain of Thought (COT) support. This function supports automatic intSTRING
HIGHlightrag/llm/gemini.py624Generate embeddings for a list of texts using Gemini's API. This function uses Google's Gemini embedding model to gSTRING
HIGHlightrag/llm/openai.py259Complete a prompt using OpenAI's API with caching support and Chain of Thought (COT) integration. This function supSTRING
HIGHlightrag/llm/openai.py956Generate embeddings for a list of texts using OpenAI's API with automatic text truncation. This function supports bSTRING
HIGHlightrag/parser/docx/utils.py94 Create Gemini client for AI Studio or Vertex AI. Supports two modes: - AI Studio (default): Uses GOOGLE_APSTRING
HIGHlightrag/parser/docx/utils.py171 Create OpenAI client with optional custom base URL. Environment variables: - OPENAI_API_KEY: Required API STRING
HIGHlightrag/parser/docx/table_extractor.py250 Extract table to 2D string array with metadata (paraIds, header info). Vertical merge behavior: STRING
HIGHlightrag/kg/postgres_impl.py665 Execute a database operation with automatic retry for transient failures. Args: operation:STRING
HIGHlightrag/kg/memgraph_impl.py135 Check if a node exists in the graph. Args: node_id: The ID of the node to check. STRING
HIGHlightrag/kg/memgraph_impl.py175 Check if an edge exists between two nodes in the graph. Args: source_node_id: The ID of thSTRING
HIGHlightrag/kg/memgraph_impl.py223Get node by its label identifier, return only node properties Args: node_id: The node label to lookSTRING
HIGHlightrag/kg/memgraph_impl.py278Get the degree (number of relationships) of a node with the given label. If multiple nodes have the same label, STRING
HIGHlightrag/kg/memgraph_impl.py365Retrieves all edges (relationships) for a particular node identified by its label. Args: source_nodSTRING
HIGHlightrag/kg/memgraph_impl.py431Get edge properties between two nodes. Args: source_node_id: Label of the source node tSTRING
HIGHlightrag/kg/neo4j_impl.py476 Check if a node with the given label exists in the database Args: node_id: Label of the noSTRING
HIGHlightrag/kg/neo4j_impl.py510 Check if an edge exists between two nodes Args: source_node_id: Label of the source node STRING
HIGHlightrag/kg/neo4j_impl.py552Get node by its label identifier, return only node properties Args: node_id: The node label to lookSTRING
HIGHlightrag/kg/neo4j_impl.py643Get the degree (number of relationships) of a node with the given label. If multiple nodes have the same label, STRING
HIGHlightrag/kg/neo4j_impl.py780Get edge properties between two nodes. Args: source_node_id: Label of the source node tSTRING
HIGHlightrag/kg/neo4j_impl.py917Retrieves all edges (relationships) for a particular node identified by its label. Args: source_nodSTRING
HIGHlightrag/api/auth.py121 Validate JWT token Args: token: JWT token Returns: dict: Dictionary cSTRING
HIGHlightrag/api/routers/graph_routes.py738 Delete an entity and all its relationships from the knowledge graph. Args: request (DeleteSTRING
HIGHlightrag/api/routers/graph_routes.py774 Delete a relationship between two entities from the knowledge graph. Args: request (DeleteSTRING
HIGHlightrag/api/routers/query_routes.py330 Comprehensive RAG query endpoint with non-streaming response. Parameter "stream" is ignored. **Query MSTRING
HIGHlightrag/api/routers/query_routes.py600 Advanced RAG query endpoint with flexible streaming response. This endpoint provides the most flexibleSTRING
HIGHlightrag/api/routers/query_routes.py1052 Advanced data retrieval endpoint for structured RAG analysis. This endpoint provides raw retrieval resSTRING
HIGHlightrag/api/routers/document_routes.py119 Sanitize uploaded filename to prevent Path Traversal attacks. Args: filename: The original filename frSTRING
HIGHlightrag/api/routers/document_routes.py2591 Upload a file to the input directory and index it. This API endpoint accepts a file through an HTTP POSTRING
HIGHlightrag/api/routers/document_routes.py2840 Insert text into the RAG system. This endpoint allows you to insert text data into the RAG system for STRING
HIGHlightrag/api/routers/document_routes.py2944 Insert multiple texts into the RAG system. This endpoint allows you to insert multiple text entries inSTRING
HIGHlightrag/api/routers/document_routes.py3506 Delete documents and all their associated data by their IDs using background processing. Deletes speciSTRING
HIGHlightrag/api/routers/document_routes.py3596 Clear all cache data from the LLM response cache storage. This endpoint clears all cached LLM responseSTRING
HIGHlightrag/api/routers/document_routes.py3630 Get the processing status of documents by tracking ID. This endpoint retrieves all documents associateSTRING
HIGHlightrag/api/routers/document_routes.py3706 Get documents with pagination support. This endpoint retrieves documents with pagination, filtering, aSTRING
HIGHlightrag/evaluation/eval_rag_quality.py295 Generate RAG response by calling LightRAG API. Args: question: The user query. STRING
HIGHlightrag/chunker/paragraph_semantic.py2044Paragraph Semantic Chunking — the ``chunking="P"`` strategy. Reads structured blocks from a ``.blocks.jsonl`` sidecSTRING
HIGHtests/api/test_lightrag_ollama_chat.py147Send an HTTP request with retry mechanism Args: url: Request URL data: Request data stream: STRING
Redundant / Tautological Comments148 hits · 219 pts
SeverityFileLineSnippetContext
LOWdocker-build-push.sh38# Check if buildx builder exists, create if notCOMMENT
LOWlightrag/lightrag.py2482 # Check if query_result is NoneCOMMENT
LOWlightrag/operate.py1162 # Check if any task raised an exception and ensure all exceptions are retrievedCOMMENT
LOWlightrag/operate.py2560 # Check if this is a placeholder recordCOMMENT
LOWlightrag/operate.py3358 # Check if JSON structured output mode is enabledCOMMENT
LOWlightrag/operate.py3756 # Check if any task raised an exception and ensure all exceptions are retrievedCOMMENT
LOWlightrag/operate.py4030 # Check if pre-defined keywords are already providedCOMMENT
LOWlightrag/operate.py5612 # Check if any relations still have chunks after deduplicationCOMMENT
LOWlightrag/utils.py380 # Check if record has the required attributes for an access logCOMMENT
LOWlightrag/utils.py557 # Check if func is already an EmbeddingFunc instance and unwrap itCOMMENT
LOWlightrag/utils.py580 # Check if user provided embedding_dim parameterCOMMENT
LOWlightrag/utils.py604 # Check if underlying function supports max_token_size and inject if not providedCOMMENT
LOWlightrag/utils.py617 # Check if total elements can be evenly divided by embedding_dimCOMMENT
LOWlightrag/utils.py1262 # Check if task was cancelled before worker startedCOMMENT
LOWlightrag/utils.py2944 # Check if we already have identical content cachedCOMMENT
LOWlightrag/utils.py4056 # Check if there are still unused chunksCOMMENT
LOWlightrag/utils.py4304 # Check if results are in the new index-based formatCOMMENT
LOWlightrag/pipeline.py1368 # Check if corresponding content exists in full_docsCOMMENT
LOWlightrag/pipeline.py1371 # Check if this is a failed document that should be preservedCOMMENT
LOWlightrag/pipeline.py1458 # Check if document has corresponding content in full_docs (consistency check)COMMENT
LOWlightrag/storage_migrations.py34 # Check if migration is needed:COMMENT
LOWlightrag/storage_migrations.py54 # Check if full_entities and full_relations are emptyCOMMENT
LOWlightrag/utils_graph.py103 # Check if the entity existsCOMMENT
LOWlightrag/utils_graph.py204 # Check if the relation existsCOMMENT
LOWlightrag/utils_graph.py867 # Check if storage has existing dataCOMMENT
LOWlightrag/utils_graph.py981 # Check if entity already existsCOMMENT
LOWlightrag/utils_graph.py1100 # Check if both entities existCOMMENT
LOWlightrag/utils_graph.py1109 # Check if relation already existsCOMMENT
LOWlightrag/base.py251 # Check if model_name exists (model_name is optional in EmbeddingFunc)COMMENT
LOWlightrag/tools/clean_llm_query_cache.py205 # Check if config.ini has configurationCOMMENT
LOWlightrag/tools/clean_llm_query_cache.py969 # Check if choice is validCOMMENT
LOWlightrag/tools/clean_llm_query_cache.py1067 # Check if user cancelledCOMMENT
LOWlightrag/tools/clean_llm_query_cache.py1129 # Check if there are any records to deleteCOMMENT
LOWlightrag/tools/download_cache.py131 # Check if TIKTOKEN_CACHE_DIR is already set in environmentCOMMENT
LOWlightrag/tools/check_initialization.py101 # Print resultsCOMMENT
LOWlightrag/tools/prepare_qdrant_legacy_data.py548 # Print resultCOMMENT
LOWlightrag/tools/migrate_llm_cache.py211 # Check if storage requires configurationCOMMENT
LOWlightrag/tools/migrate_llm_cache.py218 # Check if has environment variablesCOMMENT
LOWlightrag/tools/migrate_llm_cache.py223 # Check if has config.ini configurationCOMMENT
LOWlightrag/tools/migrate_llm_cache.py190 # Check if config.ini has configurationCOMMENT
LOWlightrag/tools/migrate_llm_cache.py1060 # Check if choice is validCOMMENT
LOWlightrag/tools/migrate_llm_cache.py1429 # Check if user cancelled (setup_storage returns None for all fields)COMMENT
LOWlightrag/tools/migrate_llm_cache.py1433 # Check if there are at least 2 storage types availableCOMMENT
LOWlightrag/tools/lightrag_visualizer/graph_visualizer.py920 # Check if node is behind cameraCOMMENT
LOWlightrag/llm/jina.py28 # Check if the error response is HTML (common for 502, 503, etc.)COMMENT
LOWlightrag/llm/gemini.py258 # Check if this part is thought content using the 'thought' attributeCOMMENT
LOWlightrag/llm/binding_options.py213 # Check if this is a dataclass and use dataclass fieldsCOMMENT
LOWlightrag/llm/openai.py517 # Check if this chunk has usage information (final chunk)COMMENT
LOWlightrag/llm/openai.py524 # Check if choices exists and is not emptyCOMMENT
LOWlightrag/llm/openai.py532 # Check if delta existsCOMMENT
LOWlightrag/llm/openai.py47 # Check if required Langfuse environment variables are setCOMMENT
LOWlightrag/llm/openai.py715 # Check if we should include reasoning contentCOMMENT
LOWlightrag/parser/docx/utils.py361 # Check if it mentions billing which indicates permanent quota issueCOMMENT
LOWlightrag/kg/qdrant_impl.py322 # Check if legacy collection has workspace_id to determine migration strategyCOMMENT
LOWlightrag/kg/qdrant_impl.py433 # Check if we've reached the endCOMMENT
LOWlightrag/kg/networkx_impl.py209 # Check if data needs to be reloadedCOMMENT
LOWlightrag/kg/networkx_impl.py524 # Check if graph is truncatedCOMMENT
LOWlightrag/kg/networkx_impl.py535 # Check if node existsCOMMENT
LOWlightrag/kg/networkx_impl.py578 # Add neighbors to the queue with their degreesCOMMENT
LOWlightrag/kg/networkx_impl.py583 # Check if there are unexplored neighbors (skipped due to depth limit)COMMENT
88 more matches not shown…
Unused Imports227 hits · 206 pts
SeverityFileLineSnippetContext
LOWlightrag/rerank.py1CODE
LOWlightrag/file_atomic.py29CODE
LOWlightrag/addon_params.py15CODE
LOWlightrag/table_markup.py17CODE
LOWlightrag/llm_roles.py11CODE
LOWlightrag/lightrag.py1CODE
LOWlightrag/lightrag.py147CODE
LOWlightrag/__init__.py3CODE
LOWlightrag/types.py1CODE
LOWlightrag/operate.py1CODE
LOWlightrag/utils.py1CODE
LOWlightrag/utils.py308CODE
LOWlightrag/utils.py308CODE
LOWlightrag/utils.py308CODE
LOWlightrag/pipeline.py12CODE
LOWlightrag/pipeline.py77CODE
LOWlightrag/pipeline.py77CODE
LOWlightrag/storage_migrations.py13CODE
LOWlightrag/exceptions.py1CODE
LOWlightrag/multimodal_context.py64CODE
LOWlightrag/utils_graph.py1CODE
LOWlightrag/prompt.py1CODE
LOWlightrag/utils_pipeline.py10CODE
LOWlightrag/namespace.py1CODE
LOWlightrag/chunk_schema.py24CODE
LOWlightrag/base.py1CODE
LOWlightrag/prompt_multimodal.py31CODE
LOWlightrag/llm/gemini.py10CODE
LOWlightrag/llm/_vision_utils.py20CODE
LOWlightrag/llm/azure_openai.py12CODE
LOWlightrag/llm/azure_openai.py12CODE
LOWlightrag/llm/azure_openai.py12CODE
LOWlightrag/parser/plugins.py25CODE
LOWlightrag/parser/param_schema.py30CODE
LOWlightrag/parser/native_dispatch.py16CODE
LOWlightrag/parser/registry.py16CODE
LOWlightrag/parser/registry.py31CODE
LOWlightrag/parser/_html_table.py13CODE
LOWlightrag/parser/llm_bridge.py17CODE
LOWlightrag/parser/cli.py20CODE
LOWlightrag/parser/_markdown.py10CODE
LOWlightrag/parser/routing.py1CODE
LOWlightrag/parser/debug.py17CODE
LOWlightrag/parser/noop.py18CODE
LOWlightrag/parser/native_base.py15CODE
LOWlightrag/parser/native_base.py33CODE
LOWlightrag/parser/base.py22CODE
LOWlightrag/parser/base.py31CODE
LOWlightrag/parser/markdown/ir_builder.py20CODE
LOWlightrag/parser/markdown/ir_builder.py23CODE
LOWlightrag/parser/markdown/parser.py24CODE
LOWlightrag/parser/markdown/parser.py54CODE
LOWlightrag/parser/markdown/raw_cache.py22CODE
LOWlightrag/parser/markdown/extract.py32CODE
LOWlightrag/parser/legacy/extractors.py10CODE
LOWlightrag/parser/legacy/__init__.py9CODE
LOWlightrag/parser/legacy/__init__.py9CODE
LOWlightrag/parser/legacy/parser.py3CODE
LOWlightrag/parser/external/_manifest.py18CODE
LOWlightrag/parser/external/_base.py18CODE
167 more matches not shown…
Modern AI Meta-Vocabulary63 hits · 200 pts
SeverityFileLineSnippetContext
MEDIUMREADME-ja.md7# 🚀 LightRAG: シンプルかつ高速な検索拡張生成(RAG)COMMENT
MEDIUMREADME-ja.md241### 軽量なグラフベース RAG フレームワークCOMMENT
MEDIUMREADME.md241### A Lightweight, Graph-Based RAG FrameworkCOMMENT
MEDIUMREADME-zh.md7# 🚀 LightRAG: 简单且快速的检索增强生成(RAG)框架COMMENT
MEDIUMreproduce/Step_1_openai_compatible.py77 # Initialize RAG instanceCOMMENT
MEDIUMreproduce/Step_1.py42 # Initialize RAG instanceCOMMENT
MEDIUMlightrag/constants.py41# pushing an otherwise-valid chunk past the provider context window; over budgetCOMMENT
MEDIUMlightrag/operate.py3439 # an otherwise-valid chunk past the provider context window. When theCOMMENT
MEDIUMlightrag/pipeline.py1156 # Pipeline orchestrationCOMMENT
MEDIUMlightrag/pipeline.py3940 # it for their model's context window.COMMENT
MEDIUMlightrag/tools/download_cache.py158 "text-embedding-ada-002", # Legacy embedding modelCODE
MEDIUMlightrag/tools/download_cache.py159 "text-embedding-3-small", # Small embedding modelCODE
MEDIUMlightrag/tools/download_cache.py160 "text-embedding-3-large", # Large embedding modelCODE
MEDIUMlightrag/parser/docx/parse_document.py1161 # --- smart path (pipeline + landing guardrails) ---------------COMMENT
MEDIUMlightrag/parser/docx/parse_document.py1181 # Landing guardrails: any violation abandons the smart output for THISCOMMENT
MEDIUMlightrag/parser/docx/parse_document.py1235 # three counts come from guardrails.plan_toc_output — the single visibilityCOMMENT
MEDIUMlightrag/parser/docx/smart_heading/heading_flow.py2483# whole-document orchestrationCOMMENT
MEDIUMlightrag/parser/docx/smart_heading/guardrails.py521# Landing guardrails: canonicalization, I1/I2/I3 machine checks, TOCCOMMENT
MEDIUMlightrag/parser/docx/smart_heading/guardrails.py246 # dependency parser hallucinates sentence boundaries mid-word on shortCOMMENT
MEDIUMlightrag/parser/docx/smart_heading/title_block.py963 # candidate reuses single=True judge semantics (± context window; aCOMMENT
MEDIUMlightrag/kg/mongo_impl.py3054 # built under a *different* embedding model must NOT beCOMMENT
MEDIUMlightrag/kg/postgres_impl.py1747 # with proper embedding model and dimension suffix for data isolationSTRING
MEDIUMlightrag/kg/faiss_impl.py779 # check is always True — it's kept as defensive scaffolding so thatCOMMENT
MEDIUMlightrag/api/config.py286 # RAG configurationCOMMENT
MEDIUMlightrag/api/utils_api.py453 # RAG ConfigurationSTRING
MEDIUMlightrag/api/lightrag_server.py2041 # Initialize RAG with unified configurationCOMMENT
MEDIUMlightrag/api/lightrag_server.py2363 # embedding model configuration binding/host address (if applicable)/model (if applicable)COMMENT
MEDIUMlightrag/evaluation/eval_rag_quality.py19 # Specify custom RAG endpointSTRING
MEDIUMlightrag/evaluation/eval_rag_quality.py419 # all RAG responses from being generated at once when eval is slowCOMMENT
MEDIUMlightrag/evaluation/eval_rag_quality.py424 # Stage 1: Generate RAG responseCOMMENT
MEDIUMlightrag/evaluation/eval_rag_quality.py572 # Stage 1: RAG generation - allow x2 concurrency to keep evaluation fedCOMMENT
MEDIUMlightrag/evaluation/eval_rag_quality.py598 max_connections=(max_async + 1) * 2, # Allow buffer for RAG stageCODE
MEDIUMlightrag/evaluation/eval_rag_quality.py976 # Specify custom RAG endpointCOMMENT
MEDIUM…ation/sample_documents/05_evaluation_and_deployment.md1# RAG Evaluation Metrics and DeploymentCOMMENT
MEDIUM…ation/sample_documents/05_evaluation_and_deployment.md3## Key RAG Evaluation MetricsCOMMENT
MEDIUM…rag/evaluation/sample_documents/02_rag_architecture.md1# RAG System ArchitectureCOMMENT
MEDIUM…rag/evaluation/sample_documents/02_rag_architecture.md3## Main Components of RAG SystemsCOMMENT
MEDIUM…valuation/sample_documents/03_lightrag_improvements.md1# LightRAG Improvements Over Traditional RAGCOMMENT
MEDIUMtests/workspace/test_workspace_isolation.py547 # Purpose: Validate guardrails for workspace normalization and namespaceCOMMENT
MEDIUMtests/workspace/test_workspace_isolation.py1061 # Test 11.2: Insert different data to each RAG instance (CONCURRENTLY)COMMENT
MEDIUMtests/parser/docx/test_smart_heading_flow.py2842# These tests use the REAL guardrails.strong_body_reason: every record eitherCOMMENT
MEDIUMtests/kg/qdrant_impl/test_qdrant_migration.py214 # Use a large embedding modelCOMMENT
MEDIUMtests/api/routes/test_graph_routes_pipeline_busy.py49# Test scaffoldingCOMMENT
MEDIUMdocs/ProgramingWithCore.md32 # Initialize RAG instanceCOMMENT
MEDIUMdocs/DockerDeployment.md112├── rag_storage/ # RAG data persistenceCODE
MEDIUMexamples/lightrag_gemini_postgres_demo.py102# Initialize RAG with PostgreSQL storagesCOMMENT
MEDIUMexamples/lightrag_gemini_demo.py74# Initialize RAGCOMMENT
MEDIUMexamples/lightrag_openai_compatible_demo.py150 # Initialize RAG instanceCOMMENT
MEDIUMexamples/lightrag_vllm_demo.py106# Initialize RAGCOMMENT
MEDIUMexamples/lightrag_openai_mongodb_graph_demo.py72 # Initialize RAG instanceCOMMENT
MEDIUMexamples/lightrag_openai_demo.py119 # Initialize RAG instanceCOMMENT
MEDIUMexamples/lightrag_openai_opensearch_graph_demo.py89# Initialize RAG with OpenSearch storagesCOMMENT
MEDIUMexamples/lightrag_ollama_demo.py139 # Initialize RAG instanceCOMMENT
MEDIUM…mples/unofficial-sample/lightrag_embedding_prefixes.py156 # Initialize RAG instanceCOMMENT
MEDIUM…/unofficial-sample/lightrag_llamaindex_litellm_demo.py103 # Initialize RAG instanceCOMMENT
MEDIUM…cial-sample/lightrag_openai_neo4j_milvus_redis_demo.py73 # Initialize RAG instanceCOMMENT
MEDIUM…s/unofficial-sample/lightrag_llamaindex_direct_demo.py101 # Initialize RAG instanceCOMMENT
MEDIUM…ficial-sample/lightrag_llamaindex_litellm_opik_demo.py114 # Initialize RAG instanceCOMMENT
MEDIUMexamples/unofficial-sample/lightrag_cloudflare_demo.py27# choose an embedding modelCOMMENT
MEDIUMexamples/unofficial-sample/lightrag_cloudflare_demo.py251 # Initialize RAG instanceCOMMENT
3 more matches not shown…
Magic Placeholder Names37 hits · 195 pts
SeverityFileLineSnippetContext
HIGHtests/setup/test_misc.py297 "LLM_BINDING_API_KEY=your_api_key",STRING
HIGHtests/setup/test_misc.py302 "EMBEDDING_BINDING_API_KEY=your_api_key",STRING
HIGHdocs/LightRAG-API-Server.md118LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/LightRAG-API-Server.md124# EMBEDDING_BINDING_API_KEY=your_api_keyCOMMENT
HIGHdocs/LightRAG-API-Server.md135# LLM_BINDING_API_KEY=your_api_keyCOMMENT
HIGHdocs/LightRAG-API-Server.md143# EMBEDDING_BINDING_API_KEY=your_api_keyCOMMENT
HIGHdocs/LightRAG-API-Server.md265LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/LightRAG-API-Server.md276EMBEDDING_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/LightRAG-API-Server.md761LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/LightRAG-API-Server.md1014LLM_BINDING_API_KEY=your-api-keyCODE
HIGHdocs/FileProcessingPipeline.md307 "api_key": "your_api_key",CODE
HIGHdocs/ProgramingWithCore.md852export OPENAI_API_KEY=your-api-keyCODE
HIGHdocs/ProgramingWithCore.md866OPENAI_API_KEY=your-api-key \CODE
HIGHdocs/FileProcessingPipeline-zh.md307 "api_key": "your_api_key",CODE
HIGHdocs/RoleSpecificLLMConfiguration-zh.md26LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/RoleSpecificLLMConfiguration-zh.md122LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/RoleSpecificLLMConfiguration-zh.md203LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/RoleSpecificLLMConfiguration-zh.md220LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/RoleSpecificLLMConfiguration-zh.md333LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/LightRAG-API-Server-zh.md118LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/LightRAG-API-Server-zh.md124# EMBEDDING_BINDING_API_KEY=your_api_keyCOMMENT
HIGHdocs/LightRAG-API-Server-zh.md135# LLM_BINDING_API_KEY=your_api_keyCOMMENT
HIGHdocs/LightRAG-API-Server-zh.md143# EMBEDDING_BINDING_API_KEY=your_api_keyCOMMENT
HIGHdocs/LightRAG-API-Server-zh.md265LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/LightRAG-API-Server-zh.md276EMBEDDING_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/LightRAG-API-Server-zh.md761LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/LightRAG-API-Server-zh.md1014LLM_BINDING_API_KEY=your-api-keyCODE
HIGHdocs/RoleSpecificLLMConfiguration.md26LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/RoleSpecificLLMConfiguration.md122LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/RoleSpecificLLMConfiguration.md203LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/RoleSpecificLLMConfiguration.md220LLM_BINDING_API_KEY=your_api_keyCODE
HIGHdocs/RoleSpecificLLMConfiguration.md333LLM_BINDING_API_KEY=your_api_keyCODE
HIGHexamples/lightrag_gemini_postgres_demo.py28 GEMINI_API_KEY=your-api-keySTRING
HIGHexamples/lightrag_gemini_demo.py37 "Please set it with: export GEMINI_API_KEY='your-api-key'"CODE
HIGHexamples/lightrag_openai_opensearch_graph_demo.py23 OPENAI_API_KEY=your-api-keySTRING
HIGH…s/unofficial-sample/lightrag_llamaindex_direct_demo.py29OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY", "your-api-key-here")CODE
HIGHexamples/unofficial-sample/lightrag_cloudflare_demo.py20cloudflare_api_key = "YOUR_API_KEY"CODE
Self-Referential Comments49 hits · 146 pts
SeverityFileLineSnippetContext
MEDIUMreproduce/Step_1_openai_compatible.py77 # Initialize RAG instanceCOMMENT
MEDIUMreproduce/Step_1.py42 # Initialize RAG instanceCOMMENT
MEDIUMlightrag/lightrag.py1082 # Create a NEW EmbeddingFunc instance with the wrapped func to avoid mutating the caller's objectCOMMENT
MEDIUMlightrag/lightrag.py2294 # Create a copy of param to avoid modifying the originalCOMMENT
MEDIUMlightrag/operate.py5824 # Create a preliminary system prompt with empty content_data to calculate overheadCOMMENT
MEDIUMlightrag/utils.py4958 # Create a list of (file_path, count, first_index) tuplesCOMMENT
MEDIUMlightrag/pipeline.py764 # Create a new record with unique ID for this duplicate attemptCOMMENT
MEDIUMlightrag/tools/migrate_llm_cache.py701 # Create a snapshot of matching items while holding the lockCOMMENT
MEDIUMlightrag/llm/openai.py173 # Create a merged config dict with precedence: explicit params > client_configsCOMMENT
MEDIUMlightrag/llm/openai.py205 # Create a merged config dict with precedence: explicit params > client_configs > defaultsCOMMENT
MEDIUMlightrag/llm/openai.py375 # Create the OpenAI client (supports both OpenAI and Azure)COMMENT
MEDIUMlightrag/llm/openai.py1040 # Create the OpenAI client (supports both OpenAI and Azure)COMMENT
MEDIUMlightrag/llm/bedrock.py320 # Create a session that will be used throughout the streaming processCOMMENT
MEDIUMlightrag/llm/bedrock.py330 # Define the generator function that will manage the client lifecycleCOMMENT
MEDIUMlightrag/kg/mongo_impl.py2803 # Create the improved search index (async, no waiting)COMMENT
MEDIUMlightrag/kg/mongo_impl.py444 # Create a copy of v for $set operation, excluding create_time to avoid conflictsCOMMENT
MEDIUMlightrag/kg/mongo_impl.py3205 # Define the aggregation pipeline with the converted query vectorCOMMENT
MEDIUMlightrag/kg/postgres_impl.py1604 # Define the field changes neededCOMMENT
MEDIUMlightrag/kg/faiss_impl.py236 # Create an empty Faiss index for inner product (useful for normalized vectors = cosine similarity).COMMENT
MEDIUMlightrag/kg/shared_storage.py24# Define a direct print function for critical logs that must be visible in all processesCOMMENT
MEDIUMlightrag/kg/shared_storage.py1395 # Create a shared list object for history_messagesCOMMENT
MEDIUMlightrag/kg/shared_storage.py1467 # Create a simple mutable object to store boolean value for compatibility with mutiprocessCOMMENT
MEDIUMlightrag/kg/json_kv_impl.py256 # Create a copy to avoid modifying the original dataCOMMENT
MEDIUMlightrag/kg/json_kv_impl.py271 # Create a copy to avoid modifying the original dataCOMMENT
MEDIUMlightrag/api/run_with_gunicorn.py147 # Define a custom application class that loads our configCOMMENT
MEDIUMlightrag/api/run_with_gunicorn.py277 # Create the applicationCOMMENT
MEDIUMlightrag/api/lightrag_server.py974 # Create the EmbeddingFunc instance (now returns complete EmbeddingFunc with max_token_size)COMMENT
MEDIUMlightrag/api/routers/ollama_api.py150 # Create an instance of the modelCOMMENT
MEDIUMlightrag/api/routers/query_routes.py427 # Create a mapping from reference_id to chunk contentCOMMENT
MEDIUMtests/kg/test_graph_storage.py108 # Initialize the storage instanceCOMMENT
MEDIUMtests/kg/test_graph_storage.py1666 # Initialize storage instanceSTRING
MEDIUMtests/kg/postgres_impl/test_postgres_index_name.py84 # Create a table name that results in exactly 63 bytesCOMMENT
MEDIUMtests/api/auth/test_token_auto_renewal.py16# Create a simple token renewal cache for testingCOMMENT
MEDIUMtests/api/auth/test_token_auto_renewal.py323 # Create a mock JWT payloadCOMMENT
MEDIUMtests/chunker/test_rerank_chunking.py39 # Create a very long document that exceeds character limitCOMMENT
MEDIUMexamples/graph_visual_with_html.py15# Create a Pyvis networkCOMMENT
MEDIUMexamples/lightrag_openai_compatible_demo.py150 # Initialize RAG instanceCOMMENT
MEDIUMexamples/lightrag_openai_mongodb_graph_demo.py72 # Initialize RAG instanceCOMMENT
MEDIUMexamples/lightrag_openai_demo.py119 # Initialize RAG instanceCOMMENT
MEDIUMexamples/lightrag_ollama_demo.py139 # Initialize RAG instanceCOMMENT
MEDIUMexamples/graph_visual_with_neo4j.py159 # Create a Neo4j driverSTRING
MEDIUM…mples/unofficial-sample/lightrag_embedding_prefixes.py156 # Initialize RAG instanceCOMMENT
MEDIUM…/unofficial-sample/lightrag_llamaindex_litellm_demo.py103 # Initialize RAG instanceCOMMENT
MEDIUM…cial-sample/lightrag_openai_neo4j_milvus_redis_demo.py73 # Initialize RAG instanceCOMMENT
MEDIUM…s/unofficial-sample/lightrag_llamaindex_direct_demo.py101 # Initialize RAG instanceCOMMENT
MEDIUM…ficial-sample/lightrag_llamaindex_litellm_opik_demo.py114 # Initialize RAG instanceCOMMENT
MEDIUMexamples/unofficial-sample/lightrag_cloudflare_demo.py251 # Initialize RAG instanceCOMMENT
MEDIUMexamples/unofficial-sample/lightrag_lmdeploy_demo.py69 # Initialize RAG instanceCOMMENT
MEDIUMexamples/unofficial-sample/lightrag_nvidia_demo.py123 # Initialize RAG instanceCOMMENT
Over-Commented Block126 hits · 92 pts
SeverityFileLineSnippetContext
LOWdocker-compose.podman.yml1# Podman-compatible compose file for LightRAGCOMMENT
LOWREADME-ja.md161make devCOMMENT
LOWREADME.md161make devCOMMENT
LOWdocker-entrypoint.sh1#!/bin/shCOMMENT
LOWdocker-entrypoint.sh21 # process can read/write them, covering bind-mounts/PVCs whose host contentCOMMENT
LOWrequirements-offline-smart-heading.txt1# LightRAG Offline Dependencies - Native docx smart_heading (optional)COMMENT
LOWREADME-zh.md161make devCOMMENT
LOWlightrag/lightrag.py841 # P-specific chunk_token_size backfill — P does NOT inherit theCOMMENT
LOWlightrag/lightrag.py861 )COMMENT
LOWlightrag/constants.py81# Field length of file_path in Milvus Schema for entity and relation (Should not be changed)COMMENT
LOWlightrag/constants.py121COMMENT
LOWlightrag/constants.py141COMMENT
LOWlightrag/constants.py161DEFAULT_DOCX_SMART_ENNUM_BLACKLIST = (COMMENT
LOWlightrag/constants.py181# (印发:XX / 印发 XX / 印发机关 XX / 印发机关:XX — 印发机关 is a closer, NOT anCOMMENT
LOWlightrag/constants.py201# the effective threshold. The threshold is baseline-aware — a document with aCOMMENT
LOWlightrag/constants.py221DEFAULT_DOCX_SMART_MIN_TOKENS = 1800COMMENT
LOWlightrag/constants.py241# Open numbering series: close a series after this many consecutive bodyCOMMENT
LOWlightrag/constants.py261)COMMENT
LOWlightrag/constants.py341# Per-engine parsing concurrency defaults. mineru / docling areCOMMENT
LOWlightrag/constants.py361# Query stage (interactive: query/keyword LLM calls and query-time embeddings)COMMENT
LOWlightrag/constants.py401DEFAULT_RERANK_MAX_ASYNC = DEFAULT_MAX_ASYNCCOMMENT
LOWlightrag/constants.py421# keep occupying the favored seat (which would push every live waiter ontoCOMMENT
LOWlightrag/operate.py3421 Returns:COMMENT
LOWlightrag/utils.py981 max_queue_size if max_queue_size > 0 else 0,COMMENT
LOWlightrag/utils.py3881# LLMs emitting LaTeX inside JSON strings routinely under-escape backslashes:COMMENT
LOWlightrag/utils.py4781 if not found_str:COMMENT
LOWlightrag/pipeline.py321 # batch and sets ``request_pending`` whenever new work arrivesCOMMENT
LOWlightrag/pipeline.py641 #COMMENT
LOWlightrag/pipeline.py1001 # the same critical section that observed request_pending=False.COMMENT
LOWlightrag/pipeline.py1121 # If the loop already released ``busy`` under the atomic exitCOMMENT
LOWlightrag/pipeline.py1281 # an escape here would orphan the workers — they keep draining the queues andCOMMENT
LOWlightrag/pipeline.py1441 # survives into the PENDING wait window (where the WebUI would renderCOMMENT
LOWlightrag/pipeline.py1641 # is rewritten — would no longer resolve the hintedCOMMENT
LOWlightrag/pipeline.py1801 # below (before the doc enters q_analyze) so doc_statusCOMMENT
LOWlightrag/pipeline.py2001 doc_id=doc_id_w,COMMENT
LOWlightrag/pipeline.py2201 # The parsed body is no longer carried through q_analyze /COMMENT
LOWlightrag/pipeline.py2221 await self._purge_stale_extraction_if_resuming(COMMENT
LOWlightrag/pipeline.py2241 # with its legacy 6-arg signature so existingCOMMENT
LOWlightrag/pipeline.py2361 chunking_result = chunking_by_fixed_token(COMMENT
LOWlightrag/pipeline.py2521 # hard split actually occurred, so its presenceCOMMENT
LOWlightrag/pipeline.py4201 # Fail-fast polling loop. Three trigger paths:COMMENT
LOWlightrag/utils_pipeline.py201# alongside the document record after PROCESSED.COMMENT
LOWlightrag/utils_pipeline.py221# attempted but bailed".COMMENT
LOWlightrag/llm/binding_options.py41# - Handles default values and type information for each parameterCOMMENT
LOWlightrag/llm/binding_options.py421# =============================================================================COMMENT
LOWlightrag/llm/binding_options.py661COMMENT
LOWlightrag/llm/openai.py461 except BadRequestError as e:COMMENT
LOWlightrag/parser/routing.py241# F/R/V/P selector in ``ProcessOptions``. ``process_options`` choosesCOMMENT
LOWlightrag/parser/routing.py441 # rather than letting the dispatcher fall back to the globalCOMMENT
LOWlightrag/parser/external/docling/cache.py41from lightrag.parser.external.docling import MANIFEST_ENGINECOMMENT
LOWlightrag/parser/external/docling/cache.py201 # Compare against the *current* fixed constants from client.py, notCOMMENT
LOWlightrag/parser/docx/parse_document.py1221 if parse_metadata is not None:COMMENT
LOWlightrag/parser/docx/smart_heading/heading_flow.py301 cb1_strong_body_recovered: bool = FalseCOMMENT
LOWlightrag/parser/docx/smart_heading/heading_flow.py321 #: numbered candidate became body — otherwise the veto leaves no trace.COMMENT
LOWlightrag/parser/docx/smart_heading/heading_flow.py481 return (COMMENT
LOWlightrag/parser/docx/smart_heading/heading_flow.py801COMMENT
LOWlightrag/parser/docx/smart_heading/heading_flow.py1081 result = gate_candidates(COMMENT
LOWlightrag/parser/docx/smart_heading/heading_flow.py2741 # this document's parse even on entry points that bypass startup validationCOMMENT
LOWlightrag/parser/docx/smart_heading/heading_flow.py3061 audit["rule_events"].extend(skeleton_audit)COMMENT
LOWlightrag/parser/docx/smart_heading/guardrails.py241 # Judge sentence shape over the title PROSE, not a leading numbering label:COMMENT
66 more matches not shown…
Fake / Example Data64 hits · 60 pts
SeverityFileLineSnippetContext
LOWlightrag/api/routers/document_routes.py689 "metadata": {"author": "John Doe", "year": 2025},CODE
LOWlightrag/api/routers/document_routes.py753 "metadata": {"author": "John Doe"},CODE
LOWlightrag/api/routers/document_routes.py795 "metadata": {"author": "John Doe", "year": 2025},CODE
LOWlightrag/api/routers/document_routes.py913 "metadata": {"author": "John Doe", "year": 2025},CODE
LOWtests/setup/test_collect.py860prompt_secret_until_valid_with_default() {{ printf 'fake-key'; }}CODE
LOWtests/parser/docx/test_smart_heading_flow.py3708 logs = [m for m in _log_messages(caplog) if "placeholder" in m]CODE
LOWtests/kg/json_impl/test_write_json_optimization.py30 "name": "John Doe",CODE
LOWtests/api/config/test_api_config_vlm_enable.py76 monkeypatch.setenv("VLM_LLM_BINDING_API_KEY", "placeholder")CODE
LOWtests/api/routes/test_description_api_validation.py229 ["entity", "Alice", "Acme Corp", "founded", "Alice founded Acme Corp."],CODE
LOWtests/api/routes/test_description_api_validation.py241 assert relation["tgt_id"] == "Acme Corp"CODE
LOWtests/api/routes/test_description_api_validation.py262 ["entity", "Alice", "Acme Corp", "founded", " "],CODE
LOWtests/api/routes/test_description_api_validation.py277 ["edge", "Alice", "Acme Corp", "founded", "Alice founded Acme Corp."],CODE
LOWtests/extraction/test_entity_extraction_stability.py510 assert set(nodes) == {"Alice", "Acme Corp"}CODE
LOWtests/extraction/test_entity_extraction_stability.py511 assert ("Alice", "Acme Corp") in edgesCODE
LOWtests/extraction/test_entity_extraction_stability.py702 assert set(entities.keys()) == {"Alice", "Acme Corp"}CODE
LOWtests/extraction/test_entity_extraction_stability.py706 assert relation_data["tgt_id"] == "Acme Corp"CODE
LOWtests/extraction/test_entity_extraction_stability.py185 "name": "Acme Corp",CODE
LOWtests/extraction/test_entity_extraction_stability.py193 "target": "Acme Corp",CODE
LOWtests/extraction/test_entity_extraction_stability.py660 assert next(iter(relationships.keys())) == ("Alice", "Acme Corp")CODE
LOWtests/extraction/test_entity_extraction_stability.py683 assert relation_data["tgt_id"] == "Acme Corp"CODE
LOWlightrag_webui/src/locales/zh.json386 "placeholder": "页面内搜索节点...",CODE
LOWlightrag_webui/src/locales/zh.json393 "placeholder": "搜索节点名称...",CODE
LOWlightrag_webui/src/locales/zh.json421 "placeholder": "输入查询内容 (支持模式前缀: /<Query Mode>)",CODE
LOWlightrag_webui/src/locales/zh.json481 "placeholder": "请输入 API Key",CODE
LOWlightrag_webui/src/locales/ja.json386 "placeholder": "ページ内のノードを検索...",CODE
LOWlightrag_webui/src/locales/ja.json393 "placeholder": "ノード名を検索...",CODE
LOWlightrag_webui/src/locales/ja.json421 "placeholder": "クエリを入力(プレフィックス対応: /<クエリモード>)",CODE
LOWlightrag_webui/src/locales/ja.json481 "placeholder": "APIキーを入力",CODE
LOWlightrag_webui/src/locales/de.json386 "placeholder": "Knoten auf der Seite suchen...",CODE
LOWlightrag_webui/src/locales/de.json393 "placeholder": "Knotenname suchen...",CODE
LOWlightrag_webui/src/locales/de.json421 "placeholder": "Geben Sie Ihre Abfrage ein (Präfix unterstützt: /<Abfragemodus>)",CODE
LOWlightrag_webui/src/locales/de.json481 "placeholder": "API-Schlüssel eingeben",CODE
LOWlightrag_webui/src/locales/ru.json386 "placeholder": "Поиск узлов на странице...",CODE
LOWlightrag_webui/src/locales/ru.json393 "placeholder": "Поиск имени узла...",CODE
LOWlightrag_webui/src/locales/ru.json421 "placeholder": "Введите ваш запрос (Поддержка префикса: /<Режим запроса>)",CODE
LOWlightrag_webui/src/locales/ru.json481 "placeholder": "Введите ваш API ключ",CODE
LOWlightrag_webui/src/locales/uk.json386 "placeholder": "Шукати вузли на сторінці...",CODE
LOWlightrag_webui/src/locales/uk.json393 "placeholder": "Шукати ім'я вузла...",CODE
LOWlightrag_webui/src/locales/uk.json421 "placeholder": "Введіть ваш запит (Підтримка префіксу: /<Режим запиту>)",CODE
LOWlightrag_webui/src/locales/uk.json481 "placeholder": "Введіть ваш API ключ",CODE
LOWlightrag_webui/src/locales/en.json386 "placeholder": "Search nodes in page...",CODE
LOWlightrag_webui/src/locales/en.json393 "placeholder": "Search node name...",CODE
LOWlightrag_webui/src/locales/en.json421 "placeholder": "Enter your query (Support prefix: /<Query Mode>)",CODE
LOWlightrag_webui/src/locales/en.json481 "placeholder": "Enter your API key",CODE
LOWlightrag_webui/src/locales/fr.json386 "placeholder": "Rechercher des nœuds dans la page...",CODE
LOWlightrag_webui/src/locales/fr.json393 "placeholder": "Rechercher le nom du nœud...",CODE
LOWlightrag_webui/src/locales/fr.json421 "placeholder": "Tapez votre requête (Préfixe de requête : /<Query Mode>)",CODE
LOWlightrag_webui/src/locales/fr.json481 "placeholder": "Entrez votre clé API",CODE
LOWlightrag_webui/src/locales/ko.json386 "placeholder": "페이지 내 노드 검색...",CODE
LOWlightrag_webui/src/locales/ko.json393 "placeholder": "노드 이름 검색...",CODE
LOWlightrag_webui/src/locales/ko.json421 "placeholder": "질문을 입력하세요 (접두사 지원: /<쿼리 모드>)",CODE
LOWlightrag_webui/src/locales/ko.json481 "placeholder": "API 키 입력",CODE
LOWlightrag_webui/src/locales/vi.json386 "placeholder": "Tìm kiếm nút trong trang...",CODE
LOWlightrag_webui/src/locales/vi.json393 "placeholder": "Tìm kiếm tên nút...",CODE
LOWlightrag_webui/src/locales/vi.json421 "placeholder": "Nhập truy vấn của bạn (Hỗ trợ tiền tố: /<Chế Độ Truy Vấn>)",CODE
LOWlightrag_webui/src/locales/vi.json481 "placeholder": "Nhập khóa API của bạn",CODE
LOWlightrag_webui/src/locales/zh_TW.json386 "placeholder": "頁面內搜尋節點...",CODE
LOWlightrag_webui/src/locales/zh_TW.json393 "placeholder": "搜尋節點名稱...",CODE
LOWlightrag_webui/src/locales/zh_TW.json421 "placeholder": "輸入查詢內容 (支援模式前綴:/<Query Mode>)",CODE
LOWlightrag_webui/src/locales/zh_TW.json481 "placeholder": "請輸入 API key",CODE
4 more matches not shown…
Cross-Language Confusion12 hits · 55 pts
SeverityFileLineSnippetContext
HIGHlightrag/parser/docx/parser.py135 # ``positions: [{"type": "paraid", "range": null}]``.COMMENT
HIGHlightrag/parser/docx/smart_heading/title_block.py1046- If false: set all six text fields to null, and classify EVERY index — {indices} — into exactly one of "headings" (a reCODE
HIGHlightrag/parser/docx/smart_heading/title_block.py1049{{"is_title_block": true|false, "main_title": string|null, "sub_title": string|null, "doc_number": string|null, "classifCODE
HIGHlightrag/kg/postgres_impl.py5892 " $1::text || E'\\x01' ||"CODE
HIGHlightrag/api/lightrag_server.py126 if (!data || data.type !== 'lightrag:set-docs-theme') return;CODE
HIGHlightrag/api/routers/graph_routes.py332 "merge_error": null,STRING
HIGHlightrag/api/routers/graph_routes.py334 "target_entity": null,STRING
HIGHlightrag/api/routers/graph_routes.py360 "merge_error": null,STRING
HIGH…sts/kg/postgres_impl/test_postgres_cypher_injection.py135 "formula": "x < 5 && y > 3",CODE
HIGH…sts/kg/postgres_impl/test_postgres_cypher_injection.py146 assert '`formula`: "x < 5 && y > 3"' in call["sql"]CODE
HIGH…s/kg/postgres_impl/test_postgres_upsert_edge_cypher.py172 assert "$1::text || E'\\x01' ||" in lock_sqlCODE
HIGHtests/kg/neo4j_impl/test_search_labels_sanitize.py34 ("foo && bar", "foo bar"),CODE
Structural Annotation Overuse31 hits · 50 pts
SeverityFileLineSnippetContext
LOWlightrag/lightrag.py1081 # Step 2: Apply priority wrapper decorator to EmbeddingFunc's inner funcCOMMENT
LOWlightrag/lightrag.py1063 # Step 1: Capture embedding_func and max_token_size before applying rate_limit decoratorCOMMENT
LOWlightrag/operate.py5401 # Step 5: Batch retrieve chunk dataCOMMENT
LOWlightrag/operate.py5407 # Step 6: Build result chunks with valid data and update chunk trackingCOMMENT
LOWlightrag/operate.py5696 # Step 5: Batch retrieve chunk dataCOMMENT
LOWlightrag/operate.py5702 # Step 6: Build result chunks with valid data and update chunk trackingCOMMENT
LOWlightrag/operate.py5290 # Step 1: Collect all text chunks for each entityCOMMENT
LOWlightrag/operate.py5317 # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned entities)COMMENT
LOWlightrag/operate.py5334 # Step 3: Sort chunks for each entity by occurrence count (higher count = higher priority)COMMENT
LOWlightrag/operate.py5347 # Step 4: Apply the selected chunk selection algorithmCOMMENT
LOWlightrag/operate.py5541 # Step 1: Collect all text chunks for each relationshipCOMMENT
LOWlightrag/operate.py5576 # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned relationships)COMMENT
LOWlightrag/operate.py5625 # Step 3: Sort chunks for each relationship by occurrence count (higher count = higher priority)COMMENT
LOWlightrag/operate.py5640 # Step 4: Apply the selected chunk selection algorithmCOMMENT
LOWlightrag/utils.py4550 # Step 1: Remove chunks that are no longer neededCOMMENT
LOWlightrag/utils.py4555 # Step 2: Add new chunks (preserving order from new_chunk_ids)COMMENT
LOWlightrag/api/lightrag_server.py738 # Step 3: Create optimized embedding function (calls underlying function directly)COMMENT
LOWlightrag/api/lightrag_server.py665 # Step 1: Import provider function and extract default attributesCOMMENT
LOWlightrag/api/lightrag_server.py718 # Step 2: Apply priority (user config > provider default)COMMENT
LOWlightrag/api/lightrag_server.py933 # Step 4: Wrap in EmbeddingFunc and returnCOMMENT
LOWlightrag/chunker/paragraph_semantic.py1335 # Step 1: expand each oversized table paragraph into row-boundedCOMMENT
LOWlightrag/chunker/paragraph_semantic.py1359 # Step 2: greedy-pack pieces into chunks ≤ target_max. A pieceCOMMENT
LOWtests/kg/postgres_impl/test_postgres_migration.py662 # Step 1: Simulate workspace_a initialization (Case 3 - only legacy exists)COMMENT
LOWtests/kg/postgres_impl/test_postgres_migration.py760 # Step 2: Simulate workspace_b initialization (Case 3 - both exist, but legacy has B's data)COMMENT
LOWdocs/OfflineDeployment.md210### Step 1: Prepare in Online EnvironmentCOMMENT
LOWdocs/OfflineDeployment.md229### Step 2: Transfer to Offline EnvironmentCOMMENT
LOWdocs/OfflineDeployment.md239### Step 3: Install in Offline EnvironmentCOMMENT
LOWdocs/OfflineDeployment.md260### Step 4: Verify InstallationCOMMENT
LOWexamples/lightrag_ag2_multiagent_demo.py267 # Step 1: Set up LightRAG (async, runs on the background loop)COMMENT
LOWexamples/lightrag_ag2_multiagent_demo.py270 # Step 2: Create AG2 agents with LightRAG toolsCOMMENT
LOWexamples/lightrag_ag2_multiagent_demo.py273 # Step 3: Ask a complex questionCOMMENT
Verbosity Indicators27 hits · 45 pts
SeverityFileLineSnippetContext
LOWlightrag/lightrag.py1081 # Step 2: Apply priority wrapper decorator to EmbeddingFunc's inner funcCOMMENT
LOWlightrag/lightrag.py1063 # Step 1: Capture embedding_func and max_token_size before applying rate_limit decoratorCOMMENT
LOWlightrag/operate.py5401 # Step 5: Batch retrieve chunk dataCOMMENT
LOWlightrag/operate.py5407 # Step 6: Build result chunks with valid data and update chunk trackingCOMMENT
LOWlightrag/operate.py5696 # Step 5: Batch retrieve chunk dataCOMMENT
LOWlightrag/operate.py5702 # Step 6: Build result chunks with valid data and update chunk trackingCOMMENT
LOWlightrag/operate.py5290 # Step 1: Collect all text chunks for each entityCOMMENT
LOWlightrag/operate.py5317 # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned entities)COMMENT
LOWlightrag/operate.py5334 # Step 3: Sort chunks for each entity by occurrence count (higher count = higher priority)COMMENT
LOWlightrag/operate.py5347 # Step 4: Apply the selected chunk selection algorithmCOMMENT
LOWlightrag/operate.py5541 # Step 1: Collect all text chunks for each relationshipCOMMENT
LOWlightrag/operate.py5576 # Step 2: Count chunk occurrences and deduplicate (keep chunks from earlier positioned relationships)COMMENT
LOWlightrag/operate.py5625 # Step 3: Sort chunks for each relationship by occurrence count (higher count = higher priority)COMMENT
LOWlightrag/operate.py5640 # Step 4: Apply the selected chunk selection algorithmCOMMENT
LOWlightrag/utils.py4550 # Step 1: Remove chunks that are no longer neededCOMMENT
LOWlightrag/utils.py4555 # Step 2: Add new chunks (preserving order from new_chunk_ids)COMMENT
LOWlightrag/api/lightrag_server.py738 # Step 3: Create optimized embedding function (calls underlying function directly)COMMENT
LOWlightrag/api/lightrag_server.py665 # Step 1: Import provider function and extract default attributesCOMMENT
LOWlightrag/api/lightrag_server.py718 # Step 2: Apply priority (user config > provider default)COMMENT
LOWlightrag/api/lightrag_server.py933 # Step 4: Wrap in EmbeddingFunc and returnCOMMENT
LOWlightrag/chunker/paragraph_semantic.py1335 # Step 1: expand each oversized table paragraph into row-boundedCOMMENT
LOWlightrag/chunker/paragraph_semantic.py1359 # Step 2: greedy-pack pieces into chunks ≤ target_max. A pieceCOMMENT
LOWtests/kg/postgres_impl/test_postgres_migration.py662 # Step 1: Simulate workspace_a initialization (Case 3 - only legacy exists)COMMENT
LOWtests/kg/postgres_impl/test_postgres_migration.py760 # Step 2: Simulate workspace_b initialization (Case 3 - both exist, but legacy has B's data)COMMENT
LOWexamples/lightrag_ag2_multiagent_demo.py267 # Step 1: Set up LightRAG (async, runs on the background loop)COMMENT
LOWexamples/lightrag_ag2_multiagent_demo.py270 # Step 2: Create AG2 agents with LightRAG toolsCOMMENT
LOWexamples/lightrag_ag2_multiagent_demo.py273 # Step 3: Ask a complex questionCOMMENT
Modern Structural Boilerplate38 hits · 38 pts
SeverityFileLineSnippetContext
LOWlightrag/llm_roles.py134 def set_role_llm_metadata(self, role: str, **metadata: Any) -> None:CODE
LOWlightrag/lightrag.py771 def _set_runtime_addon_params(self, addon_params: Mapping[str, Any] | None) -> None:CODE
LOWlightrag/__init__.py5__all__ = [CODE
LOWlightrag/multimodal_context.py84logger = logging.getLogger(__name__)CODE
LOWlightrag/multimodal_context.py1017__all__ = [CODE
LOWlightrag/chunk_schema.py376__all__ = [CODE
LOWlightrag/prompt_multimodal.py352__all__ = [STRING
LOWlightrag/llm/gemini.py747__all__ = [CODE
LOWlightrag/llm/azure_openai.py18__all__ = [CODE
LOWlightrag/parser/_html_table.py208__all__ = [CODE
LOWlightrag/parser/_markdown.py68__all__ = [CODE
LOWlightrag/parser/markdown/ir_builder.py227__all__ = ["NativeMarkdownIRBuilder"]CODE
LOWlightrag/parser/markdown/raw_cache.py226__all__ = ["NativeImageRawCache", "native_md_options_signature"]CODE
LOWlightrag/parser/legacy/__init__.py14__all__ = ["LegacyExtractionError", "extract_text"]CODE
LOWlightrag/parser/external/_manifest.py159__all__ = [CODE
LOWlightrag/parser/external/_zip.py67__all__ = ["safe_extract_zip"]CODE
LOWlightrag/parser/external/_common.py143__all__ = [CODE
LOWlightrag/parser/external/__init__.py35__all__ = [CODE
LOWlightrag/parser/external/docling/ir_builder.py1072__all__ = ["DoclingIRBuilder"]CODE
LOWlightrag/parser/external/docling/manifest.py126__all__ = [CODE
LOWlightrag/parser/external/docling/client.py490__all__ = [CODE
LOWlightrag/parser/external/docling/cache.py251__all__ = [CODE
LOWlightrag/parser/external/docling/__init__.py33__all__ = [CODE
LOWlightrag/parser/external/mineru/ir_builder.py785__all__ = ["MinerUIRBuilder"]CODE
LOWlightrag/parser/external/mineru/manifest.py155__all__ = [CODE
LOWlightrag/parser/external/mineru/client.py702__all__ = ["MinerURawClient", "CONTENT_LIST_FILENAME"]CODE
LOWlightrag/parser/external/mineru/cache.py421__all__ = [CODE
LOWlightrag/parser/external/mineru/__init__.py21__all__ = [CODE
LOWlightrag/parser/docx/ir_builder.py346__all__ = ["NativeDocxIRBuilder"]CODE
LOWlightrag/api/routers/__init__.py14__all__ = ["OllamaAPI"]CODE
LOWlightrag/evaluation/__init__.py16__all__ = ["RAGEvaluator"]CODE
LOWlightrag/sidecar/__init__.py29__all__ = [CODE
LOWlightrag/chunker/__init__.py60__all__ = [CODE
LOWtests/llm/bedrock_impl/test_bedrock_llm.py538 def set_role_llm_metadata(self, _role: str, **_metadata) -> None:CODE
LOWtests/parser/docx/_native_docx_fixtures.py330__all__ = ["Scenario", "SCENARIOS", "_block"]CODE
LOW…ts/parser/docx/test_extract_blocks_characterization.py54def _set_para_id(para, hex_id: str) -> None:CODE
LOWtests/parser/docx/test_smart_heading_features.py38def _set_doc_default_size(doc: Document, half_points: int) -> None:CODE
LOWtests/api/test_lightrag_ollama_chat.py70 def set_verbose(cls, verbose: bool) -> None:CODE
AI Slop Vocabulary14 hits · 37 pts
SeverityFileLineSnippetContext
LOWlightrag/pipeline.py993 # Another process is busy, just set request flag and returnCOMMENT
MEDIUMlightrag/tools/clean_llm_query_cache.py870 """Print comprehensive cleanup reportSTRING
MEDIUMlightrag/tools/migrate_llm_cache.py1517 # Print comprehensive migration reportCOMMENT
MEDIUMlightrag/tools/migrate_llm_cache.py1349 """Print comprehensive migration reportSTRING
MEDIUMlightrag/kg/mongo_impl.py2547 """Try Atlas Search using compound query for comprehensive matching."""STRING
MEDIUMlightrag/kg/shared_storage.py1066 """Release all locks with comprehensive error handling, protected from cancellation"""STRING
MEDIUMlightrag/api/routers/document_routes.py3680 # Handle both DocStatus enum and string cases for robust deserializationCOMMENT
MEDIUMtests/parser/docx/test_smart_heading_e2e.py259# harnessCOMMENT
MEDIUMtests/kg/postgres_impl/test_postgres_graph_batch.py16# Capture harnessCOMMENT
MEDIUMtests/api/routes/test_aquery_data_endpoint.py493 "mode": "mix", # Use mixed mode to get the most comprehensive resultsCODE
MEDIUM…sts/chunker/test_paragraph_semantic_drop_references.py121# Filtering behaviour (assert on content markers, robust to LevelMerge)COMMENT
MEDIUMtests/chunker/test_chunking_raw_lightrag_parity.py62# Shared fixtures (mirrors the harness used by test_pipeline_release_closure)COMMENT
MEDIUMlightrag_webui/src/features/RetrievalView.tsx287 // Use the new robust COT parsing functionCOMMENT
MEDIUMlightrag_webui/src/features/RetrievalView.tsx727 // Handle copying message content with robust clipboard supportCOMMENT
AI Structural Patterns27 hits · 20 pts
SeverityFileLineSnippetContext
LOWlightrag/llm_roles.py271CODE
LOWlightrag/llm_roles.py355CODE
LOWlightrag/llm_roles.py390CODE
LOWlightrag/operate.py2922CODE
LOWlightrag/utils.py3472CODE
LOWlightrag/pipeline.py238CODE
LOWlightrag/llm/gemini.py284CODE
LOWlightrag/llm/gemini.py612CODE
LOWlightrag/llm/openai.py241CODE
LOWlightrag/llm/openai.py920CODE
LOWlightrag/llm/openai.py940CODE
LOWlightrag/llm/openai.py1090CODE
LOWlightrag/llm/openai.py1172CODE
LOWlightrag/llm/openai.py1181CODE
LOWlightrag/llm/llama_index_impl.py201CODE
LOWlightrag/llm/bedrock.py167CODE
LOWlightrag/llm/bedrock.py452CODE
LOWlightrag/llm/hf.py168CODE
LOWlightrag/parser/external/mineru/cache.py278CODE
LOWlightrag/parser/docx/utils.py740CODE
LOWlightrag/parser/docx/utils.py791CODE
LOWlightrag/parser/docx/smart_heading/heading_flow.py361CODE
LOWlightrag/parser/docx/smart_heading/title_block.py421CODE
LOWlightrag/kg/opensearch_impl.py3420CODE
LOWlightrag/chunker/semantic_vector.py192CODE
LOWtests/parser/external/docling/test_client.py64CODE
LOWtests/api/routes/test_document_routes_docx_archive.py101CODE
Slop Phrases2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMexamples/unofficial-sample/lightrag_cloudflare_demo.py32WORKING_DIR = "../dickens" # you can change output as desiredCODE
MEDIUMexamples/unofficial-sample/lightrag_nvidia_demo.py112 # so you can adjust to be able to fit the NVIDIA model (future work)COMMENT
Example Usage Blocks2 hits · 4 pts
SeverityFileLineSnippetContext
LOWdocker-compose.podman.yml3# Usage:COMMENT
LOWlightrag/llm/binding_options.py671# Usage:COMMENT