Chat with your documents on your local device using GPT models. No data leaves your device and 100% private.
This report presents the forensic synthetic code analysis of PromtEngineer/localGPT, a Python project with 22,205 GitHub stars. SynthScan v2.0 examined 33,236 lines of code across 126 source files, recording 473 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 23.6 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 473 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | simple_create_index.sh | 3 | # Simple Index Creation Script for LocalGPT RAG System | COMMENT |
| MEDIUM | DOCKER_README.md | 76 | ### RAG API Container (rag-api) | COMMENT |
| MEDIUM | DOCKER_README.md | 174 | # RAG API container (most debugging happens here) | COMMENT |
| MEDIUM | DOCKER_README.md | 186 | # Test RAG system initialization | COMMENT |
| MEDIUM | README.md | 180 | # Skip frontend (backend + RAG API only) | COMMENT |
| MEDIUM | README.md | 204 | # Terminal 2: Start RAG API | COMMENT |
| MEDIUM | README.md | 266 | # Database Paths (used by backend and RAG system) | COMMENT |
| MEDIUM⚡ | setup_rag_system.sh | 237 | # Step 4: Setup RAG System | COMMENT |
| MEDIUM⚡ | setup_rag_system.sh | 367 | # Start RAG System | COMMENT |
| MEDIUM⚡ | setup_rag_system.sh | 377 | # Stop RAG System | COMMENT |
| MEDIUM⚡ | setup_rag_system.sh | 387 | # Check RAG System Status | COMMENT |
| MEDIUM | setup_rag_system.sh | 2 | # setup_rag_system.sh - Complete RAG System Setup Script | COMMENT |
| MEDIUM | setup_rag_system.sh | 402 | # Backup RAG System Data | COMMENT |
| MEDIUM | setup_rag_system.sh | 431 | # Update RAG System | COMMENT |
| MEDIUM | docker-compose.yml | 23 | # RAG API server | COMMENT |
| MEDIUM | DOCKER_TROUBLESHOOTING.md | 95 | #### Problem: RAG API can't connect to Ollama | COMMENT |
| MEDIUM | DOCKER_TROUBLESHOOTING.md | 115 | # Test Ollama connection from RAG API container | COMMENT |
| MEDIUM | DOCKER_TROUBLESHOOTING.md | 188 | pkill -f "api_server" # RAG API | CODE |
| MEDIUM | DOCKER_TROUBLESHOOTING.md | 286 | # RAG API container (most issues happen here) | COMMENT |
| MEDIUM | DOCKER_TROUBLESHOOTING.md | 378 | # Test RAG API alone | COMMENT |
| MEDIUM | DOCKER_TROUBLESHOOTING.md | 540 | #### 2. Minimal Docker (RAG API only) | COMMENT |
| MEDIUM | DOCKER_TROUBLESHOOTING.md | 542 | # Run only RAG API in Docker | COMMENT |
| MEDIUM | docker-compose.local-ollama.yml | 2 | # RAG API server (connects to host Ollama) | COMMENT |
| MEDIUM | test_docker_build.sh | 75 | # 1. RAG API (no dependencies) | COMMENT |
| MEDIUM | test_docker_build.sh | 82 | # 2. Backend (depends on RAG API) | COMMENT |
| MEDIUM | Documentation/api_reference.md | 1 | # 📚 API Reference (Backend & RAG API) | COMMENT |
| MEDIUM | Documentation/api_reference.md | 36 | ## RAG API (Python `rag_system/api_server.py`) | COMMENT |
| MEDIUM | Documentation/api_reference.md | 46 | ### RAG ChatRequest (Advanced Options) | COMMENT |
| MEDIUM | Documentation/system_overview.md | 1 | # 🏗️ RAG System - Complete System Overview | COMMENT |
| MEDIUM | Documentation/system_overview.md | 400 | ### **Graph RAG Mode** (`"graph_rag"`) | COMMENT |
| MEDIUM | Documentation/deployment_guide.md | 1 | # 🚀 RAG System Deployment Guide | COMMENT |
| MEDIUM | Documentation/deployment_guide.md | 139 | curl http://localhost:8001/models # RAG API | CODE |
| MEDIUM | Documentation/deployment_guide.md | 229 | # Terminal 1: RAG API | COMMENT |
| MEDIUM | Documentation/deployment_guide.md | 249 | curl http://localhost:8001/models # RAG API | CODE |
| MEDIUM | Documentation/deployment_guide.md | 269 | python -m rag_system.api_server # RAG API on port 8001 | CODE |
| MEDIUM | Documentation/deployment_guide.md | 560 | # Scale RAG API instances based on load | COMMENT |
| MEDIUM | Documentation/improvement_plan.md | 1 | # RAG System – Improvement Road-map | COMMENT |
| MEDIUM | Documentation/installation_guide.md | 1 | # 📦 RAG System Installation Guide | COMMENT |
| MEDIUM | Documentation/installation_guide.md | 138 | ### 3.2 Clone and Setup RAG System | COMMENT |
| MEDIUM | Documentation/installation_guide.md | 324 | #### **RAG System Test:** | COMMENT |
| MEDIUM | Documentation/installation_guide.md | 326 | # Test RAG system initialization | COMMENT |
| MEDIUM | Documentation/installation_guide.md | 452 | ollama pull nomic-embed-text # Alternative embedding model | CODE |
| MEDIUM | Documentation/installation_guide.md | 471 | sudo ufw deny 8001/tcp # RAG API (internal only) | CODE |
| MEDIUM | Documentation/quick_start.md | 1 | # ⚡ Quick Start Guide - RAG System | COMMENT |
| MEDIUM⚡ | Documentation/quick_start.md | 72 | curl http://localhost:8001/models # RAG API | CODE |
| MEDIUM⚡ | Documentation/quick_start.md | 126 | # Terminal 1: RAG API | COMMENT |
| MEDIUM⚡ | Documentation/quick_start.md | 145 | curl http://localhost:8001/models # RAG API | CODE |
| MEDIUM | Documentation/quick_start.md | 205 | python -m rag_system.api_server # RAG API only | CODE |
| MEDIUM | Documentation/docker_usage.md | 1 | # 🐳 Docker Usage Guide - RAG System | COMMENT |
| MEDIUM | Documentation/docker_usage.md | 174 | # After RAG system changes | COMMENT |
| MEDIUM | backend/server.py | 15 | # Import RAG system modules for complete metadata | COMMENT |
| MEDIUM | backend/server.py | 299 | # 🎯 SMART ROUTING: Decide between direct LLM vs RAG | COMMENT |
| MEDIUM | backend/server.py | 305 | # 🔍 --- Use RAG Pipeline for Document-Related Queries --- | COMMENT |
| MEDIUM | backend/server.py | 353 | # No indexes = definitely no RAG needed | COMMENT |
| MEDIUM | backend/server.py | 535 | # Check for strong RAG indicators | COMMENT |
| MEDIUM | backend/server.py | 540 | # Question words + substantial length might benefit from RAG | COMMENT |
| MEDIUM | backend/server.py | 593 | # Build payload for RAG API | COMMENT |
| MEDIUM | backend/server.py | 756 | # Very naive classification - same logic as RAG API server | COMMENT |
| MEDIUM | backend/server.py | 814 | # Add complete metadata from RAG system configuration if available | COMMENT |
| MEDIUM | backend/server.py | 916 | # Delegate to advanced RAG API same as session indexing | COMMENT |
| 22 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | system_health_check.py | 27 | except Exception as e: | CODE |
| LOW⚡ | system_health_check.py | 52 | except Exception as e: | CODE |
| LOW⚡ | system_health_check.py | 64 | except Exception as e: | CODE |
| LOW | system_health_check.py | 89 | except Exception as e: | CODE |
| LOW | system_health_check.py | 112 | except Exception as e: | CODE |
| LOW | system_health_check.py | 142 | except Exception as e: | CODE |
| LOW | demo_batch_indexing.py | 191 | except Exception as e: | CODE |
| LOW | demo_batch_indexing.py | 379 | except Exception as e: | STRING |
| LOW | create_index_script.py | 64 | except Exception as e: | CODE |
| LOW | create_index_script.py | 234 | except Exception as e: | CODE |
| LOW | create_index_script.py | 257 | except Exception as e: | CODE |
| LOW | create_index_script.py | 308 | except Exception as e: | CODE |
| LOW | create_index_script.py | 365 | except Exception as e: | CODE |
| LOW | simple_create_index.sh | 165 | except Exception as e: | CODE |
| MEDIUM | simple_create_index.sh | 118 | def create_index_simple(): | CODE |
| LOW | run_system.py | 301 | except Exception as e: | CODE |
| LOW | run_system.py | 334 | except Exception as e: | CODE |
| LOW | run_system.py | 464 | except Exception as e: | CODE |
| LOW | Documentation/indexing_pipeline.md | 479 | except Exception as e: | CODE |
| MEDIUM | Documentation/indexing_pipeline.md | 480 | print(f"Error processing file: {e}") | CODE |
| LOW | Documentation/indexing_pipeline.md | 507 | except Exception as e: | CODE |
| LOW | Documentation/indexing_pipeline.md | 538 | except Exception as e: | CODE |
| LOW | Documentation/retrieval_pipeline.md | 370 | except Exception as e: | CODE |
| LOW | Documentation/retrieval_pipeline.md | 391 | except Exception as e: | CODE |
| LOW | Documentation/retrieval_pipeline.md | 400 | except Exception as e2: | CODE |
| LOW | Documentation/retrieval_pipeline.md | 446 | except Exception as e: | CODE |
| LOW | Documentation/retrieval_pipeline.md | 490 | except Exception as e: | CODE |
| MEDIUM | backend/server.py | 784 | def handle_get_indexes(self): | CODE |
| MEDIUM | backend/server.py | 801 | def handle_create_index(self): | CODE |
| LOW⚡ | backend/server.py | 721 | except Exception as e: | CODE |
| LOW⚡ | backend/server.py | 729 | except Exception as e: | CODE |
| LOW⚡ | backend/server.py | 779 | except Exception as e: | CODE |
| LOW⚡ | backend/server.py | 788 | except Exception as e: | CODE |
| LOW⚡ | backend/server.py | 798 | except Exception as e: | CODE |
| LOW⚡ | backend/server.py | 985 | except Exception as e: | CODE |
| LOW⚡ | backend/server.py | 992 | except Exception as e: | CODE |
| LOW | backend/server.py | 172 | except Exception as e: | CODE |
| LOW | backend/server.py | 185 | except Exception as e: | CODE |
| LOW | backend/server.py | 198 | except Exception as e: | CODE |
| LOW | backend/server.py | 219 | except Exception as e: | CODE |
| LOW | backend/server.py | 242 | except Exception as e: | CODE |
| LOW | backend/server.py | 267 | except Exception as e: | CODE |
| LOW | backend/server.py | 333 | except Exception as e: | CODE |
| LOW | backend/server.py | 362 | except Exception as e: | CODE |
| LOW | backend/server.py | 403 | except Exception as e: | CODE |
| LOW | backend/server.py | 429 | except Exception as e: | CODE |
| LOW | backend/server.py | 502 | except Exception as e: | CODE |
| LOW | backend/server.py | 578 | except Exception as e: | CODE |
| LOW | backend/server.py | 623 | except Exception: | CODE |
| LOW | backend/server.py | 638 | except Exception as e: | CODE |
| LOW | backend/server.py | 655 | except Exception as e: | CODE |
| LOW | backend/server.py | 839 | except Exception as e: | CODE |
| LOW | backend/server.py | 903 | except Exception: | CODE |
| LOW | backend/server.py | 963 | except Exception as e: | CODE |
| LOW | backend/server.py | 974 | except Exception: | CODE |
| LOW | backend/server.py | 1011 | except Exception as e: | CODE |
| LOW | backend/server.py | 1022 | except Exception as e: | CODE |
| LOW | backend/server.py | 1056 | except Exception as e: | CODE |
| LOW | backend/server.py | 1075 | except Exception as e: | CODE |
| LOW | backend/server.py | 1097 | except Exception as e: | CODE |
| 102 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | rag_system/__init__.py | 4 | # --------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | rag_system/__init__.py | 6 | # --------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | rag_system/__init__.py | 10 | # --------------------------------------------------------- | COMMENT |
| MEDIUM | rag_system/__init__.py | 27 | # --------------------------------------------------------- | COMMENT |
| MEDIUM | rag_system/__init__.py | 29 | # --------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | rag_system/main.py | 19 | # ================================== | COMMENT |
| MEDIUM⚡ | rag_system/main.py | 23 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | rag_system/main.py | 25 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | rag_system/main.py | 54 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | rag_system/main.py | 56 | # ============================================================================ | COMMENT |
| MEDIUM | rag_system/main.py | 163 | # ============================================================================ | COMMENT |
| MEDIUM | rag_system/main.py | 165 | # ============================================================================ | COMMENT |
| MEDIUM | rag_system/main.py | 238 | # ============================================================================ | COMMENT |
| MEDIUM | rag_system/main.py | 240 | # ============================================================================ | COMMENT |
| MEDIUM | rag_system/ingestion/docling_chunker.py | 39 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | rag_system/ingestion/docling_chunker.py | 85 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | rag_system/ingestion/docling_chunker.py | 87 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | rag_system/ingestion/docling_chunker.py | 199 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | rag_system/ingestion/docling_chunker.py | 202 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM | rag_system/rerankers/sentence_pruner.py | 30 | # --------------------------------------------------------------------- | COMMENT |
| MEDIUM | rag_system/rerankers/sentence_pruner.py | 32 | # --------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | rag_system/rerankers/sentence_pruner.py | 55 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | rag_system/rerankers/sentence_pruner.py | 57 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | rag_system/pipelines/retrieval_pipeline.py | 25 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | rag_system/pipelines/retrieval_pipeline.py | 27 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | rag_system/pipelines/retrieval_pipeline.py | 309 | # ----------------------------------------------------------- | STRING |
| MEDIUM⚡ | rag_system/pipelines/retrieval_pipeline.py | 311 | # ----------------------------------------------------------- | STRING |
| MEDIUM | rag_system/pipelines/retrieval_pipeline.py | 286 | # --------------------------------------------------------------- | STRING |
| MEDIUM | rag_system/pipelines/retrieval_pipeline.py | 288 | # --------------------------------------------------------------- | STRING |
| MEDIUM | rag_system/pipelines/retrieval_pipeline.py | 444 | # ------------------------------------------------------------------ | STRING |
| MEDIUM | rag_system/pipelines/retrieval_pipeline.py | 446 | # ------------------------------------------------------------------ | STRING |
| MEDIUM | rag_system/pipelines/retrieval_pipeline.py | 512 | # ------------------------------------------------------------------ | STRING |
| MEDIUM | rag_system/pipelines/retrieval_pipeline.py | 514 | # ------------------------------------------------------------------ | STRING |
| MEDIUM⚡ | rag_system/pipelines/indexing_pipeline.py | 118 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | rag_system/pipelines/indexing_pipeline.py | 120 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | rag_system/pipelines/indexing_pipeline.py | 280 | # --------------------------------------------------- | COMMENT |
| MEDIUM⚡ | rag_system/pipelines/indexing_pipeline.py | 282 | # --------------------------------------------------- | COMMENT |
| MEDIUM⚡ | rag_system/utils/ollama_client.py | 84 | # ------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | rag_system/utils/ollama_client.py | 87 | # ------------------------------------------------------------- | COMMENT |
| MEDIUM | rag_system/utils/ollama_client.py | 118 | # ------------------------------------------------------------- | COMMENT |
| MEDIUM | rag_system/utils/ollama_client.py | 120 | # ------------------------------------------------------------- | COMMENT |
| MEDIUM | rag_system/agent/loop.py | 638 | # ------------------------------------------------------------------ | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | setup_rag_system.sh | 127 | # Step 3: Install Docker | COMMENT |
| LOW⚡ | setup_rag_system.sh | 237 | # Step 4: Setup RAG System | COMMENT |
| LOW⚡ | setup_rag_system.sh | 361 | # Step 8: Create Helper Scripts | COMMENT |
| LOW | setup_rag_system.sh | 42 | # Step 1: System Requirements Check | COMMENT |
| LOW | setup_rag_system.sh | 74 | # Step 2: Install Dependencies | COMMENT |
| LOW | setup_rag_system.sh | 302 | # Step 5: Build and Start Services | COMMENT |
| LOW | setup_rag_system.sh | 319 | # Step 6: Install AI Models | COMMENT |
| LOW | setup_rag_system.sh | 344 | # Step 7: System Verification | COMMENT |
| LOW | setup_rag_system.sh | 457 | # Step 9: Final Setup | COMMENT |
| LOW | Documentation/quick_start.md | 26 | ### Step 1: Clone and Setup | COMMENT |
| LOW | Documentation/quick_start.md | 37 | ### Step 2: Install Ollama Locally | COMMENT |
| LOW⚡ | Documentation/quick_start.md | 53 | ### Step 3: Start Docker Containers | COMMENT |
| LOW⚡ | Documentation/quick_start.md | 63 | ### Step 4: Verify Deployment | COMMENT |
| LOW⚡ | Documentation/quick_start.md | 75 | ### Step 5: Access Application | COMMENT |
| LOW | Documentation/quick_start.md | 88 | ### Step 1: Clone and Install Dependencies | COMMENT |
| LOW | Documentation/quick_start.md | 102 | ### Step 2: Install and Configure Ollama | COMMENT |
| LOW⚡ | Documentation/quick_start.md | 116 | ### Step 3: Start the System | COMMENT |
| LOW⚡ | Documentation/quick_start.md | 136 | ### Step 4: Verify Installation | COMMENT |
| LOW⚡ | Documentation/quick_start.md | 148 | ### Step 5: Access Application | COMMENT |
| LOW | Documentation/docker_usage.md | 38 | ### Step 1: Clone and Setup | COMMENT |
| LOW | Documentation/docker_usage.md | 49 | ### Step 2: Install and Configure Ollama (Required) | COMMENT |
| LOW | Documentation/docker_usage.md | 71 | ### Step 3: Start Docker Containers | COMMENT |
| LOW | rag_system/api_server_with_progress.py | 200 | # Step 1: Document Processing | COMMENT |
| LOW | rag_system/pipelines/indexing_pipeline.py | 149 | # Step 1: Document Processing and Chunking | COMMENT |
| LOW | rag_system/pipelines/indexing_pipeline.py | 209 | # Step 3: Optional Contextual Enrichment (before indexing for consistency) | COMMENT |
| LOW | rag_system/pipelines/indexing_pipeline.py | 246 | # Step 4: Create BM25 Index from enriched chunks (for consistency with vector index) | COMMENT |
| LOW | rag_system/pipelines/indexing_pipeline.py | 321 | # Step 6: Knowledge Graph Extraction (Optional) | COMMENT |
| LOW | rag_system/indexing/graph_extractor.py | 20 | # Step 1: Extract Entities | COMMENT |
| LOW | rag_system/indexing/graph_extractor.py | 53 | # Step 2: Extract Relationships | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | create_index_script.py | 206 | # Create the index | COMMENT |
| MEDIUM | simple_create_index.sh | 104 | # Create a temporary Python script to create the index | COMMENT |
| MEDIUM | simple_create_index.sh | 219 | # Create the index | COMMENT |
| MEDIUM | run_system.py | 109 | # Create main logger | COMMENT |
| MEDIUM⚡ | backend/server.py | 738 | # This function is now deprecated in favor of the new indexing workflow | COMMENT |
| MEDIUM | backend/server.py | 677 | # Create a unique filename to avoid overwrites | COMMENT |
| MEDIUM | backend/database.py | 673 | # Create a test session | STRING |
| MEDIUM | rag_system/api_server.py | 597 | # Create a temporary pipeline instance with the overridden config | COMMENT |
| MEDIUM⚡ | rag_system/main.py | 20 | # This file contains the MASTER configuration for all models used in the RAG system. | COMMENT |
| MEDIUM | rag_system/ingestion/chunking.py | 121 | "chunk_id": f"{document_id}_{i}", # Create a more unique ID | CODE |
| MEDIUM | rag_system/pipelines/retrieval_pipeline.py | 193 | # Define the window for the search | COMMENT |
| MEDIUM | rag_system/utils/ollama_client.py | 164 | # Create a dummy black image for testing | COMMENT |
| MEDIUM | rag_system/agent/loop.py | 286 | # Create a contextual query that includes history for most operations | COMMENT |
| MEDIUM | rag_system/indexing/contextualizer.py | 11 | # Define the structured prompt templates, adapted from the example | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | system_health_check.py | 9 | CODE | |
| LOW | run_system.py | 30 | CODE | |
| LOW | run_system.py | 34 | CODE | |
| LOW | backend/server.py | 7 | CODE | |
| LOW | backend/server.py | 918 | CODE | |
| LOW | backend/database.py | 5 | CODE | |
| LOW | rag_system/api_server.py | 4 | CODE | |
| LOW | rag_system/ingestion/docling_chunker.py | 1 | CODE | |
| LOW | rag_system/ingestion/docling_chunker.py | 12 | CODE | |
| LOW | rag_system/ingestion/docling_chunker.py | 13 | CODE | |
| LOW | rag_system/ingestion/docling_chunker.py | 15 | CODE | |
| LOW | rag_system/rerankers/sentence_pruner.py | 1 | CODE | |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 1 | CODE | |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 2 | CODE | |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 3 | CODE | |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 15 | CODE | |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 22 | CODE | |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 23 | CODE | |
| LOW | rag_system/utils/batch_processor.py | 3 | CODE | |
| LOW | rag_system/utils/watsonx_client.py | 1 | CODE | |
| LOW | rag_system/retrieval/retrievers.py | 1 | CODE | |
| LOW | rag_system/retrieval/retrievers.py | 2 | CODE | |
| LOW | rag_system/retrieval/retrievers.py | 5 | CODE | |
| LOW | rag_system/retrieval/retrievers.py | 7 | CODE | |
| LOW | rag_system/retrieval/retrievers.py | 8 | CODE | |
| LOW | rag_system/retrieval/retrievers.py | 9 | CODE | |
| LOW | rag_system/retrieval/retrievers.py | 9 | CODE | |
| LOW | rag_system/retrieval/retrievers.py | 10 | CODE | |
| LOW | rag_system/indexing/multimodal.py | 5 | CODE | |
| LOW | rag_system/indexing/multimodal.py | 5 | CODE | |
| LOW | rag_system/indexing/multimodal.py | 5 | CODE | |
| LOW | rag_system/indexing/latechunk.py | 1 | CODE | |
| LOW | rag_system/indexing/overview_builder.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | system_health_check.py | 56 | def check_agent_initialization(): | CODE |
| LOW | create_index_script.py | 314 | def create_sample_batch_config(): | CODE |
| LOW | CONTRIBUTING.md | 211 | def test_embedding_generation(): | CODE |
| LOW | Documentation/indexing_pipeline.md | 272 | def _generate_context_summary(self, chunk_text: str, surrounding_context: str) -> str: | CODE |
| LOW | Documentation/indexing_pipeline.md | 346 | def create_table_if_not_exists(self, table_name: str, schema: Schema): | CODE |
| LOW | Documentation/indexing_pipeline.md | 523 | def recover_from_partial_failure(self, table_name: str, document_id: str): | CODE |
| LOW | Documentation/retrieval_pipeline.md | 134 | def _get_surrounding_chunks_lancedb(self, chunk, window_size): | CODE |
| LOW | Documentation/retrieval_pipeline.md | 249 | def generate_hypothetical_doc(self, query: str) -> str: | STRING |
| LOW | Documentation/retrieval_pipeline.md | 337 | def _build_conversation_context(self, history: List[Dict]) -> str: | CODE |
| LOW | Documentation/retrieval_pipeline.md | 430 | def recover_from_embedding_failure(self, query: str, **kwargs): | STRING |
| LOW | backend/test_backend.py | 59 | def test_conversation_history(): | CODE |
| LOW⚡ | backend/server.py | 988 | def handle_link_index_to_session(self, session_id: str, index_id: str): | CODE |
| LOW⚡ | backend/server.py | 995 | def handle_get_session_indexes(self, session_id: str): | CODE |
| LOW | backend/server.py | 224 | def handle_get_session_documents(self, session_id: str): | CODE |
| LOW | backend/database.py | 315 | def get_documents_for_session(self, session_id: str) -> List[str]: | STRING |
| LOW | backend/database.py | 443 | def inspect_and_populate_index_metadata(self, index_id: str) -> dict: | STRING |
| LOW⚡ | backend/simple_pdf_processor.py | 192 | def initialize_simple_pdf_processor(): | STRING |
| LOW | rag_system/api_server_with_progress.py | 145 | def run_indexing_with_progress(file_paths: List[str], session_id: str): | CODE |
| LOW | rag_system/api_server_with_progress.py | 294 | def handle_index_with_progress(self): | CODE |
| LOW | rag_system/api_server.py | 42 | def _apply_index_embedding_model(idx_ids): | CODE |
| LOW | rag_system/api_server.py | 71 | def _get_table_name_for_session(session_id): | CODE |
| LOW⚡ | rag_system/ingestion/document_converter.py | 113 | def _convert_general_to_markdown(self, file_path: str, input_format: InputFormat) -> List[Tuple[str, Dict[str, Any]] | CODE |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 170 | def _get_surrounding_chunks_lancedb(self, chunk: Dict[str, Any], window_size: int) -> List[Dict[str, Any]]: | CODE |
| LOW⚡ | rag_system/utils/ollama_client.py | 88 | async def generate_completion_async( | CODE |
| LOW⚡ | rag_system/utils/watsonx_client.py | 149 | async def generate_completion_async( | CODE |
| LOW | rag_system/utils/validate_model_config.py | 39 | def validate_configuration_consistency(): | CODE |
| LOW | rag_system/utils/validate_model_config.py | 154 | def check_pipeline_configurations(): | CODE |
| LOW⚡ | rag_system/agent/loop.py | 74 | def load_overviews_for_indexes(self, idx_ids: list[str]): | CODE |
| LOW | rag_system/agent/loop.py | 152 | def _format_query_with_history(self, query: str, history: list) -> str: | CODE |
| LOW | rag_system/retrieval/query_transformer.py | 309 | def _generate_translation_prompt(self, query: str) -> str: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | create_index_script.py | 77 | CODE | |
| LOW | run_system.py | 346 | CODE | |
| LOW | run_system.py | 469 | CODE | |
| LOW | backend/test_backend.py | 59 | CODE | |
| LOW | backend/server.py | 49 | CODE | |
| LOW | backend/server.py | 84 | CODE | |
| LOW | backend/server.py | 368 | CODE | |
| LOW | backend/server.py | 658 | CODE | |
| LOW | backend/server.py | 842 | CODE | |
| LOW | backend/server.py | 995 | CODE | |
| LOW | backend/ollama_client.py | 33 | CODE | |
| LOW | backend/ollama_client.py | 111 | CODE | |
| LOW | backend/database.py | 393 | CODE | |
| LOW | backend/database.py | 443 | CODE | |
| LOW | backend/simple_pdf_processor.py | 36 | CODE | |
| LOW | rag_system/api_server.py | 145 | CODE | |
| LOW | rag_system/api_server.py | 304 | CODE | |
| LOW | rag_system/main.py | 318 | CODE | |
| LOW | rag_system/ingestion/chunking.py | 36 | CODE | |
| LOW | rag_system/ingestion/docling_chunker.py | 88 | CODE | |
| LOW | rag_system/rerankers/reranker.py | 30 | CODE | |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 135 | CODE | |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 170 | CODE | |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 259 | CODE | |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 515 | CODE | |
| LOW | rag_system/pipelines/indexing_pipeline.py | 131 | CODE | |
| LOW | rag_system/utils/batch_processor.py | 76 | CODE | |
| LOW | rag_system/utils/watsonx_client.py | 177 | CODE | |
| LOW | rag_system/agent/loop.py | 55 | CODE | |
| LOW | rag_system/agent/loop.py | 74 | CODE | |
| LOW | rag_system/agent/loop.py | 260 | CODE | |
| LOW | rag_system/retrieval/retrievers.py | 72 | CODE | |
| LOW | rag_system/indexing/graph_extractor.py | 14 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | setup_rag_system.sh | 127 | # Step 3: Install Docker | COMMENT |
| LOW⚡ | setup_rag_system.sh | 237 | # Step 4: Setup RAG System | COMMENT |
| LOW⚡ | setup_rag_system.sh | 361 | # Step 8: Create Helper Scripts | COMMENT |
| LOW | setup_rag_system.sh | 42 | # Step 1: System Requirements Check | COMMENT |
| LOW | setup_rag_system.sh | 74 | # Step 2: Install Dependencies | COMMENT |
| LOW | setup_rag_system.sh | 302 | # Step 5: Build and Start Services | COMMENT |
| LOW | setup_rag_system.sh | 319 | # Step 6: Install AI Models | COMMENT |
| LOW | setup_rag_system.sh | 344 | # Step 7: System Verification | COMMENT |
| LOW | setup_rag_system.sh | 457 | # Step 9: Final Setup | COMMENT |
| LOW | rag_system/api_server_with_progress.py | 200 | # Step 1: Document Processing | COMMENT |
| LOW | rag_system/pipelines/indexing_pipeline.py | 149 | # Step 1: Document Processing and Chunking | COMMENT |
| LOW | rag_system/pipelines/indexing_pipeline.py | 209 | # Step 3: Optional Contextual Enrichment (before indexing for consistency) | COMMENT |
| LOW | rag_system/pipelines/indexing_pipeline.py | 246 | # Step 4: Create BM25 Index from enriched chunks (for consistency with vector index) | COMMENT |
| LOW | rag_system/pipelines/indexing_pipeline.py | 321 | # Step 6: Knowledge Graph Extraction (Optional) | COMMENT |
| LOW | rag_system/indexing/graph_extractor.py | 20 | # Step 1: Extract Entities | COMMENT |
| LOW | rag_system/indexing/graph_extractor.py | 53 | # Step 2: Extract Relationships | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | simple_create_index.sh | 47 | # Check if we're in the right directory | COMMENT |
| LOW | simple_create_index.sh | 53 | # Check if Ollama is running | COMMENT |
| LOW⚡ | setup_rag_system.sh | 137 | # Check if Homebrew is installed | COMMENT |
| LOW | setup_rag_system.sh | 31 | # Check if running as root | COMMENT |
| LOW | run_system.py | 254 | # Check if port is in use | COMMENT |
| LOW | run_system.py | 293 | # Check if process is still running | COMMENT |
| LOW | run_system.py | 393 | # Check if Ollama is already running | COMMENT |
| LOW | backend/test_backend.py | 107 | # Check if the AI remembered the name | COMMENT |
| LOW | backend/server.py | 152 | # Check if Ollama is running | COMMENT |
| LOW | backend/ollama_client.py | 173 | # Check if Ollama is running | COMMENT |
| LOW⚡ | backend/database.py | 454 | # Check if metadata is already populated | STRING |
| LOW⚡ | backend/database.py | 473 | # Check if table exists | STRING |
| LOW | backend/database.py | 564 | # Check if FTS index exists | STRING |
| LOW | backend/database.py | 591 | # Check if this is actually a legacy index by looking at creation date | STRING |
| LOW | rag_system/api_server.py | 186 | # Check if this is the first message by calling the backend server | COMMENT |
| LOW | rag_system/api_server.py | 345 | # Check if this is the first message by calling the backend server | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | WATSONX_README.md | 137 | api_key="your_api_key", | CODE |
| HIGH | rag_system/utils/watsonx_client.py | 237 | api_key="your-api-key", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | CONTRIBUTING.md | 260 | Create a searchable index from documents. This function processes documents through the complete indexing pipel | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | rag_system/api_server_with_progress.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | rag_system/utils/batch_processor.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | rag_system/indexing/contextualizer.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | rag_system/indexing/overview_builder.py | 6 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Documentation/deployment_guide.md | 541 | ```bash | COMMENT |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 21 | COMMENT | |
| LOW | rag_system/agent/loop.py | 261 | start_time = time.time() | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | demo_batch_indexing.py | 255 | """Create a comprehensive sample configuration file.""" | STRING |
| LOW | rag_system/pipelines/retrieval_pipeline.py | 553 | # Any issues (missing table, bad schema, etc.) –> just return [] | STRING |
| MEDIUM | rag_system/utils/validate_model_config.py | 91 | """Print a comprehensive map of which models are used where.""" | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | rag_system/agent/loop.py | 251 | CODE | |
| LOW | rag_system/agent/loop.py | 260 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | rag_system/ingestion/chunking.py | 140 | doc_meta = {"title": "My Awesome Document", "author": "Jane Doe", "year": 2024} | CODE |