AI Slop Code RIsk Monitor

microsoft/graphrag

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

33.1 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for microsoft/graphrag, a Python project with 36,286 GitHub stars. SynthScan examined 62,954 lines of code across 746 source files, recording 1313 pattern matches distributed across 20 syntactic categories. The legacy adjusted pattern signal is 33.1 (High pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

33.1
Adjusted Signal
33.1
Raw Pattern Score
100%
Time Factor
2026-10-08
Last Push
36.3K
Stars
Python
Language
63.0K
Lines of Code
746
Files
1.3K
Pattern Hits
2026-10-12
Scan Date
0.15
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 40.4/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 552 finding(s).

Hallucinated Dependency & Supply Chain Risk 27.6/100 · MEDIUM

Are imports declared and package/API names verified? 396 finding(s).

Agent Over-Engineering Ratio 69.1/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 800 finding(s).

PR Review Velocity Impact 81.4/100 · CRITICAL

Which changes need focused human review? 1313 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 111MEDIUM 125LOW 1077

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1313 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

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 Identifiers410 hits · 430 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
LOW⚡tests/unit/logger/test_blob_workflow_logger.py49def test_init_requires_container_name(mock_credential):CODE
LOW⚡tests/unit/logger/test_blob_workflow_logger.py59def test_init_requires_connection_or_account_url():CODE
LOW⚡tests/unit/logger/test_blob_workflow_logger.py68def test_init_creates_append_blob(mock_blob_service, mock_credential):CODE
LOWtests/unit/logger/test_blob_workflow_logger.py79def test_init_uses_provided_blob_name(mock_blob_service, mock_credential):CODE
LOWtests/unit/logger/test_blob_workflow_logger.py86def test_rotate_blob_does_not_reinitialize_handler(mock_blob_service, mock_credential):CODE
LOWtests/unit/logger/test_blob_workflow_logger.py116def test_rotate_blob_creates_new_blob_name(mock_blob_service, mock_credential):CODE
LOWtests/unit/logger/test_blob_workflow_logger.py132def test_write_log_appends_block(mock_blob_service, mock_credential):CODE
LOWtests/unit/cache/test_cache_get_many.py31async def test_get_many_empty_input_returns_empty(cache):CODE
LOWtests/unit/cache/test_cache_get_many.py36async def test_get_many_returns_hits_and_omits_misses(cache):CODE
LOWtests/unit/cache/test_cache_get_many.py50async def test_get_many_deduplicates_keys_and_matches_get(cache):CODE
LOWtests/unit/cache/test_cache_get_many.py60async def test_get_many_child_namespaces_are_isolated(cache):CODE
LOWtests/unit/cache/test_cache_get_many.py77async def test_default_get_many_supports_custom_cache_implementations():CODE
LOWtests/unit/cache/test_sqlite_cache.py22async def test_sqlite_cache_round_trip_and_persistence(tmp_path):CODE
LOWtests/unit/cache/test_sqlite_cache.py37async def test_sqlite_cache_overwrites_and_deletes_values(tmp_path):CODE
LOWtests/unit/cache/test_sqlite_cache.py54async def test_sqlite_cache_child_namespaces_are_isolated(tmp_path):CODE
LOWtests/unit/cache/test_sqlite_cache.py70async def test_sqlite_cache_supports_concurrent_writes(tmp_path):CODE
LOWtests/unit/cache/test_sqlite_cache.py81async def test_sqlite_cache_get_many_batches_with_one_thread_and_connection(CODE
LOWtests/unit/cache/test_sqlite_cache.py148async def test_sqlite_cache_removes_invalid_payload(tmp_path, payload):CODE
LOWtests/unit/cache/test_sqlite_cache.py165async def test_corruption_cleanup_preserves_newer_value(tmp_path):CODE
LOWtests/unit/cache/test_sqlite_cache.py187async def test_get_many_removes_invalid_payloads(tmp_path):CODE
LOWtests/unit/cache/test_sqlite_cache.py210async def test_get_many_corruption_cleanup_preserves_newer_value(tmp_path):CODE
LOWtests/unit/cache/test_sqlite_cache.py212 def _delete_many_if_unchanged(self, connection, entries):CODE
LOWtests/unit/cache/test_sqlite_cache.py231async def test_get_many_supports_concurrent_reader_and_writer(tmp_path):CODE
LOWtests/unit/cache/test_sqlite_cache.py243def test_sqlite_cache_uses_database_name_within_storage(tmp_path):CODE
LOWtests/unit/cache/test_sqlite_cache.py265def test_sqlite_cache_rejects_database_path(tmp_path, database_name):CODE
LOWtests/unit/cache/test_sqlite_cache.py276def test_sqlite_cache_rejects_non_file_storage():CODE
LOWtests/unit/cache/test_sqlite_cache.py289def test_sqlite_cache_config_rejects_non_file_storage(storage_type):CODE
LOWtests/unit/cache/test_sqlite_cache.py300def test_sqlite_cache_config_requires_storage():CODE
LOWtests/unit/cache/test_cache_benchmark.py61async def test_bulk_read_cache_benchmark(tmp_path, pytestconfig):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
LOW⚡tests/unit/config/utils.py230def assert_summarize_descriptions_configs(CODE
LOW⚡tests/unit/config/utils.py238def assert_community_reports_configs(CODE
LOW⚡tests/unit/config/utils.py248def assert_extract_claims_configs(CODE
LOW⚡tests/unit/config/utils.py258def assert_cluster_graph_configs(CODE
LOW⚡tests/unit/config/utils.py266def assert_local_search_configs(CODE
LOWtests/unit/config/utils.py280def assert_global_search_configs(CODE
350 more matches not shown…
Unused Imports390 hits · 388 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
330 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
MEDIUM⚡tests/unit/graphs/test_modularity.py107# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/graphs/test_modularity.py109# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_connected_components.py31# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/graphs/test_connected_components.py33# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/graphs/test_connected_components.py52# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/graphs/test_connected_components.py54# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/graphs/test_connected_components.py133# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/graphs/test_connected_components.py135# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/graphs/test_stable_lcc.py55# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/graphs/test_stable_lcc.py57# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/graphs/test_stable_lcc.py96# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/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
MEDIUM⚡tests/unit/graphs/test_stable_lcc.py177# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/graphs/test_stable_lcc.py179# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_cluster_graph.py86# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_cluster_graph.py88# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_cluster_graph.py146# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_cluster_graph.py148# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_cluster_graph.py182# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/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
MEDIUM⚡tests/unit/indexing/test_create_communities.py137# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_create_communities.py139# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_create_communities.py247# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_create_communities.py249# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_create_communities.py286# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_create_communities.py288# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_create_communities.py380# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_create_communities.py382# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_create_communities.py443# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_create_communities.py445# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/indexing/test_create_communities.py564# -------------------------------------------------------------------COMMENT
MEDIUM⚡tests/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
MEDIUM⚡tests/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.py129 # 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.py117 # Create a mock that satisfies the PipelineCache interfaceCOMMENT
MEDIUM⚡tests/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.py141 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 Block41 hits · 41 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/logger/__init__.py1# Copyright (c) 2024 Microsoft Corporation.COMMENT
LOWtests/unit/cache/__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/language_model/__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.md87As 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.py462 # 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.py463 # 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.py58CODE
LOW…aphrag/query/structured_search/global_search/search.py58CODE
LOW…/query/structured_search/local_search/mixed_context.py91CODE
LOW…/query/structured_search/local_search/mixed_context.py377CODE
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
Deep Nesting22 hits · 22 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…ges/graphrag-llm/graphrag_llm/middleware/with_cache.py21CODE
LOW…ges/graphrag-llm/graphrag_llm/middleware/with_cache.py56CODE
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.py49CODE
LOW…aphrag/query/structured_search/global_search/search.py306CODE
LOW…/query/structured_search/local_search/mixed_context.py377CODE
LOWpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py166CODE
LOW…s/graphrag-vectors/graphrag_vectors/azure_ai_search.py168CODE
Redundant / Tautological Comments13 hits · 21 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
LOW⚡tests/integration/cache/test_factory.py132 # 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
LOWpackages/graphrag/graphrag/index/update/communities.py32 # Check if size and period columns exist in the old_communities. If not, add themCOMMENT
LOWpackages/graphrag/graphrag/index/update/communities.py108 # 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
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
Empty Error Handlers3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHtests/unit/indexing/test_profiling.py78except ValueError:CODE
HIGH…ges/graphrag-llm/graphrag_llm/middleware/with_cache.py141except Exception: # noqa: BLE001CODE
HIGH…ges/graphrag-llm/graphrag_llm/middleware/with_cache.py92except Exception: # noqa: BLE001CODE
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