Repository Analysis

microsoft/graphrag

A modular graph-based Retrieval-Augmented Generation (RAG) system

33.2 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of microsoft/graphrag, a Python project with 34,410 GitHub stars. SynthScan v2.0 examined 61,100 lines of code across 730 source files, recording 1270 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 33.2 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).

33.2
Adjusted Score
33.2
Raw Score
100%
Time Factor
2026-07-13
Last Push
34.4K
Stars
Python
Language
61.1K
Lines of Code
730
Files
1.3K
Pattern Hits
2026-07-14
Scan Date
0.15
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 108MEDIUM 125LOW 1037

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 1270 distinct pattern matches across 19 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.

Cross-File Repetition103 hits · 515 pts
SeverityFileLineSnippetContext
HIGHtests/unit/config/test_template_engine_config.py0test that missing required parameters raise validation errors.STRING
HIGHtests/unit/config/test_metrics_config.py0test that missing required parameters raise validation errors.STRING
HIGHtests/unit/config/test_retry_config.py0test that missing required parameters raise validation errors.STRING
HIGHtests/unit/config/test_tokenizer_config.py0test that missing required parameters raise validation errors.STRING
HIGHtests/unit/config/test_rate_limit_config.py0test that missing required parameters raise validation errors.STRING
HIGHtests/unit/config/test_model_config.py0test that missing required parameters raise validation errors.STRING
HIGHtests/unit/graphs/test_compute_degree.py0build a relationships dataframe from (source, target, weight) tuples.STRING
HIGHtests/unit/graphs/test_modularity.py0build a relationships dataframe from (source, target, weight) tuples.STRING
HIGHtests/unit/graphs/test_connected_components.py0build a relationships dataframe from (source, target, weight) tuples.STRING
HIGHtests/unit/graphs/test_stable_lcc.py0build a relationships dataframe from (source, target, weight) tuples.STRING
HIGHtests/unit/graphs/test_modularity.py0load the realistic graph fixture as a relationships dataframe.STRING
HIGHtests/unit/graphs/test_connected_components.py0load the realistic graph fixture as a relationships dataframe.STRING
HIGHtests/unit/graphs/test_stable_lcc.py0load the realistic graph fixture as a relationships dataframe.STRING
HIGH…ges/graphrag-llm/graphrag_llm/metrics/metrics_store.py0clear all metrics from the store. returns ------- noneSTRING
HIGH…raphrag-llm/graphrag_llm/metrics/noop_metrics_store.py0clear all metrics from the store. returns ------- noneSTRING
HIGH…phrag-llm/graphrag_llm/metrics/memory_metrics_store.py0clear all metrics from the store. returns ------- noneSTRING
HIGH…kages/graphrag-llm/graphrag_llm/tokenizer/tokenizer.py0encode the given text into a list of tokens. args ---- text: str the input text to encode. returns ------- list[int]: a STRING
HIGH…phrag-llm/graphrag_llm/tokenizer/tiktoken_tokenizer.py0encode the given text into a list of tokens. args ---- text: str the input text to encode. returns ------- list[int]: a STRING
HIGH…phrag-llm/graphrag_llm/tokenizer/lite_llm_tokenizer.py0encode the given text into a list of tokens. args ---- text: str the input text to encode. returns ------- list[int]: a STRING
HIGH…kages/graphrag-llm/graphrag_llm/tokenizer/tokenizer.py0decode a list of tokens back into a string. args ---- tokens: list[int] a list of tokens to decode. returns ------- str:STRING
HIGH…phrag-llm/graphrag_llm/tokenizer/tiktoken_tokenizer.py0decode a list of tokens back into a string. args ---- tokens: list[int] a list of tokens to decode. returns ------- str:STRING
HIGH…phrag-llm/graphrag_llm/tokenizer/lite_llm_tokenizer.py0decode a list of tokens back into a string. args ---- tokens: list[int] a list of tokens to decode. returns ------- str:STRING
HIGH…phrag-llm/graphrag_llm/embedding/lite_llm_embedding.py0initialize litellmcompletion. args ---- model_id: str the litellm model id, e.g., "openai/gpt-4o" model_config: modelconSTRING
HIGH…rag-llm/graphrag_llm/completion/lite_llm_completion.py0initialize litellmcompletion. args ---- model_id: str the litellm model id, e.g., "openai/gpt-4o" model_config: modelconSTRING
HIGH…rag-llm/graphrag_llm/completion/mock_llm_completion.py0initialize litellmcompletion. args ---- model_id: str the litellm model id, e.g., "openai/gpt-4o" model_config: modelconSTRING
HIGH…/graphrag/graphrag/config/models/prune_graph_config.py0parameterization settings for the default configuration.STRING
HIGH…graphrag/graphrag/config/models/basic_search_config.py0parameterization settings for the default configuration.STRING
HIGH…rag/graphrag/config/models/extract_graph_nlp_config.py0parameterization settings for the default configuration.STRING
HIGH…es/graphrag/graphrag/config/models/snapshots_config.py0parameterization settings for the default configuration.STRING
HIGH…raphrag/graphrag/config/models/global_search_config.py0parameterization settings for the default configuration.STRING
HIGH…s/graphrag/graphrag/config/models/embed_text_config.py0parameterization settings for the default configuration.STRING
HIGH…raphrag/graphrag/config/models/cluster_graph_config.py0parameterization settings for the default configuration.STRING
HIGH…raphrag/config/models/summarize_descriptions_config.py0parameterization settings for the default configuration.STRING
HIGH…graphrag/graphrag/config/models/local_search_config.py0parameterization settings for the default configuration.STRING
HIGH…es/graphrag/graphrag/config/models/graph_rag_config.py0parameterization settings for the default configuration.STRING
HIGH…es/graphrag/graphrag/config/models/reporting_config.py0parameterization settings for the default configuration.STRING
HIGH…graphrag/graphrag/config/models/drift_search_config.py0parameterization settings for the default configuration.STRING
HIGH…raphrag/graphrag/config/models/extract_graph_config.py0parameterization settings for the default configuration.STRING
HIGH…aphrag/graphrag/config/models/extract_claims_config.py0parameterization settings for the default configuration.STRING
HIGH…rag/graphrag/config/models/community_reports_config.py0parameterization settings for the default configuration.STRING
HIGH…graphrag-chunking/graphrag_chunking/chunking_config.py0parameterization settings for the default configuration.STRING
HIGH…aphrag-vectors/graphrag_vectors/vector_store_config.py0parameterization settings for the default configuration.STRING
HIGH…ages/graphrag-vectors/graphrag_vectors/index_schema.py0parameterization settings for the default configuration.STRING
HIGHpackages/graphrag-input/graphrag_input/input_config.py0parameterization settings for the default configuration.STRING
HIGH…phrag/graphrag/callbacks/workflow_callbacks_manager.py0execute this callback when an error occurs in the pipeline.STRING
HIGH…ages/graphrag/graphrag/callbacks/workflow_callbacks.py0execute this callback when an error occurs in the pipeline.STRING
HIGH…graphrag/graphrag/callbacks/noop_workflow_callbacks.py0execute this callback when an error occurs in the pipeline.STRING
HIGH…phrag/graphrag/callbacks/console_workflow_callbacks.py0execute this callback when an error occurs in the pipeline.STRING
HIGH…ages/graphrag/graphrag/callbacks/workflow_callbacks.py0execute this callback to signal when the entire pipeline starts.STRING
HIGH…graphrag/graphrag/callbacks/noop_workflow_callbacks.py0execute this callback to signal when the entire pipeline starts.STRING
HIGH…phrag/graphrag/callbacks/console_workflow_callbacks.py0execute this callback to signal when the entire pipeline starts.STRING
HIGH…ages/graphrag/graphrag/callbacks/workflow_callbacks.py0execute this callback to signal when the entire pipeline ends.STRING
HIGH…graphrag/graphrag/callbacks/noop_workflow_callbacks.py0execute this callback to signal when the entire pipeline ends.STRING
HIGH…phrag/graphrag/callbacks/console_workflow_callbacks.py0execute this callback to signal when the entire pipeline ends.STRING
HIGH…g/graphrag/index/workflows/generate_text_embeddings.py0a module containing run_workflow method definition.STRING
HIGH…rag/graphrag/index/workflows/create_base_text_units.py0a module containing run_workflow method definition.STRING
HIGH…phrag/index/workflows/create_community_reports_text.py0a module containing run_workflow method definition.STRING
HIGH…g/graphrag/index/workflows/update_community_reports.py0a module containing run_workflow method definition.STRING
HIGH…g/graphrag/index/workflows/create_community_reports.py0a module containing run_workflow method definition.STRING
HIGH…kages/graphrag/graphrag/index/workflows/prune_graph.py0a module containing run_workflow method definition.STRING
43 more matches not shown…
Hyper-Verbose Identifiers375 hits · 393 pts
SeverityFileLineSnippetContext
LOWtests/unit/vector_stores/test_timestamp.py40 def test_empty_string_returns_empty(self):CODE
LOWtests/unit/vector_stores/test_timestamp.py77 def test_produces_correct_keys(self):CODE
LOWtests/unit/vector_stores/test_timestamp.py104 def test_contains_create_and_update_fields(self):CODE
LOWtests/unit/vector_stores/test_filtering.py60 def test_missing_field_returns_false(self):CODE
LOWtests/unit/vector_stores/test_filtering.py136 def test_eq_produces_condition(self):CODE
LOWtests/unit/vector_stores/test_filtering.py305 def test_complex_nested_roundtrip(self):CODE
LOWtests/unit/prompt_tune/test_load_docs_in_chunks.py104 async def test_top_selection_returns_limited_chunks(CODE
LOWtests/unit/prompt_tune/test_load_docs_in_chunks.py141 async def test_random_selection_returns_correct_count(CODE
LOWtests/unit/prompt_tune/test_load_docs_in_chunks.py176 async def test_escapes_braces_in_output(self, mock_config, mock_logger):CODE
LOWtests/unit/prompt_tune/test_load_docs_in_chunks.py219 async def test_limit_out_of_range_uses_default(CODE
LOWtests/unit/prompt_tune/test_load_docs_in_chunks.py258 async def test_chunks_all_documents(CODE
LOWtests/unit/config/test_template_engine_config.py14def test_template_engine_config_validation() -> None:CODE
LOWtests/unit/config/test_metrics_config.py13def test_file_metrics_writer_validation() -> None:CODE
LOWtests/unit/config/test_retry_config.py10def test_exponential_backoff_validation() -> None:CODE
LOWtests/unit/config/test_retry_config.py50def test_immediate_validation() -> None:CODE
LOWtests/unit/config/test_tokenizer_config.py10def test_litellm_tokenizer_validation() -> None:CODE
LOWtests/unit/config/test_rate_limit_config.py10def test_sliding_window_validation() -> None:CODE
LOWtests/unit/config/utils.py57def get_default_graphrag_config() -> GraphRagConfig:CODE
LOWtests/unit/config/utils.py73def assert_rate_limit_configs(CODE
LOWtests/unit/config/utils.py115def assert_vector_store_configs(CODE
LOWtests/unit/config/utils.py162def assert_text_embedding_configs(CODE
LOWtests/unit/config/utils.py186def assert_extract_graph_configs(CODE
LOWtests/unit/config/utils.py195def assert_text_analyzer_configs(CODE
LOWtests/unit/config/utils.py210def assert_extract_graph_nlp_configs(CODE
LOWtests/unit/config/utils.py218def assert_prune_graph_configs(CODE
LOWtests/unit/config/utils.py230def assert_summarize_descriptions_configs(CODE
LOWtests/unit/config/utils.py238def assert_community_reports_configs(CODE
LOWtests/unit/config/utils.py248def assert_extract_claims_configs(CODE
LOWtests/unit/config/utils.py258def assert_cluster_graph_configs(CODE
LOWtests/unit/config/utils.py266def assert_local_search_configs(CODE
LOWtests/unit/config/utils.py280def assert_global_search_configs(CODE
LOWtests/unit/config/utils.py297def assert_drift_search_configs(CODE
LOWtests/unit/config/utils.py330def assert_basic_search_configs(CODE
LOWtests/unit/config/test_config.py45def test_load_config_with_cli_overrides() -> None:CODE
LOWtests/unit/config/test_model_config.py11def test_litellm_provider_validation() -> None:CODE
LOWtests/unit/utils/test_encoding.py16def test_num_tokens_empty_input():CODE
LOWtests/unit/storage/test_csv_table_provider.py46 async def test_read_nonexistent_table_raises_error(self):CODE
LOWtests/unit/storage/test_csv_table_provider.py62 async def test_dataframe_with_multiple_types(self):CODE
LOWtests/unit/storage/test_parquet_table_provider.py41 async def test_read_nonexistent_table_raises_error(self):CODE
LOWtests/unit/storage/test_parquet_table_provider.py55 async def test_dataframe_with_multiple_types(self):CODE
LOWtests/unit/storage/test_csv_table.py58 async def test_original_readable_during_writes(CODE
LOWtests/unit/storage/test_csv_table.py74 async def test_temp_file_replaces_original_on_close(CODE
LOWtests/unit/storage/test_csv_table.py89 async def test_no_temp_file_left_after_close(CODE
LOWtests/unit/storage/test_csv_table.py103 async def test_multiple_writes_accumulate_in_temp(CODE
LOWtests/unit/storage/test_csv_table.py124 async def test_concurrent_read_and_write_same_file(CODE
LOWtests/unit/storage/test_csv_table.py165 async def test_append_to_existing_file(CODE
LOWtests/unit/storage/test_csv_table.py183 async def test_append_creates_file_with_header(CODE
LOWtests/unit/storage/test_csv_table.py198 async def test_no_temp_file_used_for_append(CODE
LOWtests/unit/storage/test_csv_table.py221 async def test_double_close_is_safe(CODE
LOWtests/unit/storage/test_csv_table.py232 async def test_close_without_writes_is_safe(CODE
LOWtests/unit/chunking/test_chunker.py55 def test_mixed_whitespace_handling(self):CODE
LOWtests/unit/chunking/test_chunker.py96def test_split_text_str_empty():CODE
LOWtests/unit/chunking/test_chunker.py108def test_split_text_on_tokens():CODE
LOWtests/unit/chunking/test_chunker.py137def test_split_text_on_tokens_one_overlap():CODE
LOWtests/unit/chunking/test_chunker.py169def test_split_text_on_tokens_no_overlap():CODE
LOWtests/unit/chunking/test_prepend_metadata.py7def test_add_metadata_one_row():CODE
LOWtests/unit/chunking/test_prepend_metadata.py17def test_add_metadata_one_row_append():CODE
LOWtests/unit/chunking/test_prepend_metadata.py27def test_add_metadata_multiple_rows():CODE
LOWtests/unit/chunking/test_prepend_metadata.py37def test_add_metadata_custom_delimiters():CODE
LOWtests/unit/load_config/test_load_config.py16def test_load_config_validation():CODE
315 more matches not shown…
Unused Imports389 hits · 386 pts
SeverityFileLineSnippetContext
LOWtests/unit/indexing/test_init_content.py5CODE
LOWtests/integration/language_model/test_factory.py20CODE
LOWtests/integration/language_model/test_factory.py20CODE
LOWtests/integration/language_model/test_factory.py22CODE
LOWtests/integration/language_model/test_factory.py23CODE
LOWtests/integration/language_model/test_factory.py24CODE
LOWtests/integration/language_model/test_factory.py24CODE
LOWtests/integration/language_model/test_factory.py24CODE
LOWtests/integration/language_model/test_factory.py24CODE
LOWtests/integration/language_model/test_factory.py24CODE
LOWtests/integration/language_model/test_factory.py24CODE
LOW…raphrag-llm/graphrag_llm/metrics/metrics_aggregator.py12CODE
LOW…-llm/graphrag_llm/metrics/default_metrics_processor.py13CODE
LOW…-llm/graphrag_llm/metrics/default_metrics_processor.py13CODE
LOW…-llm/graphrag_llm/metrics/default_metrics_processor.py15CODE
LOW…-llm/graphrag_llm/metrics/default_metrics_processor.py16CODE
LOW…-llm/graphrag_llm/metrics/default_metrics_processor.py16CODE
LOW…raphrag-llm/graphrag_llm/metrics/log_metrics_writer.py14CODE
LOW…ges/graphrag-llm/graphrag_llm/metrics/metrics_store.py10CODE
LOW…ges/graphrag-llm/graphrag_llm/metrics/metrics_store.py11CODE
LOW…es/graphrag-llm/graphrag_llm/metrics/metrics_writer.py10CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py6CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py7CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py8CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py8CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py12CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py13CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py13CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py17CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py18CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py18CODE
LOW…rag-llm/graphrag_llm/metrics/metrics_writer_factory.py16CODE
LOW…rag-llm/graphrag_llm/metrics/metrics_writer_factory.py18CODE
LOW…hrag-llm/graphrag_llm/metrics/metrics_store_factory.py15CODE
LOW…hrag-llm/graphrag_llm/metrics/metrics_store_factory.py17CODE
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py10CODE
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py10CODE
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py12CODE
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py13CODE
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py13CODE
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py13CODE
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py13CODE
LOW…-llm/graphrag_llm/metrics/metrics_processor_factory.py15CODE
LOW…phrag-llm/graphrag_llm/metrics/memory_metrics_store.py14CODE
LOW…aphrag-llm/graphrag_llm/metrics/file_metrics_writer.py15CODE
LOW…hrag-llm/graphrag_llm/middleware/with_request_count.py9CODE
LOW…hrag-llm/graphrag_llm/middleware/with_request_count.py9CODE
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py17CODE
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py17CODE
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py19CODE
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py20CODE
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py21CODE
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py22CODE
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py23CODE
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py24CODE
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py24CODE
LOW…llm/graphrag_llm/middleware/with_errors_for_testing.py14CODE
LOW…llm/graphrag_llm/middleware/with_errors_for_testing.py14CODE
LOW…kages/graphrag-llm/graphrag_llm/middleware/__init__.py6CODE
LOW…kages/graphrag-llm/graphrag_llm/middleware/__init__.py7CODE
329 more matches not shown…
Decorative Section Separators89 hits · 324 pts
SeverityFileLineSnippetContext
MEDIUMtests/unit/vector_stores/test_filtering.py18# ── Condition.evaluate ──────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/vector_stores/test_filtering.py65# ── AndExpr.evaluate ────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/vector_stores/test_filtering.py90# ── OrExpr.evaluate ─────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/vector_stores/test_filtering.py115# ── NotExpr.evaluate ────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/vector_stores/test_filtering.py130# ── F builder ───────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/vector_stores/test_filtering.py176# ── Operator overloads ──────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/vector_stores/test_filtering.py208# ── AND/OR flattening ──────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/vector_stores/test_filtering.py227# ── Double negation ────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/vector_stores/test_filtering.py243# ── JSON round-trip ─────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/graphs/test_modularity.py19# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_modularity.py21# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_modularity.py85# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_modularity.py87# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_modularity.py107# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_modularity.py109# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_connected_components.py31# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_connected_components.py33# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_connected_components.py52# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_connected_components.py54# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_connected_components.py133# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_connected_components.py135# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_stable_lcc.py55# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_stable_lcc.py57# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_stable_lcc.py96# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_stable_lcc.py98# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_stable_lcc.py114# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_stable_lcc.py116# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_stable_lcc.py139# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_stable_lcc.py141# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_stable_lcc.py177# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_stable_lcc.py179# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_cluster_graph.py86# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_cluster_graph.py88# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_cluster_graph.py146# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_cluster_graph.py148# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_cluster_graph.py182# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_cluster_graph.py184# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_cluster_graph.py30# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_cluster_graph.py32# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_cluster_graph.py244# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_cluster_graph.py246# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py137# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py139# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py247# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py249# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py286# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py288# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py380# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py382# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py443# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py445# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py564# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py566# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py171# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py173# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py488# -------------------------------------------------------------------COMMENT
MEDIUMtests/unit/indexing/test_create_communities.py490# -------------------------------------------------------------------COMMENT
MEDIUMtests/verbs/test_create_final_text_units.py29# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/verbs/test_create_final_text_units.py31# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/verbs/test_create_final_text_units.py61# ---------------------------------------------------------------------------COMMENT
29 more matches not shown…
Modern Structural Boilerplate121 hits · 121 pts
SeverityFileLineSnippetContext
LOWtests/smoke/test_fixtures.py22logger = logging.getLogger(__name__)CODE
LOWunified-search-app/app/app_logic.py26logger = logging.getLogger(__name__)CODE
LOWunified-search-app/app/knowledge_loader/data_prep.py19logger = logging.getLogger(__name__)CODE
LOW…h-app/app/knowledge_loader/data_sources/blob_source.py23logger = logging.getLogger(__name__)CODE
LOW…-app/app/knowledge_loader/data_sources/local_source.py17logger = logging.getLogger(__name__)CODE
LOW…search-app/app/knowledge_loader/data_sources/loader.py28logger = logging.getLogger(__name__)CODE
LOW…raphrag-llm/graphrag_llm/metrics/log_metrics_writer.py16logger = logging.getLogger(__name__)CODE
LOW…ges/graphrag-llm/graphrag_llm/metrics/metrics_store.py48 def update_metrics(self, *, metrics: "Metrics") -> None:CODE
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py23__all__ = [CODE
LOW…raphrag-llm/graphrag_llm/metrics/noop_metrics_store.py26 def update_metrics(self, *, metrics: Metrics) -> None:CODE
LOW…phrag-llm/graphrag_llm/metrics/memory_metrics_store.py80 def update_metrics(self, *, metrics: "Metrics") -> None:CODE
LOW…kages/graphrag-llm/graphrag_llm/middleware/__init__.py15__all__ = [CODE
LOW…s/graphrag-llm/graphrag_llm/middleware/with_logging.py16logger = logging.getLogger(__name__)CODE
LOWpackages/graphrag-llm/graphrag_llm/types/__init__.py33__all__ = [CODE
LOWpackages/graphrag-llm/graphrag_llm/cache/__init__.py8__all__ = [CODE
LOWpackages/graphrag-llm/graphrag_llm/retry/__init__.py9__all__ = [CODE
LOW…kages/graphrag-llm/graphrag_llm/config/model_config.py16logger = logging.getLogger(__name__)CODE
LOWpackages/graphrag-llm/graphrag_llm/config/__init__.py25__all__ = [CODE
LOW…ckages/graphrag-llm/graphrag_llm/tokenizer/__init__.py12__all__ = [CODE
LOW…ckages/graphrag-llm/graphrag_llm/embedding/__init__.py12__all__ = [CODE
LOW…kages/graphrag-llm/graphrag_llm/completion/__init__.py12__all__ = [CODE
LOWpackages/graphrag-llm/graphrag_llm/utils/__init__.py28__all__ = [CODE
LOW…kages/graphrag-llm/graphrag_llm/templating/__init__.py17__all__ = [CODE
LOW…kages/graphrag-llm/graphrag_llm/rate_limit/__init__.py12__all__ = [CODE
LOW…phrag-llm/graphrag_llm/model_cost_registry/__init__.py11__all__ = ["ModelCosts", "model_cost_registry"]CODE
LOW…ckages/graphrag-llm/graphrag_llm/threading/__init__.py8__all__ = [CODE
LOWpackages/graphrag/graphrag/logger/progress.py12logger = logging.getLogger(__name__)CODE
LOWpackages/graphrag/graphrag/cli/index.py24logger = logging.getLogger(__name__)CODE
LOWpackages/graphrag/graphrag/cli/initialize.py35logger = logging.getLogger(__name__)CODE
LOWpackages/graphrag/graphrag/cli/prompt_tune.py22logger = logging.getLogger(__name__)CODE
LOWpackages/graphrag/graphrag/data_model/__init__.py8__all__ = ["DataReader"]CODE
LOWpackages/graphrag/graphrag/api/query.py59logger = logging.getLogger(__name__)CODE
LOWpackages/graphrag/graphrag/api/index.py26logger = logging.getLogger(__name__)CODE
LOWpackages/graphrag/graphrag/api/__init__.py24__all__ = [ # noqa: RUF022CODE
LOWpackages/graphrag/graphrag/api/prompt_tune.py48logger = logging.getLogger(__name__)CODE
LOWpackages/graphrag/graphrag/index/validate_config.py19logger = logging.getLogger(__name__)CODE
LOW…g/graphrag/index/workflows/generate_text_embeddings.py35logger = logging.getLogger(__name__)CODE
LOW…rag/graphrag/index/workflows/create_base_text_units.py24logger = logging.getLogger(__name__)CODE
LOW…phrag/index/workflows/create_community_reports_text.py37logger = logging.getLogger(__name__)CODE
LOW…g/graphrag/index/workflows/update_community_reports.py18logger = logging.getLogger(__name__)CODE
LOW…g/graphrag/index/workflows/create_community_reports.py38logger = logging.getLogger(__name__)CODE
LOW…kages/graphrag/graphrag/index/workflows/prune_graph.py17logger = logging.getLogger(__name__)CODE
LOW…rag/graphrag/index/workflows/update_final_documents.py14logger = logging.getLogger(__name__)CODE
LOW…phrag/graphrag/index/workflows/load_input_documents.py17logger = logging.getLogger(__name__)CODE
LOW…ag/graphrag/index/workflows/create_final_text_units.py22logger = logging.getLogger(__name__)CODE
LOW…graphrag/graphrag/index/workflows/extract_graph_nlp.py26logger = logging.getLogger(__name__)CODE
LOW…raphrag/graphrag/index/workflows/extract_covariates.py29logger = logging.getLogger(__name__)CODE
LOWpackages/graphrag/graphrag/index/workflows/factory.py14logger = logging.getLogger(__name__)CODE
LOW…raphrag/graphrag/index/workflows/create_communities.py22logger = logging.getLogger(__name__)CODE
LOW…hrag/graphrag/index/workflows/load_update_documents.py19logger = logging.getLogger(__name__)CODE
LOW…es/graphrag/graphrag/index/workflows/finalize_graph.py25logger = logging.getLogger(__name__)CODE
LOW…ges/graphrag/graphrag/index/workflows/extract_graph.py29logger = logging.getLogger(__name__)CODE
LOW…phrag/index/workflows/update_entities_relationships.py27logger = logging.getLogger(__name__)CODE
LOW…rag/graphrag/index/workflows/create_final_documents.py19logger = logging.getLogger(__name__)CODE
LOW…raphrag/graphrag/index/workflows/update_clean_state.py12logger = logging.getLogger(__name__)CODE
LOW…graphrag/graphrag/index/workflows/update_covariates.py18logger = logging.getLogger(__name__)CODE
LOW…raphrag/graphrag/index/workflows/update_communities.py17logger = logging.getLogger(__name__)CODE
LOW…rag/graphrag/index/workflows/update_text_embeddings.py19logger = logging.getLogger(__name__)CODE
LOW…graphrag/graphrag/index/workflows/update_text_units.py18logger = logging.getLogger(__name__)CODE
LOW…ages/graphrag/graphrag/index/utils/derive_from_rows.py20logger = logging.getLogger(__name__)CODE
61 more matches not shown…
Self-Referential Comments20 hits · 62 pts
SeverityFileLineSnippetContext
MEDIUMtests/unit/indexing/cache/test_file_pipeline_cache.py34 # Create a cache directoryCOMMENT
MEDIUMtests/integration/vector_stores/test_azure_ai_search.py46 # Create the necessary mocks firstCOMMENT
MEDIUMtests/integration/vector_stores/test_azure_ai_search.py65 # Create the necessary mocks firstCOMMENT
MEDIUMtests/integration/vector_stores/test_azure_ai_search.py126 # Define a simple text embedder function for testingCOMMENT
MEDIUMtests/integration/vector_stores/test_azure_ai_search.py141 # Create a mock embedder that returns None and verify that no results are producedCOMMENT
MEDIUMtests/integration/vector_stores/test_azure_ai_search.py195 # Define a simple text embedder function for testingCOMMENT
MEDIUMtests/integration/vector_stores/test_cosmosdb.py55 # Define a simple text embedder function for testingCOMMENT
MEDIUMtests/integration/vector_stores/test_cosmosdb.py132 # Define a simple text embedder function for testingCOMMENT
MEDIUMtests/integration/vector_stores/test_factory.py67 # Create a mock that satisfies the VectorStore interfaceCOMMENT
MEDIUMtests/integration/vector_stores/test_lancedb.py108 # Define a simple text embedder function for testingCOMMENT
MEDIUMtests/integration/cache/test_factory.py102 # Create a mock that satisfies the PipelineCache interfaceCOMMENT
MEDIUMtests/integration/storage/test_factory.py78 # Create a mock that satisfies the Storage interfaceCOMMENT
MEDIUMunified-search-app/app/data_config.py6# This file is used to store configurations for the graph-indexed data and the LLM/embeddings models used in the app.COMMENT
MEDIUM…summarize_communities/graph_context/context_builder.py160 # Create the ALL_CONTEXT columnCOMMENT
MEDIUM…graphrag/query/structured_search/drift_search/state.py83 # Create a mapping from nodes to unique IDsCOMMENT
MEDIUMpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py91 # Define the container vector policyCOMMENT
MEDIUMpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py103 # Define the vector indexing policyCOMMENT
MEDIUMpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py121 # Create the container and container clientCOMMENT
MEDIUMpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py132 # Create the container with compatible indexing policyCOMMENT
MEDIUMpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py158 # Create a CosmosDB container on overwriteCOMMENT
Excessive Try-Catch Wrapping49 hits · 51 pts
SeverityFileLineSnippetContext
LOWunified-search-app/app/home_page.py60 except Exception as e: # noqa: BLE001CODE
LOWunified-search-app/app/home_page.py234 except Exception as e: # noqa: BLE001CODE
LOW…h-app/app/knowledge_loader/data_sources/blob_source.py95 except Exception as err:CODE
LOW…h-app/app/knowledge_loader/data_sources/blob_source.py117 except Exception as err:CODE
LOW…search-app/app/knowledge_loader/data_sources/loader.py61 except Exception as e: # noqa: BLE001CODE
MEDIUM…search-app/app/knowledge_loader/data_sources/loader.py62 print(f"Error loading dataset config: {e}") # noqa T201CODE
LOW…hrag-llm/graphrag_llm/middleware/with_request_count.py57 except Exception:CODE
LOW…hrag-llm/graphrag_llm/middleware/with_request_count.py76 except Exception:CODE
LOW…ges/graphrag-llm/graphrag_llm/middleware/with_cache.py92 except Exception: # noqa: BLE001CODE
LOW…ges/graphrag-llm/graphrag_llm/middleware/with_cache.py140 except Exception: # noqa: BLE001CODE
LOW…s/graphrag-llm/graphrag_llm/middleware/with_logging.py50 except Exception as e:CODE
LOW…s/graphrag-llm/graphrag_llm/middleware/with_logging.py65 except Exception as e:CODE
LOW…s/graphrag-llm/graphrag_llm/retry/exponential_retry.py71 except Exception as e:CODE
LOW…s/graphrag-llm/graphrag_llm/retry/exponential_retry.py103 except Exception as e:CODE
LOW…ges/graphrag-llm/graphrag_llm/retry/immediate_retry.py51 except Exception as e:CODE
LOW…ges/graphrag-llm/graphrag_llm/retry/immediate_retry.py75 except Exception as e:CODE
LOW…aphrag-llm/graphrag_llm/utils/function_tool_manager.py128 except Exception as e:CODE
LOW…g-llm/graphrag_llm/templating/jinja_template_engine.py48 except Exception as e:CODE
LOW…aphrag-llm/graphrag_llm/threading/completion_thread.py90 except Exception as e: # noqa: BLE001CODE
LOW…raphrag-llm/graphrag_llm/threading/embedding_thread.py87 except Exception as e: # noqa: BLE001CODE
LOWpackages/graphrag/graphrag/index/validate_config.py29 except Exception as e: # noqa: BLE001CODE
LOWpackages/graphrag/graphrag/index/validate_config.py46 except Exception as e: # noqa: BLE001CODE
LOW…ages/graphrag/graphrag/index/utils/derive_from_rows.py147 except Exception as e: # noqa: BLE001CODE
LOW…index/operations/extract_covariates/claim_extractor.py91 except Exception as e:CODE
LOW…rations/summarize_communities/summarize_communities.py162 except Exception:CODE
LOW…s/summarize_communities/community_reports_extractor.py88 except Exception as e:CODE
LOW…hrag/index/operations/extract_graph/graph_extractor.py66 except Exception as e: # pragma: no cover - defensive loggingCODE
LOWpackages/graphrag/graphrag/index/run/run_pipeline.py153 except Exception as e:CODE
LOW…aphrag/query/structured_search/global_search/search.py264 except Exception:CODE
LOW…aphrag/query/structured_search/global_search/search.py421 except Exception:CODE
LOW…raphrag/query/structured_search/local_search/search.py134 except Exception:CODE
LOW…raphrag/query/structured_search/basic_search/search.py128 except Exception:CODE
LOW…ages/graphrag/graphrag/query/question_gen/local_gen.py138 except Exception:CODE
LOW…ages/graphrag/graphrag/query/question_gen/local_gen.py229 except Exception:CODE
LOW…/graphrag-common/graphrag_common/config/load_config.py191 except Exception as error:CODE
LOW…/graphrag-common/graphrag_common/config/load_config.py198 except Exception as error:CODE
LOW…raphrag-storage/graphrag_storage/azure_blob_storage.py154 except Exception: # noqa: BLE001CODE
LOW…raphrag-storage/graphrag_storage/azure_blob_storage.py175 except Exception: # noqa: BLE001CODE
LOW…raphrag-storage/graphrag_storage/azure_blob_storage.py194 except Exception:CODE
LOW…raphrag-storage/graphrag_storage/azure_blob_storage.py250 except Exception: # noqa: BLE001CODE
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py147 except Exception: # noqa: BLE001CODE
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py171 except Exception:CODE
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py202 except Exception:CODE
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py214 except Exception:CODE
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py231 except Exception:CODE
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py322 except Exception: # noqa: BLE001CODE
LOW…rage/graphrag_storage/tables/parquet_table_provider.py68 except Exception:CODE
LOW…-storage/graphrag_storage/tables/csv_table_provider.py74 except Exception:CODE
LOWpackages/graphrag-input/graphrag_input/input_reader.py61 except Exception as e: # noqa: BLE001 (catching Exception is fine here)CODE
Over-Commented Block38 hits · 38 pts
SeverityFileLineSnippetContext
LOWtests/smoke/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/vector_stores/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/hasher/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/config/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/graphrag_factory/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/utils/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/storage/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/chunking/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/load_config/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/indexing/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/indexing/cache/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/indexing/update/__init__.py1# Copyright (C) 2026 Microsoft Corporation.COMMENT
LOWtests/unit/indexing/input/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/indexing/graph/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/indexing/graph/utils/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/indexing/graph/extractors/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOW…ndexing/graph/extractors/community_reports/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/indexing/operations/__init__.py1# Copyright (C) 2026 MicrosoftCOMMENT
LOWtests/unit/indexing/operations/embed_text/__init__.py1# Copyright (C) 2026 MicrosoftCOMMENT
LOWtests/unit/indexing/verbs/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/indexing/verbs/entities/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOW…ts/unit/indexing/verbs/entities/extraction/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOW…exing/verbs/entities/extraction/strategies/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOW…s/extraction/strategies/graph_intelligence/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/query/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/query/context_builder/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/query/input/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/query/input/retrieval/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/integration/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/integration/cache/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/integration/storage/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/integration/language_model/__init__.py1# Copyright (c) 2025 Microsoft Corporation.COMMENT
LOWtests/verbs/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/verbs/test_extract_graph.py61 # this is because the mock responses always result in a single description, which is returned verbatim rather than sCOMMENT
LOWtests/notebook/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOW…rag/graphrag/prompt_tune/prompt/entity_relationship.py81##COMMENT
LOW…kages/graphrag/graphrag/prompts/index/extract_graph.py81##COMMENT
Modern AI Meta-Vocabulary11 hits · 32 pts
SeverityFileLineSnippetContext
MEDIUMdocs/index.md23## GraphRAG vs Baseline RAG 🔍COMMENT
MEDIUMdocs/index/inputs.md75As described on the [default dataflow](default_dataflow.md#phase-1-compose-textunits) page, documents are *chunked* intoCODE
MEDIUMdocs/index/byog.md41See the full text_units [table schema](./outputs.md#text_units). Text units are chunks of your documents that are sized CODE
MEDIUMunified-search-app/app/home_page.py27 "#### GraphRAG: A Novel Knowledge Graph-based Approach to Retrieval Augmented Generation (RAG)"CODE
MEDIUMunified-search-app/app/home_page.py138 title="##### GraphRAG: Basic RAG",CODE
MEDIUM…graphrag_llm/rate_limit/sliding_window_rate_limiter.py105 # to be processed if it is larger than the tpm but smaller than context window.COMMENT
MEDIUM…graphrag_llm/rate_limit/sliding_window_rate_limiter.py106 # tpm is a rate/soft limit and not the hard limit of context window limits.COMMENT
MEDIUM…ages/graphrag/graphrag/query/structured_search/base.py34 # actual text strings that are in the context window, built from context_dataCOMMENT
MEDIUM…/query/structured_search/local_search/mixed_context.py460 # we return all the candidate entities/relationships/covariates (not only those that were fitted into the coCOMMENT
MEDIUM…/query/structured_search/local_search/mixed_context.py461 # and add a tag to indicate which records were included in the context windowCOMMENT
MEDIUM…/query/structured_search/basic_search/basic_context.py80 # add these related text chunks into context until we fill up the context windowCOMMENT
AI Structural Patterns25 hits · 25 pts
SeverityFileLineSnippetContext
LOWpackages/graphrag/graphrag/cli/main.py250CODE
LOWpackages/graphrag/graphrag/cli/main.py365CODE
LOWpackages/graphrag/graphrag/data_model/relationship.py41CODE
LOWpackages/graphrag/graphrag/data_model/text_unit.py38CODE
LOWpackages/graphrag/graphrag/data_model/community.py47CODE
LOW…kages/graphrag/graphrag/data_model/community_report.py41CODE
LOWpackages/graphrag/graphrag/data_model/entity.py41CODE
LOWpackages/graphrag/graphrag/api/prompt_tune.py52CODE
LOW…ns/summarize_communities/graph_context/sort_context.py11CODE
LOWpackages/graphrag/graphrag/index/run/utils.py23CODE
LOW…ag/graphrag/query/context_builder/community_context.py24CODE
LOW…g/query/context_builder/dynamic_community_selection.py32CODE
LOWpackages/graphrag/graphrag/query/input/loaders/dfs.py35CODE
LOWpackages/graphrag/graphrag/query/input/loaders/dfs.py77CODE
LOWpackages/graphrag/graphrag/query/input/loaders/dfs.py149CODE
LOWpackages/graphrag/graphrag/query/input/loaders/dfs.py191CODE
LOWpackages/graphrag/graphrag/query/input/loaders/dfs.py225CODE
LOW…y/structured_search/global_search/community_context.py56CODE
LOW…aphrag/query/structured_search/global_search/search.py58CODE
LOW…/query/structured_search/local_search/mixed_context.py89CODE
LOW…/query/structured_search/local_search/mixed_context.py375CODE
LOW…/query/structured_search/drift_search/drift_context.py42CODE
LOW…/graphrag-common/graphrag_common/config/load_config.py106CODE
LOW…ages/graphrag-vectors/graphrag_vectors/vector_store.py59CODE
LOW…orage/graphrag_storage/tables/cosmos_table_provider.py61CODE
Redundant / Tautological Comments14 hits · 22 pts
SeverityFileLineSnippetContext
LOWtests/unit/indexing/cache/test_file_pipeline_cache.py45 # Check if the cache directory is emptyCOMMENT
LOWtests/integration/vector_stores/test_factory.py85 # Check if it's in the list of registered vector store typesCOMMENT
LOWtests/integration/cache/test_factory.py117 # Check if it's in the list of registered cache typesCOMMENT
LOWtests/integration/logging/test_factory.py50 # Check if it's in the list of registered logger typesCOMMENT
LOW…graphrag_llm/rate_limit/sliding_window_rate_limiter.py101 # Check if current token window exceeds token limitCOMMENT
LOW…graphrag/prompt_tune/generator/extract_graph_prompt.py106 # Write file to output pathCOMMENT
LOW…rompt_tune/generator/community_report_summarization.py46 # Write file to output pathCOMMENT
LOW…g/prompt_tune/generator/entity_summarization_prompt.py35 # Write file to output pathCOMMENT
LOWpackages/graphrag/graphrag/logger/standard_logging.py76 # Close file handlers properly before removing themCOMMENT
LOW…kages/graphrag/graphrag/logger/blob_workflow_logger.py106 ): # Check if block count exceeds 25kCODE
LOWpackages/graphrag/graphrag/index/update/communities.py34 # Check if size and period columns exist in the old_communities. If not, add themCOMMENT
LOWpackages/graphrag/graphrag/index/update/communities.py110 # Check if size and period columns exist in the old_community_reports. If not, add themCOMMENT
LOW…ag/graphrag/query/context_builder/community_context.py176 # Check if the current batch has been addedCOMMENT
LOW…raphrag/query/structured_search/drift_search/search.py219 # Check if query state is emptyCOMMENT
Deep Nesting20 hits · 20 pts
SeverityFileLineSnippetContext
LOWtests/smoke/test_fixtures.py150CODE
LOWunified-search-app/app/home_page.py20CODE
LOWunified-search-app/app/ui/report_details.py18CODE
LOWunified-search-app/app/ui/search.py63CODE
LOWunified-search-app/app/ui/search.py121CODE
LOWunified-search-app/app/ui/search.py192CODE
LOWscripts/copy_build_assets.py10CODE
LOW…kages/graphrag-llm/graphrag_llm/tokenizer/tokenizer.py50CODE
LOWpackages/graphrag/graphrag/prompt_tune/loader/input.py44CODE
LOWpackages/graphrag/graphrag/utils/cli.py27CODE
LOWpackages/graphrag/graphrag/utils/cli.py31CODE
LOW…raphrag/graphrag/index/workflows/create_communities.py195CODE
LOW…ns/summarize_communities/graph_context/sort_context.py11CODE
LOW…ag/graphrag/query/context_builder/community_context.py189CODE
LOW…g/query/context_builder/dynamic_community_selection.py73CODE
LOWpackages/graphrag/graphrag/query/llm/text_utils.py44CODE
LOW…aphrag/query/structured_search/global_search/search.py306CODE
LOW…/query/structured_search/local_search/mixed_context.py375CODE
LOWpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py166CODE
LOW…s/graphrag-vectors/graphrag_vectors/azure_ai_search.py168CODE
Cross-Language Confusion4 hits · 18 pts
SeverityFileLineSnippetContext
HIGH…rag/graphrag/index/workflows/create_base_text_units.py41 total_rows = await documents_table.length()CODE
HIGHpackages/graphrag/graphrag/index/utils/is_null.py11 """Check if value is null or is nan."""STRING
HIGH…/index/operations/build_noun_graph/build_noun_graph.py70 total = await text_unit_table.length()CODE
HIGH…orage/graphrag_storage/tables/cosmos_table_provider.py497 return await inner.length()CODE
AI Slop Vocabulary4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMpackages/graphrag/graphrag/query/factory.py130 # TODO: Allow for another llm definition only for Global Search to leverage -mini modelsCOMMENT
MEDIUM…raphrag/query/structured_search/drift_search/search.py280 # Reduce response_state to a single comprehensive responseCOMMENT
MEDIUM…raphrag/query/structured_search/drift_search/search.py359 """Reduce the response to a single comprehensive response.STRING
MEDIUM…raphrag/query/structured_search/drift_search/search.py418 """Reduce the response to a single comprehensive response.STRING
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHunified-search-app/app/home_page.py157 caption="###### Answer context: AI-generated network reports covering all input documents",CODE
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOW…aphrag/query/structured_search/global_search/search.py156 # Step 1: Generate answers for each batch of community short summariesCOMMENT
LOW…aphrag/query/structured_search/global_search/search.py190 # Step 2: Combine the intermediate answers from step 2 to generate the final answerCOMMENT
Structural Annotation Overuse2 hits · 3 pts
SeverityFileLineSnippetContext
LOW…aphrag/query/structured_search/global_search/search.py156 # Step 1: Generate answers for each batch of community short summariesCOMMENT
LOW…aphrag/query/structured_search/global_search/search.py190 # Step 2: Combine the intermediate answers from step 2 to generate the final answerCOMMENT
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWpackages/graphrag-vectors/graphrag_vectors/lancedb.py55 pa_type, dummy_value = types[field_type]CODE
LOWpackages/graphrag-vectors/graphrag_vectors/lancedb.py56 others[field_name] = pa.array([dummy_value], type=pa_type())CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOW…ages/graphrag/graphrag/index/utils/derive_from_rows.py75 async def execute_task(task: Coroutine) -> ItemType | None:CODE