Repository Analysis

microsoft/graphrag

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

30.4 Strong AI signal View on GitHub
30.4
Adjusted Score
30.4
Raw Score
100%
Time Factor
2026-05-28
Last Push
33,325
Stars
Python
Language
61,082
Lines of Code
727
Files
1111
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 110MEDIUM 114LOW 887

Pattern Findings

1111 matches across 14 categories. Click a row to expand file-level details.

Cross-File Repetition105 hits · 525 pts
SeverityFileLineSnippet
HIGHtests/unit/config/test_template_engine_config.py0test that missing required parameters raise validation errors.
HIGHtests/unit/config/test_metrics_config.py0test that missing required parameters raise validation errors.
HIGHtests/unit/config/test_retry_config.py0test that missing required parameters raise validation errors.
HIGHtests/unit/config/test_retry_config.py0test that missing required parameters raise validation errors.
HIGHtests/unit/config/test_tokenizer_config.py0test that missing required parameters raise validation errors.
HIGHtests/unit/config/test_rate_limit_config.py0test that missing required parameters raise validation errors.
HIGHtests/unit/config/test_model_config.py0test that missing required parameters raise validation errors.
HIGHtests/unit/graphs/test_compute_degree.py0build a relationships dataframe from (source, target, weight) tuples.
HIGHtests/unit/graphs/test_modularity.py0build a relationships dataframe from (source, target, weight) tuples.
HIGHtests/unit/graphs/test_connected_components.py0build a relationships dataframe from (source, target, weight) tuples.
HIGHtests/unit/graphs/test_stable_lcc.py0build a relationships dataframe from (source, target, weight) tuples.
HIGHtests/unit/graphs/test_modularity.py0load the realistic graph fixture as a relationships dataframe.
HIGHtests/unit/graphs/test_connected_components.py0load the realistic graph fixture as a relationships dataframe.
HIGHtests/unit/graphs/test_stable_lcc.py0load the realistic graph fixture as a relationships dataframe.
HIGHtests/integration/language_model/test_rate_limiter.py0with _num_requests = 10 and _rpm = 4, we expect the requests to be distributed across ceil(10/4) = 3 bins: with a stagge
HIGHtests/integration/language_model/test_rate_limiter.py0with _num_requests = 10 and _rpm = 4, we expect the requests to be distributed across ceil(10/4) = 3 bins: with a stagge
HIGHtests/integration/language_model/test_rate_limiter.py0with _num_requests = 10 and _rpm = 4, we expect the requests to be distributed across ceil(10/4) = 3 bins: with a stagge
HIGHtests/integration/language_model/test_rate_limiter.py0with _num_requests = 10, _tpm = 75 and _tokens_per_request = 25, we expect the requests to be distributed across ceil( (
HIGHtests/integration/language_model/test_rate_limiter.py0with _num_requests = 10, _tpm = 75 and _tokens_per_request = 25, we expect the requests to be distributed across ceil( (
HIGHtests/integration/language_model/test_rate_limiter.py0with _num_requests = 10, _tpm = 75 and _tokens_per_request = 25, we expect the requests to be distributed across ceil( (
HIGH…ges/graphrag-llm/graphrag_llm/metrics/metrics_store.py0clear all metrics from the store. returns ------- none
HIGH…raphrag-llm/graphrag_llm/metrics/noop_metrics_store.py0clear all metrics from the store. returns ------- none
HIGH…phrag-llm/graphrag_llm/metrics/memory_metrics_store.py0clear all metrics from the store. returns ------- none
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
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
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
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:
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:
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:
HIGHpackages/graphrag/graphrag/config/enums.py0noun phrase extractor based on dependency parsing and ner using spacy.
HIGH…oun_graph/np_extractors/syntactic_parsing_extractor.py0noun phrase extractor based on dependency parsing and ner using spacy.
HIGH…oun_graph/np_extractors/syntactic_parsing_extractor.py0noun phrase extractor based on dependency parsing and ner using spacy.
HIGH…/graphrag/graphrag/config/models/prune_graph_config.py0parameterization settings for the default configuration.
HIGH…graphrag/graphrag/config/models/basic_search_config.py0parameterization settings for the default configuration.
HIGH…rag/graphrag/config/models/extract_graph_nlp_config.py0parameterization settings for the default configuration.
HIGH…es/graphrag/graphrag/config/models/snapshots_config.py0parameterization settings for the default configuration.
HIGH…raphrag/graphrag/config/models/global_search_config.py0parameterization settings for the default configuration.
HIGH…s/graphrag/graphrag/config/models/embed_text_config.py0parameterization settings for the default configuration.
HIGH…raphrag/graphrag/config/models/cluster_graph_config.py0parameterization settings for the default configuration.
HIGH…raphrag/config/models/summarize_descriptions_config.py0parameterization settings for the default configuration.
HIGH…graphrag/graphrag/config/models/local_search_config.py0parameterization settings for the default configuration.
HIGH…es/graphrag/graphrag/config/models/graph_rag_config.py0parameterization settings for the default configuration.
HIGH…es/graphrag/graphrag/config/models/reporting_config.py0parameterization settings for the default configuration.
HIGH…graphrag/graphrag/config/models/drift_search_config.py0parameterization settings for the default configuration.
HIGH…raphrag/graphrag/config/models/extract_graph_config.py0parameterization settings for the default configuration.
HIGH…aphrag/graphrag/config/models/extract_claims_config.py0parameterization settings for the default configuration.
HIGH…rag/graphrag/config/models/community_reports_config.py0parameterization settings for the default configuration.
HIGH…graphrag-chunking/graphrag_chunking/chunking_config.py0parameterization settings for the default configuration.
HIGH…aphrag-vectors/graphrag_vectors/vector_store_config.py0parameterization settings for the default configuration.
HIGH…ages/graphrag-vectors/graphrag_vectors/index_schema.py0parameterization settings for the default configuration.
HIGHpackages/graphrag-input/graphrag_input/input_config.py0parameterization settings for the default configuration.
HIGH…phrag/graphrag/callbacks/workflow_callbacks_manager.py0execute this callback when an error occurs in the pipeline.
HIGH…ages/graphrag/graphrag/callbacks/workflow_callbacks.py0execute this callback when an error occurs in the pipeline.
HIGH…graphrag/graphrag/callbacks/noop_workflow_callbacks.py0execute this callback when an error occurs in the pipeline.
HIGH…phrag/graphrag/callbacks/console_workflow_callbacks.py0execute this callback when an error occurs in the pipeline.
HIGH…ages/graphrag/graphrag/callbacks/workflow_callbacks.py0execute this callback to signal when the entire pipeline starts.
HIGH…graphrag/graphrag/callbacks/noop_workflow_callbacks.py0execute this callback to signal when the entire pipeline starts.
HIGH…phrag/graphrag/callbacks/console_workflow_callbacks.py0execute this callback to signal when the entire pipeline starts.
HIGH…ages/graphrag/graphrag/callbacks/workflow_callbacks.py0execute this callback to signal when the entire pipeline ends.
HIGH…graphrag/graphrag/callbacks/noop_workflow_callbacks.py0execute this callback to signal when the entire pipeline ends.
45 more matches not shown…
Hyper-Verbose Identifiers375 hits · 393 pts
SeverityFileLineSnippet
LOWtests/unit/vector_stores/test_timestamp.py40 def test_empty_string_returns_empty(self):
LOWtests/unit/vector_stores/test_timestamp.py77 def test_produces_correct_keys(self):
LOWtests/unit/vector_stores/test_timestamp.py104 def test_contains_create_and_update_fields(self):
LOWtests/unit/vector_stores/test_filtering.py60 def test_missing_field_returns_false(self):
LOWtests/unit/vector_stores/test_filtering.py136 def test_eq_produces_condition(self):
LOWtests/unit/vector_stores/test_filtering.py305 def test_complex_nested_roundtrip(self):
LOWtests/unit/prompt_tune/test_load_docs_in_chunks.py104 async def test_top_selection_returns_limited_chunks(
LOWtests/unit/prompt_tune/test_load_docs_in_chunks.py141 async def test_random_selection_returns_correct_count(
LOWtests/unit/prompt_tune/test_load_docs_in_chunks.py176 async def test_escapes_braces_in_output(self, mock_config, mock_logger):
LOWtests/unit/prompt_tune/test_load_docs_in_chunks.py219 async def test_limit_out_of_range_uses_default(
LOWtests/unit/prompt_tune/test_load_docs_in_chunks.py258 async def test_chunks_all_documents(
LOWtests/unit/config/test_template_engine_config.py14def test_template_engine_config_validation() -> None:
LOWtests/unit/config/test_metrics_config.py13def test_file_metrics_writer_validation() -> None:
LOWtests/unit/config/test_retry_config.py10def test_exponential_backoff_validation() -> None:
LOWtests/unit/config/test_retry_config.py50def test_immediate_validation() -> None:
LOWtests/unit/config/test_tokenizer_config.py10def test_litellm_tokenizer_validation() -> None:
LOWtests/unit/config/test_rate_limit_config.py10def test_sliding_window_validation() -> None:
LOWtests/unit/config/utils.py57def get_default_graphrag_config() -> GraphRagConfig:
LOWtests/unit/config/utils.py73def assert_rate_limit_configs(
LOWtests/unit/config/utils.py115def assert_vector_store_configs(
LOWtests/unit/config/utils.py162def assert_text_embedding_configs(
LOWtests/unit/config/utils.py186def assert_extract_graph_configs(
LOWtests/unit/config/utils.py195def assert_text_analyzer_configs(
LOWtests/unit/config/utils.py210def assert_extract_graph_nlp_configs(
LOWtests/unit/config/utils.py218def assert_prune_graph_configs(
LOWtests/unit/config/utils.py230def assert_summarize_descriptions_configs(
LOWtests/unit/config/utils.py238def assert_community_reports_configs(
LOWtests/unit/config/utils.py248def assert_extract_claims_configs(
LOWtests/unit/config/utils.py258def assert_cluster_graph_configs(
LOWtests/unit/config/utils.py266def assert_local_search_configs(
LOWtests/unit/config/utils.py280def assert_global_search_configs(
LOWtests/unit/config/utils.py297def assert_drift_search_configs(
LOWtests/unit/config/utils.py330def assert_basic_search_configs(
LOWtests/unit/config/test_config.py45def test_load_config_with_cli_overrides() -> None:
LOWtests/unit/config/test_model_config.py11def test_litellm_provider_validation() -> None:
LOWtests/unit/utils/test_encoding.py16def test_num_tokens_empty_input():
LOWtests/unit/storage/test_csv_table_provider.py46 async def test_read_nonexistent_table_raises_error(self):
LOWtests/unit/storage/test_csv_table_provider.py62 async def test_dataframe_with_multiple_types(self):
LOWtests/unit/storage/test_parquet_table_provider.py41 async def test_read_nonexistent_table_raises_error(self):
LOWtests/unit/storage/test_parquet_table_provider.py55 async def test_dataframe_with_multiple_types(self):
LOWtests/unit/storage/test_csv_table.py58 async def test_original_readable_during_writes(
LOWtests/unit/storage/test_csv_table.py74 async def test_temp_file_replaces_original_on_close(
LOWtests/unit/storage/test_csv_table.py89 async def test_no_temp_file_left_after_close(
LOWtests/unit/storage/test_csv_table.py103 async def test_multiple_writes_accumulate_in_temp(
LOWtests/unit/storage/test_csv_table.py124 async def test_concurrent_read_and_write_same_file(
LOWtests/unit/storage/test_csv_table.py165 async def test_append_to_existing_file(
LOWtests/unit/storage/test_csv_table.py183 async def test_append_creates_file_with_header(
LOWtests/unit/storage/test_csv_table.py198 async def test_no_temp_file_used_for_append(
LOWtests/unit/storage/test_csv_table.py221 async def test_double_close_is_safe(
LOWtests/unit/storage/test_csv_table.py232 async def test_close_without_writes_is_safe(
LOWtests/unit/chunking/test_chunker.py55 def test_mixed_whitespace_handling(self):
LOWtests/unit/chunking/test_chunker.py96def test_split_text_str_empty():
LOWtests/unit/chunking/test_chunker.py108def test_split_text_on_tokens():
LOWtests/unit/chunking/test_chunker.py137def test_split_text_on_tokens_one_overlap():
LOWtests/unit/chunking/test_chunker.py169def test_split_text_on_tokens_no_overlap():
LOWtests/unit/chunking/test_prepend_metadata.py7def test_add_metadata_one_row():
LOWtests/unit/chunking/test_prepend_metadata.py17def test_add_metadata_one_row_append():
LOWtests/unit/chunking/test_prepend_metadata.py27def test_add_metadata_multiple_rows():
LOWtests/unit/chunking/test_prepend_metadata.py37def test_add_metadata_custom_delimiters():
LOWtests/unit/load_config/test_load_config.py16def test_load_config_validation():
315 more matches not shown…
Unused Imports389 hits · 387 pts
SeverityFileLineSnippet
LOWtests/unit/indexing/test_init_content.py5
LOWtests/integration/language_model/test_factory.py20
LOWtests/integration/language_model/test_factory.py20
LOWtests/integration/language_model/test_factory.py22
LOWtests/integration/language_model/test_factory.py23
LOWtests/integration/language_model/test_factory.py24
LOWtests/integration/language_model/test_factory.py24
LOWtests/integration/language_model/test_factory.py24
LOWtests/integration/language_model/test_factory.py24
LOWtests/integration/language_model/test_factory.py24
LOWtests/integration/language_model/test_factory.py24
LOW…raphrag-llm/graphrag_llm/metrics/metrics_aggregator.py12
LOW…-llm/graphrag_llm/metrics/default_metrics_processor.py13
LOW…-llm/graphrag_llm/metrics/default_metrics_processor.py13
LOW…-llm/graphrag_llm/metrics/default_metrics_processor.py15
LOW…-llm/graphrag_llm/metrics/default_metrics_processor.py16
LOW…-llm/graphrag_llm/metrics/default_metrics_processor.py16
LOW…raphrag-llm/graphrag_llm/metrics/log_metrics_writer.py14
LOW…ges/graphrag-llm/graphrag_llm/metrics/metrics_store.py10
LOW…ges/graphrag-llm/graphrag_llm/metrics/metrics_store.py11
LOW…es/graphrag-llm/graphrag_llm/metrics/metrics_writer.py10
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py6
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py7
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py8
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py8
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py12
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py13
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py13
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py17
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py18
LOWpackages/graphrag-llm/graphrag_llm/metrics/__init__.py18
LOW…rag-llm/graphrag_llm/metrics/metrics_writer_factory.py16
LOW…rag-llm/graphrag_llm/metrics/metrics_writer_factory.py18
LOW…hrag-llm/graphrag_llm/metrics/metrics_store_factory.py15
LOW…hrag-llm/graphrag_llm/metrics/metrics_store_factory.py17
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py10
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py10
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py12
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py13
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py13
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py13
LOW…graphrag-llm/graphrag_llm/metrics/metrics_processor.py13
LOW…-llm/graphrag_llm/metrics/metrics_processor_factory.py15
LOW…phrag-llm/graphrag_llm/metrics/memory_metrics_store.py14
LOW…aphrag-llm/graphrag_llm/metrics/file_metrics_writer.py15
LOW…hrag-llm/graphrag_llm/middleware/with_request_count.py9
LOW…hrag-llm/graphrag_llm/middleware/with_request_count.py9
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py17
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py17
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py19
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py20
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py21
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py22
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py23
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py24
LOW…lm/graphrag_llm/middleware/with_middleware_pipeline.py24
LOW…llm/graphrag_llm/middleware/with_errors_for_testing.py14
LOW…llm/graphrag_llm/middleware/with_errors_for_testing.py14
LOW…kages/graphrag-llm/graphrag_llm/middleware/__init__.py6
LOW…kages/graphrag-llm/graphrag_llm/middleware/__init__.py7
329 more matches not shown…
Decorative Section Separators89 hits · 324 pts
SeverityFileLineSnippet
MEDIUMtests/unit/vector_stores/test_filtering.py18# ── Condition.evaluate ──────────────────────────────────────────────────────
MEDIUMtests/unit/vector_stores/test_filtering.py65# ── AndExpr.evaluate ────────────────────────────────────────────────────────
MEDIUMtests/unit/vector_stores/test_filtering.py90# ── OrExpr.evaluate ─────────────────────────────────────────────────────────
MEDIUMtests/unit/vector_stores/test_filtering.py115# ── NotExpr.evaluate ────────────────────────────────────────────────────────
MEDIUMtests/unit/vector_stores/test_filtering.py130# ── F builder ───────────────────────────────────────────────────────────────
MEDIUMtests/unit/vector_stores/test_filtering.py176# ── Operator overloads ──────────────────────────────────────────────────────
MEDIUMtests/unit/vector_stores/test_filtering.py208# ── AND/OR flattening ──────────────────────────────────────────────────────
MEDIUMtests/unit/vector_stores/test_filtering.py227# ── Double negation ────────────────────────────────────────────────────────
MEDIUMtests/unit/vector_stores/test_filtering.py243# ── JSON round-trip ─────────────────────────────────────────────────────────
MEDIUMtests/unit/graphs/test_modularity.py19# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_modularity.py21# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_modularity.py85# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_modularity.py87# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_modularity.py107# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_modularity.py109# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_connected_components.py31# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_connected_components.py33# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_connected_components.py52# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_connected_components.py54# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_connected_components.py133# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_connected_components.py135# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_stable_lcc.py55# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_stable_lcc.py57# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_stable_lcc.py96# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_stable_lcc.py98# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_stable_lcc.py114# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_stable_lcc.py116# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_stable_lcc.py139# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_stable_lcc.py141# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_stable_lcc.py177# ---------------------------------------------------------------------------
MEDIUMtests/unit/graphs/test_stable_lcc.py179# ---------------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_cluster_graph.py86# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_cluster_graph.py88# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_cluster_graph.py146# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_cluster_graph.py148# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_cluster_graph.py182# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_cluster_graph.py184# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_cluster_graph.py30# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_cluster_graph.py32# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_cluster_graph.py244# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_cluster_graph.py246# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py137# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py139# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py247# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py249# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py286# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py288# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py380# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py382# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py443# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py445# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py564# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py566# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py171# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py173# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py488# -------------------------------------------------------------------
MEDIUMtests/unit/indexing/test_create_communities.py490# -------------------------------------------------------------------
MEDIUMtests/verbs/test_create_final_text_units.py29# ---------------------------------------------------------------------------
MEDIUMtests/verbs/test_create_final_text_units.py31# ---------------------------------------------------------------------------
MEDIUMtests/verbs/test_create_final_text_units.py61# ---------------------------------------------------------------------------
29 more matches not shown…
Self-Referential Comments20 hits · 62 pts
SeverityFileLineSnippet
MEDIUMtests/unit/indexing/cache/test_file_pipeline_cache.py34 # Create a cache directory
MEDIUMtests/integration/vector_stores/test_azure_ai_search.py46 # Create the necessary mocks first
MEDIUMtests/integration/vector_stores/test_azure_ai_search.py65 # Create the necessary mocks first
MEDIUMtests/integration/vector_stores/test_azure_ai_search.py126 # Define a simple text embedder function for testing
MEDIUMtests/integration/vector_stores/test_azure_ai_search.py141 # Create a mock embedder that returns None and verify that no results are produced
MEDIUMtests/integration/vector_stores/test_azure_ai_search.py195 # Define a simple text embedder function for testing
MEDIUMtests/integration/vector_stores/test_cosmosdb.py55 # Define a simple text embedder function for testing
MEDIUMtests/integration/vector_stores/test_cosmosdb.py132 # Define a simple text embedder function for testing
MEDIUMtests/integration/vector_stores/test_factory.py67 # Create a mock that satisfies the VectorStore interface
MEDIUMtests/integration/vector_stores/test_lancedb.py108 # Define a simple text embedder function for testing
MEDIUMtests/integration/cache/test_factory.py102 # Create a mock that satisfies the PipelineCache interface
MEDIUMtests/integration/storage/test_factory.py78 # Create a mock that satisfies the Storage interface
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.
MEDIUM…summarize_communities/graph_context/context_builder.py160 # Create the ALL_CONTEXT column
MEDIUM…graphrag/query/structured_search/drift_search/state.py83 # Create a mapping from nodes to unique IDs
MEDIUMpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py91 # Define the container vector policy
MEDIUMpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py103 # Define the vector indexing policy
MEDIUMpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py121 # Create the container and container client
MEDIUMpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py132 # Create the container with compatible indexing policy
MEDIUMpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py158 # Create a CosmosDB container on overwrite
Excessive Try-Catch Wrapping49 hits · 51 pts
SeverityFileLineSnippet
LOWunified-search-app/app/home_page.py60 except Exception as e: # noqa: BLE001
LOWunified-search-app/app/home_page.py234 except Exception as e: # noqa: BLE001
LOW…h-app/app/knowledge_loader/data_sources/blob_source.py95 except Exception as err:
LOW…h-app/app/knowledge_loader/data_sources/blob_source.py117 except Exception as err:
LOW…search-app/app/knowledge_loader/data_sources/loader.py61 except Exception as e: # noqa: BLE001
MEDIUM…search-app/app/knowledge_loader/data_sources/loader.py62 print(f"Error loading dataset config: {e}") # noqa T201
LOW…hrag-llm/graphrag_llm/middleware/with_request_count.py57 except Exception:
LOW…hrag-llm/graphrag_llm/middleware/with_request_count.py76 except Exception:
LOW…ges/graphrag-llm/graphrag_llm/middleware/with_cache.py92 except Exception: # noqa: BLE001
LOW…ges/graphrag-llm/graphrag_llm/middleware/with_cache.py140 except Exception: # noqa: BLE001
LOW…s/graphrag-llm/graphrag_llm/middleware/with_logging.py50 except Exception as e:
LOW…s/graphrag-llm/graphrag_llm/middleware/with_logging.py65 except Exception as e:
LOW…s/graphrag-llm/graphrag_llm/retry/exponential_retry.py71 except Exception as e:
LOW…s/graphrag-llm/graphrag_llm/retry/exponential_retry.py103 except Exception as e:
LOW…ges/graphrag-llm/graphrag_llm/retry/immediate_retry.py51 except Exception as e:
LOW…ges/graphrag-llm/graphrag_llm/retry/immediate_retry.py75 except Exception as e:
LOW…aphrag-llm/graphrag_llm/utils/function_tool_manager.py128 except Exception as e:
LOW…g-llm/graphrag_llm/templating/jinja_template_engine.py48 except Exception as e:
LOW…aphrag-llm/graphrag_llm/threading/completion_thread.py90 except Exception as e: # noqa: BLE001
LOW…raphrag-llm/graphrag_llm/threading/embedding_thread.py87 except Exception as e: # noqa: BLE001
LOWpackages/graphrag/graphrag/index/validate_config.py29 except Exception as e: # noqa: BLE001
LOWpackages/graphrag/graphrag/index/validate_config.py46 except Exception as e: # noqa: BLE001
LOW…ages/graphrag/graphrag/index/utils/derive_from_rows.py147 except Exception as e: # noqa: BLE001
LOW…index/operations/extract_covariates/claim_extractor.py91 except Exception as e:
LOW…rations/summarize_communities/summarize_communities.py162 except Exception:
LOW…s/summarize_communities/community_reports_extractor.py88 except Exception as e:
LOW…hrag/index/operations/extract_graph/graph_extractor.py66 except Exception as e: # pragma: no cover - defensive logging
LOWpackages/graphrag/graphrag/index/run/run_pipeline.py153 except Exception as e:
LOW…aphrag/query/structured_search/global_search/search.py264 except Exception:
LOW…aphrag/query/structured_search/global_search/search.py421 except Exception:
LOW…raphrag/query/structured_search/local_search/search.py134 except Exception:
LOW…raphrag/query/structured_search/basic_search/search.py128 except Exception:
LOW…ages/graphrag/graphrag/query/question_gen/local_gen.py138 except Exception:
LOW…ages/graphrag/graphrag/query/question_gen/local_gen.py229 except Exception:
LOW…/graphrag-common/graphrag_common/config/load_config.py191 except Exception as error:
LOW…/graphrag-common/graphrag_common/config/load_config.py198 except Exception as error:
LOW…raphrag-storage/graphrag_storage/azure_blob_storage.py154 except Exception: # noqa: BLE001
LOW…raphrag-storage/graphrag_storage/azure_blob_storage.py175 except Exception: # noqa: BLE001
LOW…raphrag-storage/graphrag_storage/azure_blob_storage.py194 except Exception:
LOW…raphrag-storage/graphrag_storage/azure_blob_storage.py250 except Exception: # noqa: BLE001
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py147 except Exception: # noqa: BLE001
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py171 except Exception:
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py202 except Exception:
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py214 except Exception:
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py231 except Exception:
LOW…phrag-storage/graphrag_storage/azure_cosmos_storage.py322 except Exception: # noqa: BLE001
LOW…rage/graphrag_storage/tables/parquet_table_provider.py68 except Exception:
LOW…-storage/graphrag_storage/tables/csv_table_provider.py74 except Exception:
LOWpackages/graphrag-input/graphrag_input/input_reader.py61 except Exception as e: # noqa: BLE001 (catching Exception is fine here)
Over-Commented Block38 hits · 38 pts
SeverityFileLineSnippet
LOWtests/smoke/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/vector_stores/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/hasher/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/config/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/graphrag_factory/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/utils/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/storage/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/chunking/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/load_config/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/indexing/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/indexing/cache/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/indexing/update/__init__.py1# Copyright (C) 2026 Microsoft Corporation.
LOWtests/unit/indexing/input/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/indexing/graph/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/indexing/graph/utils/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/indexing/graph/extractors/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOW…ndexing/graph/extractors/community_reports/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/indexing/operations/__init__.py1# Copyright (C) 2026 Microsoft
LOWtests/unit/indexing/operations/embed_text/__init__.py1# Copyright (C) 2026 Microsoft
LOWtests/unit/indexing/verbs/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/indexing/verbs/entities/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOW…ts/unit/indexing/verbs/entities/extraction/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOW…exing/verbs/entities/extraction/strategies/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOW…s/extraction/strategies/graph_intelligence/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/query/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/query/context_builder/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/query/input/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/unit/query/input/retrieval/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/integration/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/integration/cache/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/integration/storage/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/integration/language_model/__init__.py1# Copyright (c) 2025 Microsoft Corporation.
LOWtests/verbs/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOWtests/verbs/test_extract_graph.py61 # this is because the mock responses always result in a single description, which is returned verbatim rather than s
LOWtests/notebook/__init__.py1# Copyright (c) 2024 Microsoft Corporation.
LOW…rag/graphrag/prompt_tune/prompt/entity_relationship.py81##
LOW…kages/graphrag/graphrag/prompts/index/extract_graph.py81##
Redundant / Tautological Comments14 hits · 21 pts
SeverityFileLineSnippet
LOWtests/unit/indexing/cache/test_file_pipeline_cache.py45 # Check if the cache directory is empty
LOWtests/integration/vector_stores/test_factory.py85 # Check if it's in the list of registered vector store types
LOWtests/integration/cache/test_factory.py117 # Check if it's in the list of registered cache types
LOWtests/integration/logging/test_factory.py50 # Check if it's in the list of registered logger types
LOW…graphrag_llm/rate_limit/sliding_window_rate_limiter.py101 # Check if current token window exceeds token limit
LOW…graphrag/prompt_tune/generator/extract_graph_prompt.py106 # Write file to output path
LOW…rompt_tune/generator/community_report_summarization.py46 # Write file to output path
LOW…g/prompt_tune/generator/entity_summarization_prompt.py35 # Write file to output path
LOWpackages/graphrag/graphrag/logger/standard_logging.py76 # Close file handlers properly before removing them
LOW…kages/graphrag/graphrag/logger/blob_workflow_logger.py106 ): # Check if block count exceeds 25k
LOWpackages/graphrag/graphrag/index/update/communities.py34 # Check if size and period columns exist in the old_communities. If not, add them
LOWpackages/graphrag/graphrag/index/update/communities.py110 # Check if size and period columns exist in the old_community_reports. If not, add them
LOW…ag/graphrag/query/context_builder/community_context.py176 # Check if the current batch has been added
LOW…raphrag/query/structured_search/drift_search/search.py219 # Check if query state is empty
Deep Nesting20 hits · 20 pts
SeverityFileLineSnippet
LOWtests/smoke/test_fixtures.py150
LOWunified-search-app/app/home_page.py20
LOWunified-search-app/app/ui/report_details.py18
LOWunified-search-app/app/ui/search.py63
LOWunified-search-app/app/ui/search.py121
LOWunified-search-app/app/ui/search.py192
LOWscripts/copy_build_assets.py10
LOW…kages/graphrag-llm/graphrag_llm/tokenizer/tokenizer.py50
LOWpackages/graphrag/graphrag/prompt_tune/loader/input.py44
LOWpackages/graphrag/graphrag/utils/cli.py27
LOWpackages/graphrag/graphrag/utils/cli.py31
LOW…raphrag/graphrag/index/workflows/create_communities.py195
LOW…ns/summarize_communities/graph_context/sort_context.py11
LOW…ag/graphrag/query/context_builder/community_context.py189
LOW…g/query/context_builder/dynamic_community_selection.py73
LOWpackages/graphrag/graphrag/query/llm/text_utils.py44
LOW…aphrag/query/structured_search/global_search/search.py306
LOW…/query/structured_search/local_search/mixed_context.py375
LOWpackages/graphrag-vectors/graphrag_vectors/cosmosdb.py166
LOW…s/graphrag-vectors/graphrag_vectors/azure_ai_search.py168
Cross-Language Confusion4 hits · 18 pts
SeverityFileLineSnippet
HIGH…rag/graphrag/index/workflows/create_base_text_units.py41 total_rows = await documents_table.length()
HIGHpackages/graphrag/graphrag/index/utils/is_null.py11 """Check if value is null or is nan."""
HIGH…/index/operations/build_noun_graph/build_noun_graph.py70 total = await text_unit_table.length()
HIGH…orage/graphrag_storage/tables/cosmos_table_provider.py497 return await inner.length()
AI Slop Vocabulary4 hits · 8 pts
SeverityFileLineSnippet
MEDIUMpackages/graphrag/graphrag/query/factory.py130 # TODO: Allow for another llm definition only for Global Search to leverage -mini models
MEDIUM…raphrag/query/structured_search/drift_search/search.py280 # Reduce response_state to a single comprehensive response
MEDIUM…raphrag/query/structured_search/drift_search/search.py359 """Reduce the response to a single comprehensive response.
MEDIUM…raphrag/query/structured_search/drift_search/search.py418 """Reduce the response to a single comprehensive response.
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippet
HIGHunified-search-app/app/home_page.py157 caption="###### Answer context: AI-generated network reports covering all input documents",
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippet
LOW…aphrag/query/structured_search/global_search/search.py156 # Step 1: Generate answers for each batch of community short summaries
LOW…aphrag/query/structured_search/global_search/search.py190 # Step 2: Combine the intermediate answers from step 2 to generate the final answer
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippet
LOW…ages/graphrag/graphrag/index/utils/derive_from_rows.py75 async def execute_task(task: Coroutine) -> ItemType | None: