Repository Analysis

RyanCodrai/turbovec

A vector index built on TurboQuant, written in Rust with Python bindings

18.7 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of RyanCodrai/turbovec, a Python project with 12,688 GitHub stars. SynthScan v2.0 examined 22,073 lines of code across 114 source files, recording 436 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 18.7 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).

18.7
Adjusted Score
18.7
Raw Score
100%
Time Factor
2026-06-10
Last Push
12.7K
Stars
Python
Language
22.1K
Lines of Code
114
Files
436
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 8LOW 428

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 436 distinct pattern matches across 11 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.

Hyper-Verbose Identifiers349 hits · 311 pts
SeverityFileLineSnippetContext
LOWturbovec-python/python/turbovec/haystack.py306 def count_documents_by_filter(self, filters: Dict[str, Any]) -> int:CODE
LOWturbovec-python/python/turbovec/haystack.py316 def count_unique_metadata_by_filter(CODE
LOWturbovec-python/python/turbovec/haystack.py352 def get_metadata_field_min_max(self, metadata_field: str) -> Dict[str, Any]:CODE
LOWturbovec-python/python/turbovec/haystack.py372 def get_metadata_field_unique_values(CODE
LOWturbovec-python/python/turbovec/haystack.py505 async def delete_all_documents_async(self) -> None:CODE
LOWturbovec-python/python/turbovec/haystack.py517 async def count_documents_by_filter_async(self, filters: Dict[str, Any]) -> int:CODE
LOWturbovec-python/python/turbovec/haystack.py522 async def count_unique_metadata_by_filter_async(CODE
LOWturbovec-python/python/turbovec/haystack.py532 async def get_metadata_fields_info_async(self) -> Dict[str, Dict[str, str]]:CODE
LOWturbovec-python/python/turbovec/haystack.py537 async def get_metadata_field_min_max_async(CODE
LOWturbovec-python/python/turbovec/haystack.py545 async def get_metadata_field_unique_values_async(CODE
LOWturbovec-python/python/turbovec/haystack.py555 async def embedding_retrieval_async(CODE
LOWturbovec-python/python/turbovec/agno.py425 def _handles_for_content_hash(self, content_hash: str) -> List[int]:CODE
LOWturbovec-python/python/turbovec/agno.py478 def _resolve_filter_to_handles(CODE
LOWturbovec-python/python/turbovec/agno.py621 def get_supported_search_types(self) -> List[SearchType]:CODE
LOWturbovec-python/python/turbovec/langchain.py92 def _select_relevance_score_fn(self) -> Callable[[float], float]:CODE
LOWturbovec-python/python/turbovec/langchain.py260 def similarity_search_with_score(CODE
LOWturbovec-python/python/turbovec/langchain.py270 async def asimilarity_search_with_score(CODE
LOWturbovec-python/python/turbovec/langchain.py282 def similarity_search_by_vector(CODE
LOWturbovec-python/python/turbovec/langchain.py292 async def asimilarity_search_by_vector(CODE
LOWturbovec-python/python/turbovec/langchain.py377 def max_marginal_relevance_search(CODE
LOWturbovec-python/python/turbovec/langchain.py387 def max_marginal_relevance_search_by_vector(CODE
LOWturbovec-python/python/turbovec/langchain.py399 async def amax_marginal_relevance_search(CODE
LOWturbovec-python/tests/test_llama_index.py59def test_lazy_dim_locked_on_first_add():CODE
LOWturbovec-python/tests/test_llama_index.py66def test_from_params_without_dim_is_lazy():CODE
LOWturbovec-python/tests/test_llama_index.py71def test_persist_and_load_lazy_uncommitted_store(tmp_path):CODE
LOWturbovec-python/tests/test_llama_index.py114def test_ref_doc_id_preserved_through_query():CODE
LOWturbovec-python/tests/test_llama_index.py124def test_empty_query_returns_empty():CODE
LOWturbovec-python/tests/test_llama_index.py132def test_k_larger_than_ntotal_is_clamped():CODE
LOWturbovec-python/tests/test_llama_index.py139def test_query_without_embedding_raises():CODE
LOWturbovec-python/tests/test_llama_index.py146def test_mismatched_dim_raises():CODE
LOWturbovec-python/tests/test_llama_index.py152def test_persist_and_from_persist_path_roundtrip(tmp_path):CODE
LOWturbovec-python/tests/test_llama_index.py825def test_delete_nodes_no_args_is_noop():CODE
LOWturbovec-python/tests/test_llama_index.py832def test_to_dict_from_dict_roundtrip():CODE
LOWturbovec-python/tests/test_llama_index.py842def test_to_dict_from_dict_lazy_store():CODE
LOWturbovec-python/tests/test_llama_index.py36def test_from_params_creates_index():CODE
LOWturbovec-python/tests/test_llama_index.py46def test_constructor_no_index_is_lazy():CODE
LOWturbovec-python/tests/test_llama_index.py84def test_add_and_query_returns_nodes():CODE
LOWturbovec-python/tests/test_llama_index.py99def test_metadata_and_text_roundtrip():CODE
LOWturbovec-python/tests/test_llama_index.py168def test_from_persist_dir_loads_default_namespace(tmp_path):CODE
LOWturbovec-python/tests/test_llama_index.py184def test_from_persist_dir_with_custom_namespace(tmp_path):CODE
LOWturbovec-python/tests/test_llama_index.py196def test_delete_by_ref_doc_id_removes_every_matching_node():CODE
LOWturbovec-python/tests/test_llama_index.py212def test_delete_by_missing_ref_doc_id_is_noop():CODE
LOWturbovec-python/tests/test_llama_index.py219def test_delete_nodes_by_node_id():CODE
LOWturbovec-python/tests/test_llama_index.py233def test_add_upsert_replaces_same_node_id():CODE
LOWturbovec-python/tests/test_llama_index.py245def test_add_upsert_dim_mismatch_preserves_existing_node():CODE
LOWturbovec-python/tests/test_llama_index.py275def test_query_with_eq_filter():CODE
LOWturbovec-python/tests/test_llama_index.py288def test_query_with_in_filter():CODE
LOWturbovec-python/tests/test_llama_index.py305def test_query_with_and_filter():CODE
LOWturbovec-python/tests/test_llama_index.py323def test_query_with_or_filter():CODE
LOWturbovec-python/tests/test_llama_index.py342def test_query_filter_no_matches_returns_empty():CODE
LOWturbovec-python/tests/test_llama_index.py356def test_query_filter_selective_returns_top_k_from_matches():CODE
LOWturbovec-python/tests/test_llama_index.py376def test_query_with_node_ids_filter():CODE
LOWturbovec-python/tests/test_llama_index.py391def test_query_with_doc_ids_filter_matches_ref_doc_id_only():CODE
LOWturbovec-python/tests/test_llama_index.py417def test_query_with_node_ids_and_filters_intersect():CODE
LOWturbovec-python/tests/test_llama_index.py439def test_query_ne_filter_treats_missing_key_as_no_match():CODE
LOWturbovec-python/tests/test_llama_index.py460def test_query_text_match_is_case_sensitive():CODE
LOWturbovec-python/tests/test_llama_index.py497def test_query_text_match_insensitive_folds_case():CODE
LOWturbovec-python/tests/test_llama_index.py523def test_query_text_match_raises_type_error_on_non_string_operands():CODE
LOWturbovec-python/tests/test_llama_index.py540def test_query_all_operator_matches_set_subset():CODE
LOWturbovec-python/tests/test_llama_index.py562def test_query_any_operator_matches_set_intersection():CODE
289 more matches not shown…
Over-Commented Block44 hits · 44 pts
SeverityFileLineSnippetContext
LOWturbovec/build.rs1// Emit BLAS link directives so downstream binaries (tests, examples, andCOMMENT
LOWturbovec/tests/tqplus_calibration.rs1//! Wave-6 regression tests for the TQ+ calibration state machine.COMMENT
LOWturbovec/tests/concurrent_search.rs1//! Integration tests for concurrent search on a shared `TurboQuantIndex`.COMMENT
LOWturbovec/tests/filtering.rs1//! Correctness tests for slot-mask filtering on `TurboQuantIndex` and theCOMMENT
LOWturbovec/tests/input_validation.rs1//! Input-validation tests for `TurboQuantIndex` and `IdMapIndex`.COMMENT
LOWturbovec/tests/swap_remove.rs1//! Correctness of `TurboQuantIndex::swap_remove`.COMMENT
LOWturbovec/tests/distortion.rs1//! Statistical validation of quantizer distortion.COMMENT
LOWturbovec/tests/kernel_correctness.rs1//! Correctness harness for the SIMD scoring kernels.COMMENT
LOWturbovec/tests/lazy_init.rs1//! Tests for lazy index construction on `TurboQuantIndex` and `IdMapIndex`.COMMENT
LOWturbovec/tests/rotation.rs1//! Correctness tests for the rotation matrix generator.COMMENT
LOWturbovec/examples/dump_state.rs1//! Dump the rotation matrix and Lloyd-Max codebook for a given (dim, bits) toCOMMENT
LOWturbovec/examples/kernel_xtest.rs1//! Cross-arch kernel parity smoke-test.COMMENT
LOWturbovec/examples/kernel_xtest.rs61 // Dump per-query top-K as `qi <tab> rank <tab> idx`. Scores areCOMMENT
LOWturbovec/src/io.rs1//! Read/write TurboVec index files.COMMENT
LOWturbovec/src/error.rs1//! Errors returned by the user-facing add and construct paths.COMMENT
LOWturbovec/src/error.rs21use std::fmt;COMMENT
LOWturbovec/src/error.rs41 /// `vectors.len()` is not a whole multiple of `dim`.COMMENT
LOWturbovec/src/encode.rs1//! Encode vectors: normalize, rotate, calibrate, quantize, bit-pack, scale.COMMENT
LOWturbovec/src/encode.rs41/// floor: at ~200 samples the calibration noise eats the precision gainCOMMENT
LOWturbovec/src/encode.rs241}COMMENT
LOWturbovec/src/lib.rs1//! TurboQuant implementation for vector search.COMMENT
LOWturbovec/src/lib.rs21//!COMMENT
LOWturbovec/src/lib.rs61const ROTATION_SEED: u64 = 42;COMMENT
LOWturbovec/src/lib.rs81COMMENT
LOWturbovec/src/lib.rs121 bit_width: usize,COMMENT
LOWturbovec/src/lib.rs221 rotation: OnceLock::new(),COMMENT
LOWturbovec/src/lib.rs321 // Rotation, boundaries, and centroids remain valid (they only dependCOMMENT
LOWturbovec/src/lib.rs381 }COMMENT
LOWturbovec/src/lib.rs401 /// query coordinate is non-finite (NaN, +Inf, -Inf) or hasCOMMENT
LOWturbovec/src/lib.rs641 // would see `existing = None` (the lazy-first-add signal),COMMENT
LOWturbovec/src/search.rs1//! SIMD-accelerated search pipeline.COMMENT
LOWturbovec/src/search.rs21/// Process-global. Tests sample before/after a single search to verifyCOMMENT
LOWturbovec/src/search.rs381//COMMENT
LOWturbovec/src/search.rs1261 // is the binding one: `FLUSH_EVERY * max_lut <= 65535` ⇒ max_lut ≤ 255.COMMENT
LOWturbovec/src/search.rs1341 // A pair-level skip short-circuits two 32-vector blocks.COMMENT
LOWturbovec/src/id_map.rs1//! Stable external IDs on top of [`TurboQuantIndex`].COMMENT
LOWturbovec/src/id_map.rs21//!COMMENT
LOWturbovec/src/id_map.rs81 /// Returns the same errors asCOMMENT
LOWturbovec/src/id_map.rs181COMMENT
LOW.cargo/config.toml1# Target the x86-64-v3 microarchitecture level on all x86_64 builds.COMMENT
LOWturbovec-python/build.rs1fn main() {COMMENT
LOWturbovec-python/python/turbovec/agno.py121 self.dimensions: int = embedder.dimensionsCOMMENT
LOWturbovec-python/tests/test_agno.py1021 db.create()COMMENT
LOWturbovec-python/src/lib.rs241 /// Remove the vector with external id `id`. Returns `True` if it wasCOMMENT
Unused Imports19 hits · 16 pts
SeverityFileLineSnippetContext
LOWturbovec-python/python/turbovec/llama_index.py6CODE
LOWturbovec-python/python/turbovec/haystack.py16CODE
LOWturbovec-python/python/turbovec/_persist.py16CODE
LOWturbovec-python/python/turbovec/agno.py10CODE
LOWturbovec-python/python/turbovec/agno.py15CODE
LOWturbovec-python/python/turbovec/__init__.py1CODE
LOWturbovec-python/python/turbovec/__init__.py1CODE
LOWturbovec-python/python/turbovec/langchain.py9CODE
LOWturbovec-python/python/turbovec/_dedup.py20CODE
LOWturbovec-python/tests/test_llama_index.py1CODE
LOWturbovec-python/tests/test_dedup.py2CODE
LOWturbovec-python/tests/test_haystack.py2CODE
LOWturbovec-python/tests/test_haystack.py946CODE
LOWturbovec-python/tests/test_security.py9CODE
LOWturbovec-python/tests/test_id_map.py2CODE
LOWturbovec-python/tests/test_agno.py2CODE
LOWturbovec-python/tests/test_langchain.py1CODE
LOWturbovec-python/tests/test_index.py7CODE
LOWturbovec-python/tests/test_filtering.py2CODE
Decorative Section Separators5 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMturbovec/examples/kernel_xtest.rs96// ─── Tiny deterministic PRNG (xoshiro256** seeded via splitmix64) ────────COMMENT
MEDIUMturbovec/src/encode.rs185// ─── Norm and scale (aarch64) ────────────────────────────────────────────────COMMENT
MEDIUMturbovec/src/encode.rs227// ─── Norm and scale (fallback) ───────────────────────────────────────────────COMMENT
MEDIUMturbovec/src/encode.rs243// ─── Fused quantize + scale + pack (aarch64) ────────────────────────────────COMMENT
MEDIUMturbovec/src/encode.rs355// ─── Fused quantize + scale + pack (fallback) ───────────────────────────────COMMENT
Modern Structural Boilerplate8 hits · 8 pts
SeverityFileLineSnippetContext
LOWturbovec-python/python/turbovec/llama_index.py678__all__ = ["TurboQuantVectorStore"]CODE
LOWturbovec-python/python/turbovec/haystack.py747__all__ = ["TurboQuantDocumentStore"]CODE
LOWturbovec-python/python/turbovec/_persist.py55__all__ = ["check_persisted_handles"]CODE
LOWturbovec-python/python/turbovec/agno.py686 def update_metadata(self, content_id: str, metadata: Dict[str, Any]) -> None:CODE
LOWturbovec-python/python/turbovec/agno.py788__all__ = ["TurboQuantVectorDb"]CODE
LOWturbovec-python/python/turbovec/__init__.py3__all__ = ["IdMapIndex", "TurboQuantIndex"]CODE
LOWturbovec-python/python/turbovec/langchain.py558__all__ = ["TurboQuantVectorStore"]CODE
LOWturbovec-python/python/turbovec/_dedup.py71__all__ = ["DuplicatePolicy", "resolve_duplicates"]CODE
Modern AI Meta-Vocabulary2 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMturbovec-python/tests/test_llama_index.py895 # store into a LlamaIndex pipeline (RAG, query engine, etc.), so itCOMMENT
MEDIUMturbovec-python/tests/test_langchain.py475 # Tier 4: dim is inferred from the embedding model, no explicit param.COMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMturbovec/tests/kernel_correctness.rs23/// which makes the self-query invariant below robust.COMMENT
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOWturbovec/src/pack.rs26 // Step 1: Extract packed nibble bytes per vector per groupCOMMENT
LOWturbovec/src/pack.rs57 // Step 2: Pack into platform-specific layoutCOMMENT
Structural Annotation Overuse2 hits · 3 pts
SeverityFileLineSnippetContext
LOWturbovec/src/pack.rs26 // Step 1: Extract packed nibble bytes per vector per groupCOMMENT
LOWturbovec/src/pack.rs57 // Step 2: Pack into platform-specific layoutCOMMENT
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWturbovec-python/python/turbovec/haystack.py336CODE
LOWbenchmarks/create_diagrams.py51CODE
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWturbovec-python/python/turbovec/agno.py61CODE
LOWturbovec-python/tests/test_llama_index.py968CODE