Skip to content

Instantly share code, notes, and snippets.

View hshinde's full-sized avatar

Hemant Shinde hshinde

View GitHub Profile
@hshinde
hshinde / gist:fddede6b4b04fe0fd90e5d62bcfd07c4
Last active October 12, 2025 07:54
table for cursor editor

| Metric | What It Measures | Why It Matters for RAG | | - - - - | - - - - - - - - - | - - - - - - - - - - - - -| | Cyclomatic Complexity | Logical branching and control flow | High complexity blurs semantic meaning. Keep functions small and focused so embeddings stay sharp. | | Maintainability Index (MI) | Combined indicator of complexity, size, and comments | Low MI means dense or mixed-purpose code - retrieval systems struggle to extract meaningful chunks. | | Coupling / Cohesion | How interdependent or self-contained modules are | High coupling confuses retrieval; cohesive modules give RAG clean, isolated context. | | Readability Index | Structural and linguistic clarity | Readable code generates cleaner embeddings - better keyword and intent matching. | | Documentation Density | Presence and quality of docstrings, comments, and type hints | Natural-language cues improve semantic linking and help models reason about intent. |