AI Slop Code RIsk Monitor

alibaba/zvec

A lightweight, lightning-fast, in-process vector database

12.2 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for alibaba/zvec, a C++ project with 16,092 GitHub stars. SynthScan examined 200,745 lines of code across 805 source files, recording 1934 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 12.2 (Moderate pattern signal); it is not an authorship estimate.

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

12.2
Adjusted Signal
12.2
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
16.1K
Stars
C++
Language
200.7K
Lines of Code
805
Files
1.9K
Pattern Hits
2026-10-12
Scan Date
0.07
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 32.2/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 5.7/100 · LOW

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

Agent Over-Engineering Ratio 22.7/100 · LOW

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

PR Review Velocity Impact 47.2/100 · MEDIUM

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

What These Metrics Mean

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

Pattern-Signal History

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

Severity Breakdown

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

CRITICAL 0HIGH 54MEDIUM 182LOW 1698

Directory Score Breakdown

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

Pattern Findings

The scanner identified 1934 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block849 hits · 842 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt281 # DiskAnn is now statically linked into _zvec.so via --whole-archiveCOMMENT
LOWtools/core/helper.h1// Copyright 2025-present the zvec projectCOMMENT
LOWtools/core/helper.h21#include <ailego/parallel/lock.h>COMMENT
LOWtools/core/helper.h41#pragma clang diagnostic ignored "-Wshadow"COMMENT
LOWtools/core/index_meta_helper.h1// Copyright 2025-present the zvec projectCOMMENT
LOWtools/core/vecs_common.h1// Copyright 2025-present the zvec projectCOMMENT
LOWtools/core/filter_result_cache.h1// Copyright 2025-present the zvec projectCOMMENT
LOWtools/core/bench_result.h1// Copyright 2025-present the zvec projectCOMMENT
LOWtools/core/flow.h1// Copyright 2025-present the zvec projectCOMMENT
LOWtools/core/txt_input_reader.h1// Copyright 2025-present the zvec projectCOMMENT
LOWtools/core/vecs_reader.h1// Copyright 2025-present the zvec projectCOMMENT
LOWtools/core/meta_segment_common.h1// Copyright 2025-present the zvec projectCOMMENT
LOWtools/core/vecs_index_holder.h1// Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/__init__.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/zvec.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/jina_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/sentence_transformer_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/qwen_rerank_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/openai_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/jina_embedding_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/qwen_embedding_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/multi_vector_reranker.py1# Copyright 2025-present the zvec projectCOMMENT
LOW…zvec/extension/sentence_transformer_rerank_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/qwen_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/__init__.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/http_embedding_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/rerank_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/openai_embedding_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOW…c/extension/sentence_transformer_embedding_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/embedding_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/extension/bm25_embedding_function.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/typing/__init__.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/typing/enum.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/common/constants.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/common/__init__.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/model/convert.py1# Licensed under the Apache License, Version 2.0 (the "License");COMMENT
LOWpython/zvec/model/__init__.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/model/_validation.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/model/doc.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/model/collection.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/model/param/query.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/model/param/__init__.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/model/schema/collection_schema.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/model/schema/__init__.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/model/schema/field_schema.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/executor/__init__.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/executor/query_executor.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/tool/util.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/zvec/tool/__init__.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_collection_fts.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_collection_hnsw_rabitq.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_turbo_hnsw_int8.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_query_executor.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_collection_group_by.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_gil_release.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_typing.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_vamana.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_collection.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_collection_fts_vector_hybrid.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_util.py1# Copyright 2025-present the zvec projectCOMMENT
789 more matches not shown…
Decorative Section Separators141 hits · 483 pts
SeverityFileLineSnippetContext
MEDIUM⚡python/zvec/__init__.py53# ==============================COMMENT
MEDIUM⚡python/zvec/__init__.py55# ==============================COMMENT
MEDIUM⚡python/zvec/__init__.py134# ==============================COMMENT
MEDIUM⚡python/zvec/__init__.py136# ==============================COMMENT
MEDIUM⚡python/zvec/__init__.py213# ==============================COMMENT
MEDIUM⚡python/zvec/__init__.py215# ==============================COMMENT
MEDIUMpython/tests/test_query_executor.py43# ----------------------------COMMENT
MEDIUMpython/tests/test_query_executor.py45# ----------------------------COMMENT
MEDIUMpython/tests/test_query_executor.py57# ----------------------------COMMENT
MEDIUMpython/tests/test_query_executor.py59# ----------------------------COMMENT
MEDIUMpython/tests/test_typing.py31# ----------------------------COMMENT
MEDIUMpython/tests/test_typing.py33# ----------------------------COMMENT
MEDIUM⚡python/tests/test_typing.py186# ----------------------------COMMENT
MEDIUM⚡python/tests/test_typing.py188# ----------------------------COMMENT
MEDIUMpython/tests/test_vamana.py67# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/tests/test_vamana.py69# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/tests/test_vamana.py145# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/tests/test_vamana.py147# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡python/tests/test_vamana.py420# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡python/tests/test_vamana.py422# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py194# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py196# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py202# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py204# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py311# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py313# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py415# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py417# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py424# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py426# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py585# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py587# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py752# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py754# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py805# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py807# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py872# ----------------------------COMMENT
MEDIUM⚡python/tests/test_collection.py874# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py218# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py220# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py457# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py459# ----------------------------COMMENT
MEDIUMpython/tests/test_convert.py11# ----------------------------COMMENT
MEDIUMpython/tests/test_convert.py13# ----------------------------COMMENT
MEDIUMpython/tests/test_convert.py394# ----------------------------COMMENT
MEDIUMpython/tests/test_convert.py396# ----------------------------COMMENT
MEDIUM⚡python/tests/test_util.py22# ----------------------------COMMENT
MEDIUM⚡python/tests/test_util.py24# ----------------------------COMMENT
MEDIUM⚡python/tests/test_reranker.py35# ----------------------------COMMENT
MEDIUM⚡python/tests/test_reranker.py37# ----------------------------COMMENT
MEDIUM⚡python/tests/test_reranker.py146# ----------------------------COMMENT
MEDIUM⚡python/tests/test_reranker.py148# ----------------------------COMMENT
MEDIUM⚡python/tests/test_reranker.py439# ----------------------------COMMENT
MEDIUM⚡python/tests/test_reranker.py441# ----------------------------COMMENT
MEDIUMpython/tests/test_reranker.py68# ----------------------------COMMENT
MEDIUMpython/tests/test_reranker.py70# ----------------------------COMMENT
MEDIUMpython/tests/test_reranker.py106# ----------------------------COMMENT
MEDIUMpython/tests/test_reranker.py108# ----------------------------COMMENT
MEDIUMpython/tests/test_schema.py29# ----------------------------COMMENT
MEDIUMpython/tests/test_schema.py31# ----------------------------COMMENT
81 more matches not shown…
Hyper-Verbose Identifiers432 hits · 384 pts
SeverityFileLineSnippetContext
LOWpython/zvec/model/collection.py50def _require_positive_integer(value, name: str) -> None:CODE
LOWpython/tests/test_collection_fts.py102 def test_create_and_open_without_vectors(self, fts_collection: Collection):CODE
LOWpython/tests/test_collection_fts.py110 def test_create_schema_omitting_vectors_kwarg(self):CODE
LOWpython/tests/test_collection_fts.py128 def test_insert_and_fts_query(self, fts_collection: Collection):CODE
LOWpython/tests/test_collection_fts.py154 def test_optimize_rebuilds_fts(self, fts_collection: Collection):CODE
LOWpython/tests/test_collection_fts.py173 def test_vector_query_rejected(self, fts_collection: Collection):CODE
LOWpython/tests/test_collection_hnsw_rabitq.py47def hnsw_rabitq_collection_schema():CODE
LOWpython/tests/test_collection_hnsw_rabitq.py132def collection_with_single_doc(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py150def collection_with_multiple_docs(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py187 def test_vector_schema_validation(self, hnsw_rabitq_collection: Collection):CODE
LOWpython/tests/test_collection_hnsw_rabitq.py228 def test_insert_multiple_docs(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py275 def test_fetch_nonexistent_doc(self, collection_with_single_doc: Collection):CODE
LOWpython/tests/test_collection_hnsw_rabitq.py319 def test_query_with_different_ef_values(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py381 def test_query_with_output_fields(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py401 def test_query_with_include_vector(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py488 def test_delete_multiple_docs(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py506 def test_optimize_close_reopen_and_query(CODE
LOWpython/tests/test_query_executor.py156 def test_isinstance_compatibility(self):CODE
LOWpython/tests/test_query_executor.py196 def test_properties_with_weighted_reranker(self):CODE
LOWpython/tests/test_query_executor.py211 def test_properties_with_callback_reranker(self):CODE
LOWpython/tests/test_query_executor.py231 def test_do_build_without_queries(self):CODE
LOWpython/tests/test_query_executor.py242 def test_do_build_query_wo_vector(self):CODE
LOW⚡python/tests/test_query_executor.py253 def test_do_merge_rerank_results_single_without_reranker(self):CODE
LOW⚡python/tests/test_query_executor.py263 def test_do_merge_rerank_results_empty(self):CODE
LOW⚡python/tests/test_query_executor.py272 def test_do_merge_rerank_results_with_reranker(self):CODE
LOWpython/tests/test_query_executor.py289 def test_execute_python_pipeline(self):CODE
LOWpython/tests/test_query_executor.py312 def test_execute_single_query_batch_materializes(self):CODE
LOWpython/tests/test_query_executor.py332 def test_build_search_query_by_missing_id_raises_value_error(self):CODE
LOWpython/tests/test_query_executor.py345 def test_build_search_query_validates_query(self):CODE
LOWpython/tests/test_query_executor.py359 def test_build_search_query_preserves_fts_text(self):CODE
LOWpython/tests/test_collection_group_by.py46def group_by_collection_schema():CODE
LOWpython/tests/test_collection_group_by.py139def group_by_collection_with_docs(CODE
LOWpython/tests/test_collection_group_by.py234 def test_group_by_with_filter(self, group_by_collection: Collection):CODE
LOWpython/tests/test_collection_group_by.py250 def test_group_by_include_vector(self, group_by_collection: Collection):CODE
LOWpython/tests/test_collection_group_by.py267 def test_group_by_output_fields(self, group_by_collection: Collection):CODE
LOWpython/tests/test_collection_group_by.py282 def test_group_by_invalid_field(self, group_by_collection: Collection):CODE
LOWpython/tests/test_collection_group_by.py290 def test_group_by_query_by_id(self, group_by_collection: Collection):CODE
LOWpython/tests/test_collection_group_by.py306 def test_group_by_rejects_unsupported_query(CODE
LOWpython/tests/test_collection_group_by.py323 def test_group_by_rejects_invalid_group_params(CODE
LOWpython/tests/test_collection_group_by.py334 def test_group_by_empty_collection(self, group_by_collection: Collection):CODE
LOWpython/tests/test_collection_group_by.py345def test_group_by_public_api_exports():CODE
LOWpython/tests/test_gil_release.py86 def test_gil_released_during_query(self, gil_test_collection: Collection):CODE
LOWpython/tests/test_gil_release.py187 def test_parallel_queries_correctness(self, gil_test_collection: Collection):CODE
LOWpython/tests/test_gil_release.py224 def test_thread_safety_concurrent_queries(self, gil_test_collection: Collection):CODE
LOWpython/tests/test_gil_release.py252 def test_concurrent_fetch_release_gil(self, gil_test_collection: Collection):CODE
LOWpython/tests/test_typing.py75def test_metric_type_has_member(member):CODE
LOWpython/tests/test_typing.py107def test_data_type_has_member(member):CODE
LOW⚡python/tests/test_typing.py126def test_index_type_has_member(member):CODE
LOW⚡python/tests/test_typing.py133def test_io_backend_type_has_member(member):CODE
LOW⚡python/tests/test_typing.py137def test_current_io_backend_type():CODE
LOWpython/tests/test_typing.py162def test_quantize_type_has_member(member):CODE
LOW⚡python/tests/test_typing.py182def test_status_code_has_member(member):CODE
LOWpython/tests/test_vamana.py195 def test_to_dict_includes_all_fields(self):CODE
LOWpython/tests/test_vamana.py223 def test_repr_contains_key_fields(self):CODE
LOW⚡python/tests/test_vamana.py347 def test_zero_prefetch_values_are_preserved(self):CODE
LOW⚡python/tests/test_vamana.py352 def test_prefetch_fields_can_override_defaults_independently(self):CODE
LOW⚡python/tests/test_vamana.py361 def test_repr_contains_key_fields(self):CODE
LOWpython/tests/test_vamana.py396 def test_default_prefetch_pickle_roundtrip(self):CODE
LOW⚡python/tests/test_vamana.py412 def test_index_type_enum_member(self):CODE
LOWpython/tests/test_vamana.py470 def test_insert_and_query_self_recall(CODE
372 more matches not shown…
Unused Imports274 hits · 222 pts
SeverityFileLineSnippetContext
LOWtools/core/convert_cohere_parquet.py1CODE
LOWpython/zvec/__init__.py15CODE
LOWpython/zvec/__init__.py57CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py60CODE
LOWpython/zvec/__init__.py80CODE
LOWpython/zvec/__init__.py81CODE
LOWpython/zvec/__init__.py84CODE
LOWpython/zvec/__init__.py85CODE
LOWpython/zvec/__init__.py85CODE
LOWpython/zvec/__init__.py85CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py89CODE
LOWpython/zvec/__init__.py113CODE
LOWpython/zvec/__init__.py113CODE
LOWpython/zvec/__init__.py113CODE
LOWpython/zvec/__init__.py116CODE
LOWpython/zvec/__init__.py116CODE
LOWpython/zvec/__init__.py116CODE
LOWpython/zvec/__init__.py116CODE
LOWpython/zvec/__init__.py119CODE
LOWpython/zvec/__init__.py120CODE
LOWpython/zvec/__init__.py120CODE
LOWpython/zvec/__init__.py120CODE
LOWpython/zvec/__init__.py120CODE
LOWpython/zvec/__init__.py120CODE
214 more matches not shown…
Docstring Block Structure35 hits · 175 pts
SeverityFileLineSnippetContext
HIGHpython/zvec/zvec.py45Initialize Zvec with configuration options. This function must be called before any other operation. It can onlSTRING
HIGHpython/zvec/zvec.py192Create a new collection and open it for use. If a collection already exists at the given path, it may raise an erroSTRING
HIGHpython/zvec/zvec.py229Open an existing collection from disk. The collection must have been previously created with ``create_and_open``. STRING
HIGHpython/zvec/extension/jina_function.py130Call Jina Embeddings API. Args: input (TEXT): Input text to embed. dimension (Optional[STRING
HIGHpython/zvec/extension/qwen_rerank_function.py106Re-rank documents using Qwen's TextReRank API. Sends document texts to DashScope TextReRank service along with STRING
HIGHpython/zvec/extension/openai_function.py101Call OpenAI Embeddings API. Args: input (TEXT): Input text to embed. dimension (OptionaSTRING
HIGHpython/zvec/extension/jina_embedding_function.py25Dense text embedding function using Jina AI API. This class provides text-to-vector embedding capabilities using JiSTRING
HIGHpython/zvec/extension/jina_embedding_function.py176Generate dense embedding vector for the input text. This method calls the Jina Embeddings API to convert input STRING
HIGHpython/zvec/extension/qwen_embedding_function.py25Dense text embedding function using Qwen (DashScope) API. This class provides text-to-vector embedding capabilitiesSTRING
HIGHpython/zvec/extension/qwen_embedding_function.py183Generate dense embedding vector for the input text. This method calls the DashScope TextEmbedding API to converSTRING
HIGHpython/zvec/extension/qwen_embedding_function.py273Sparse text embedding function using Qwen (DashScope) API. This class provides text-to-sparse-vector embedding capaSTRING
HIGHpython/zvec/extension/qwen_embedding_function.py426Generate sparse embedding vector for the input text. This method calls the DashScope TextEmbedding API with spaSTRING
HIGH…zvec/extension/sentence_transformer_rerank_function.py28Re-ranker using Sentence Transformer cross-encoder models for semantic re-ranking. This re-ranker leverages pre-traSTRING
HIGH…zvec/extension/sentence_transformer_rerank_function.py288Re-rank documents using Sentence Transformer cross-encoder model. Evaluates each query-document pair using the STRING
HIGHpython/zvec/extension/qwen_function.py93Call DashScope TextEmbedding API. Args: input (TEXT): Input text to embed. dimension (iSTRING
HIGHpython/zvec/extension/qwen_function.py147Call DashScope TextReRank API. Args: query (str): Query text for semantic matching. docSTRING
HIGHpython/zvec/extension/http_embedding_function.py27Dense text embedding function using any OpenAI-compatible HTTP endpoint. This class calls any server that implementSTRING
HIGHpython/zvec/extension/http_embedding_function.py110Generate a dense embedding vector for the input text. Results are cached (LRU, up to 256 entries) so repeated sSTRING
HIGHpython/zvec/extension/openai_embedding_function.py25Dense text embedding function using OpenAI API. This class provides text-to-vector embedding capabilities using OpeSTRING
HIGHpython/zvec/extension/openai_embedding_function.py127Initialize the OpenAI dense embedding function. Args: model (str): OpenAI model name. Defaults to "STRING
HIGHpython/zvec/extension/openai_embedding_function.py175Generate dense embedding vector for the input text. This method calls the OpenAI Embeddings API to convert inpuSTRING
HIGH…c/extension/sentence_transformer_embedding_function.py28Default local dense embedding using all-MiniLM-L6-v2 model. This is the default implementation for dense text embedSTRING
HIGH…c/extension/sentence_transformer_embedding_function.py215Generate dense embedding vector for the input text. This method uses the Sentence Transformer model to convert STRING
HIGH…c/extension/sentence_transformer_embedding_function.py314Default local sparse embedding using SPLADE model. This class provides sparse vector embedding using the SPLADE (SPSTRING
HIGH…c/extension/sentence_transformer_embedding_function.py561Remove a specific model from cache. Args: model_source (str): Model source ("huggingface" or "modelSTRING
HIGH…c/extension/sentence_transformer_embedding_function.py597Initialize with SPLADE model. Args: model_source (Literal["huggingface", "modelscope"]): Model sourSTRING
HIGH…c/extension/sentence_transformer_embedding_function.py669Generate sparse embedding vector for the input text. This method uses the SPLADE model to convert input text inSTRING
HIGHpython/zvec/extension/embedding_function.py89Abstract base class for sparse vector embedding functions. Sparse embedding functions map multimodal input (text, iSTRING
HIGHpython/zvec/extension/bm25_embedding_function.py25BM25-based sparse embedding function using DashText SDK. This class provides text-to-sparse-vector embedding capabiSTRING
HIGHpython/zvec/extension/bm25_embedding_function.py288Generate BM25 sparse embedding for the input text. This method computes BM25 scores for the input text using DaSTRING
HIGHpython/zvec/model/collection.py472Iterate over all documents in the collection. Streams documents one by one using an isolated snapshot taken at STRING
HIGHpython/zvec/model/collection.py523Perform vector similarity search with optional filtering and re-ranking. At least one `Query` must be provided STRING
HIGHpython/zvec/model/collection.py588Perform group-by vector search. Groups results by a scalar field value, returning the top-k documents wSTRING
HIGHpython/zvec/model/schema/collection_schema.py30Defines the structure of a collection in Zvec. A collection schema specifies the name of the collection and its fieSTRING
HIGHpython/zvec/tool/util.py21Import a Python module and raise a user-friendly error if it is not available. This utility helps provide actionablSTRING
Excessive Try-Catch Wrapping76 hits · 90 pts
SeverityFileLineSnippetContext
LOWtools/core/convert_cohere_parquet.py92 except Exception:CODE
LOW⚡python/zvec/__init__.py48except Exception:CODE
LOW⚡python/zvec/__init__.py225except Exception:CODE
LOWpython/zvec/extension/jina_function.py160 except Exception as e:CODE
LOWpython/zvec/extension/sentence_transformer_function.py136 except Exception as e:CODE
LOWpython/zvec/extension/openai_function.py127 except Exception as e:CODE
MEDIUMpython/zvec/extension/qwen_embedding_function.py126 ... print(f"Error: {e}")STRING
MEDIUMpython/zvec/extension/qwen_embedding_function.py378 ... print(f"Error: {e}")STRING
LOW…zvec/extension/sentence_transformer_rerank_function.py260 except Exception as e:CODE
LOW…zvec/extension/sentence_transformer_rerank_function.py378 except Exception as e:CODE
LOWpython/zvec/extension/qwen_function.py122 except Exception as e:CODE
LOWpython/zvec/extension/qwen_function.py169 except Exception as e:CODE
MEDIUMpython/zvec/extension/openai_embedding_function.py109 ... print(f"Error: {e}")STRING
MEDIUM…c/extension/sentence_transformer_embedding_function.py145 ... print(f"Error: {e}")STRING
LOW…c/extension/sentence_transformer_embedding_function.py305 except Exception as e:CODE
MEDIUM…c/extension/sentence_transformer_embedding_function.py471 ... print(f"Error: {e}")STRING
LOW…c/extension/sentence_transformer_embedding_function.py755 except Exception as e:CODE
MEDIUMpython/zvec/extension/bm25_embedding_function.py153 ... print(f"Error: {e}")STRING
LOWpython/zvec/extension/bm25_embedding_function.py250 except Exception as e:CODE
LOWpython/zvec/extension/bm25_embedding_function.py372 except Exception as e:CODE
LOWpython/zvec/model/doc.py147 except Exception as e:CODE
MEDIUMpython/zvec/model/doc.py138def __repr__(self) -> str:CODE
LOWpython/zvec/model/schema/collection_schema.py216 except Exception as e:CODE
MEDIUMpython/zvec/model/schema/collection_schema.py208def __repr__(self) -> str:CODE
LOWpython/zvec/model/schema/field_schema.py180 except Exception as e:CODE
LOWpython/zvec/model/schema/field_schema.py321 except Exception as e:CODE
MEDIUMpython/zvec/model/schema/field_schema.py176def __repr__(self) -> str:CODE
MEDIUMpython/zvec/model/schema/field_schema.py317def __repr__(self) -> str:CODE
LOWpython/tests/test_collection_fts.py75 except Exception as e:CODE
LOWpython/tests/test_collection_hnsw_rabitq.py127 except Exception as e:CODE
LOWpython/tests/test_collection_group_by.py134 except Exception as e:CODE
LOWpython/tests/test_gil_release.py79 except Exception:CODE
LOWpython/tests/test_gil_release.py239 except Exception as e:CODE
LOWpython/tests/test_gil_release.py262 except Exception as e:CODE
MEDIUMpython/tests/test_gil_release.py230def worker(thread_id):CODE
MEDIUMpython/tests/test_gil_release.py257def worker(thread_id):CODE
LOWpython/tests/test_collection.py153 except Exception as e:CODE
LOWpython/tests/test_collection_fts_vector_hybrid.py82 except Exception as e:CODE
LOWpython/tests/test_collection_diskann.py146 except Exception as e:CODE
LOWpython/tests/test_iter_docs.py65 except Exception as e:CODE
LOWpython/tests/test_jieba_default_dict.py114 except Exception as e:CODE
MEDIUMpython/tests/detail/test_collection_dql.py1328def insert_operation(thread_id):CODE
MEDIUMpython/tests/detail/test_collection_dql.py1339def update_operation(thread_id):CODE
MEDIUMpython/tests/detail/test_collection_dql.py1350def upsert_operation(thread_id):CODE
MEDIUMpython/tests/detail/test_collection_dql.py1361def query_operation(thread_id):CODE
MEDIUMpython/tests/detail/test_collection_dql.py1378def delete_operation(thread_id):CODE
LOWpython/tests/detail/test_collection_dql.py1336 except Exception as e:CODE
LOWpython/tests/detail/test_collection_dql.py1347 except Exception as e:CODE
LOWpython/tests/detail/test_collection_dql.py1358 except Exception as e:CODE
LOWpython/tests/detail/test_collection_dql.py1375 except Exception as e:CODE
LOWpython/tests/detail/test_collection_dql.py1388 except Exception as e:CODE
MEDIUMpython/tests/detail/test_collection_create_and_open.py423def create_collection_thread(thread_id):CODE
MEDIUMpython/tests/detail/test_collection_create_and_open.py596def open_collection_thread(thread_id):CODE
LOWpython/tests/detail/test_collection_create_and_open.py432 except Exception as e:CODE
LOWpython/tests/detail/test_collection_create_and_open.py606 except Exception as e:CODE
LOWpython/tests/detail/test_collection_concurrency.py86 except Exception as e:CODE
LOWpython/tests/detail/test_collection_concurrency.py112 except Exception as e:CODE
LOWpython/tests/detail/test_collection_concurrency.py119 except Exception as e:CODE
LOWpython/tests/detail/test_collection_concurrency.py176 except Exception as e:CODE
LOWpython/tests/detail/test_collection_concurrency.py238 except Exception as e:CODE
16 more matches not shown…
Self-Referential Comments19 hits · 56 pts
SeverityFileLineSnippetContext
MEDIUMpython/zvec/extension/jina_embedding_function.py145 # Initialize base class for API connectionCOMMENT
MEDIUMpython/zvec/extension/qwen_embedding_function.py160 # Initialize base class for API connectionCOMMENT
MEDIUMpython/zvec/extension/qwen_embedding_function.py409 # Initialize base class for API connectionCOMMENT
MEDIUM…zvec/extension/sentence_transformer_rerank_function.py189 # Initialize base class for model loadingCOMMENT
MEDIUMpython/zvec/extension/openai_embedding_function.py141 # Initialize base class for API connectionCOMMENT
MEDIUM…c/extension/sentence_transformer_embedding_function.py185 # Initialize base class for model loadingCOMMENT
MEDIUM…c/extension/sentence_transformer_embedding_function.py645 # Initialize base class for model loadingCOMMENT
MEDIUMpython/tests/test_embedding.py941 # Create a normalized vectorCOMMENT
MEDIUMpython/tests/test_embedding.py1258 # Create a mock sparse matrix that simulates scipy.sparse behaviorCOMMENT
MEDIUMpython/tests/test_embedding.py1262 # Create a dense array representation with vocab_size=30522COMMENT
MEDIUMpython/tests/test_embedding.py1369 # Create a mock sparse matrixCOMMENT
MEDIUMpython/tests/test_embedding.py1372 # Create a dense array representation with vocab_size=30522COMMENT
MEDIUMpython/tests/test_embedding.py1472 # Create a mock sparse matrix that simulates scipy.sparse behaviorCOMMENT
MEDIUMpython/tests/test_embedding.py1476 # Create a dense array representation with vocab_size=30522COMMENT
MEDIUMpython/tests/test_embedding.py1545 # Create a dense array representation with vocab_size=30522COMMENT
MEDIUMpython/tests/test_iter_docs.py254 # Create the iterator but do not consume it yet.COMMENT
MEDIUMpython/tests/detail/test_collection_create_and_open.py543 # Create a temporary directory and path for the collectionCOMMENT
MEDIUMpython/tests/detail/test_collection_create_and_open.py575 # Create the collection firstCOMMENT
MEDIUM.github/workflows/_build_wheel_job.yml165 # Create a clean venv and installCOMMENT
Cross-File Repetition8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHpython/zvec/extension/jina_embedding_function.py0int: the expected dimensionality of the embedding vector.STRING
HIGHpython/zvec/extension/qwen_embedding_function.py0int: the expected dimensionality of the embedding vector.STRING
HIGHpython/zvec/extension/openai_embedding_function.py0int: the expected dimensionality of the embedding vector.STRING
HIGH…c/extension/sentence_transformer_embedding_function.py0int: the expected dimensionality of the embedding vector.STRING
HIGHpython/zvec/extension/jina_embedding_function.py0dict: extra parameters for model-specific customization.STRING
HIGHpython/zvec/extension/qwen_embedding_function.py0dict: extra parameters for model-specific customization.STRING
HIGHpython/zvec/extension/openai_embedding_function.py0dict: extra parameters for model-specific customization.STRING
HIGH…c/extension/sentence_transformer_embedding_function.py0dict: extra parameters for model-specific customization.STRING
Verbosity Indicators17 hits · 31 pts
SeverityFileLineSnippetContext
LOW⚡python/tests/detail/test_collection_ddl.py630 # Step 2: Create indexCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py638 # Step 3: Insert docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py699 # Step 6: Fetch docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py707 # Step 7: Query docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py711 # Step 8: Drop indexCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py714 # Step 9: Insert docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py759 # Step 12: Fetch docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py767 # Step 13: Query docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py771 # Step 14: FlushCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py778 # Step 15: DestroyCOMMENT
LOWpython/tests/detail/test_collection_ddl.py618 # Step 1: Create collectionCOMMENT
LOWpython/tests/detail/test_collection_ddl.py653 # Step 4: Upsert (existing doc)COMMENT
LOWpython/tests/detail/test_collection_ddl.py668 # Step 5: Update docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py729 # Step 10: Update docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py744 # Step 11: Upsert docCOMMENT
LOW⚡.github/workflows/release.yml22 # Step 1: Build prebuilt libraries for all platformsCOMMENT
LOW⚡.github/workflows/release.yml31 # Step 2: Create release and upload prebuilt librariesCOMMENT
Structural Annotation Overuse17 hits · 31 pts
SeverityFileLineSnippetContext
LOW⚡python/tests/detail/test_collection_ddl.py630 # Step 2: Create indexCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py638 # Step 3: Insert docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py699 # Step 6: Fetch docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py707 # Step 7: Query docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py711 # Step 8: Drop indexCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py714 # Step 9: Insert docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py759 # Step 12: Fetch docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py767 # Step 13: Query docCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py771 # Step 14: FlushCOMMENT
LOW⚡python/tests/detail/test_collection_ddl.py778 # Step 15: DestroyCOMMENT
LOWpython/tests/detail/test_collection_ddl.py618 # Step 1: Create collectionCOMMENT
LOWpython/tests/detail/test_collection_ddl.py653 # Step 4: Upsert (existing doc)COMMENT
LOWpython/tests/detail/test_collection_ddl.py668 # Step 5: Update docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py729 # Step 10: Update docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py744 # Step 11: Upsert docCOMMENT
LOW⚡.github/workflows/release.yml22 # Step 1: Build prebuilt libraries for all platformsCOMMENT
LOW⚡.github/workflows/release.yml31 # Step 2: Create release and upload prebuilt librariesCOMMENT
Empty Error Handlers4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHpython/zvec/__init__.py48except Exception:CODE
HIGHpython/tests/test_gil_release.py79except Exception:CODE
HIGHpython/tests/detail/test_collection_open.py1029except Exception as e:CODE
HIGHpython/tests/detail/test_collection_open.py1004except Exception as e:CODE
Deep Nesting25 hits · 20 pts
SeverityFileLineSnippetContext
LOW…c/extension/sentence_transformer_embedding_function.py760CODE
LOWpython/zvec/extension/bm25_embedding_function.py287CODE
LOWpython/tests/test_refine_query_params.py109CODE
LOWpython/tests/detail/test_collection_dql.py107CODE
LOWpython/tests/detail/test_collection_dql.py178CODE
LOWpython/tests/detail/test_collection_dql.py232CODE
LOWpython/tests/detail/test_collection_dql.py732CODE
LOWpython/tests/detail/test_collection_ddl.py70CODE
LOWpython/tests/detail/test_collection_ddl.py195CODE
LOWpython/tests/detail/test_collection_ddl.py997CODE
LOWpython/tests/detail/test_collection_concurrency.py344CODE
LOWpython/tests/detail/test_collection_concurrency.py365CODE
LOWpython/tests/detail/test_collection_recall.py210CODE
LOWpython/tests/detail/test_collection_open.py177CODE
LOWpython/tests/detail/doc_helper.py47CODE
LOWpython/tests/detail/doc_helper.py111CODE
LOWpython/tests/detail/doc_helper.py175CODE
LOWpython/tests/detail/doc_helper.py263CODE
LOWpython/tests/detail/doc_helper.py367CODE
LOWpython/tests/detail/test_collection_dml.py429CODE
LOWpython/tests/detail/test_collection_dml.py484CODE
LOWpython/tests/detail/fixture_helper.py128CODE
LOWpython/tests/detail/fixture_helper.py346CODE
LOWpython/tests/detail/distance_helper.py295CODE
LOWpython/tests/detail/distance_helper.py340CODE
Modern Structural Boilerplate17 hits · 18 pts
SeverityFileLineSnippetContext
LOW⚡python/zvec/__init__.py137__all__ = [CODE
LOWpython/zvec/zvec.py24__all__ = ["create_and_open", "init", "open"]CODE
LOWpython/zvec/extension/__init__.py36__all__ = [CODE
LOWpython/zvec/typing/__init__.py26__all__ = [CODE
LOWpython/zvec/typing/enum.py18__all__ = ["LogLevel", "LogType"]CODE
LOWpython/zvec/common/__init__.py18__all__ = ["DenseVectorType", "SparseVectorType", "VectorType"]CODE
LOWpython/zvec/model/__init__.py22__all__ = [CODE
LOWpython/zvec/model/doc.py22__all__ = [CODE
LOWpython/zvec/model/collection.py47__all__ = ["Collection"]CODE
LOWpython/zvec/model/param/query.py30__all__ = ["Fts", "Query", "VectorQuery"]CODE
LOWpython/zvec/model/param/__init__.py41__all__ = [CODE
LOWpython/zvec/model/schema/collection_schema.py24__all__ = [CODE
LOWpython/zvec/model/schema/__init__.py21__all__ = ["CollectionSchema", "CollectionStats", "FieldSchema", "VectorSchema"]CODE
LOWpython/zvec/model/schema/field_schema.py33__all__ = [CODE
LOWpython/zvec/executor/__init__.py21__all__ = [CODE
LOWpython/zvec/executor/query_executor.py29__all__ = [CODE
LOWpython/zvec/tool/__init__.py18__all__ = ["require_module"]CODE
Magic Placeholder Names6 hits · 15 pts
SeverityFileLineSnippetContext
HIGHpython/zvec/extension/qwen_rerank_function.py59 ... api_key="your-api-key"STRING
HIGHpython/zvec/extension/qwen_embedding_function.py83 >>> os.environ["DASHSCOPE_API_KEY"] = "your-api-key"STRING
HIGHpython/zvec/extension/qwen_embedding_function.py334 >>> os.environ["DASHSCOPE_API_KEY"] = "your-api-key"STRING
HIGHpython/tests/test_reranker.py348 export DASHSCOPE_API_KEY=your-api-keySTRING
HIGH⚡python/tests/test_embedding.py145 export DASHSCOPE_API_KEY=your-api-keySTRING
HIGHpython/tests/test_embedding.py494 export DASHSCOPE_API_KEY=your-api-keySTRING
Redundant / Tautological Comments10 hits · 14 pts
SeverityFileLineSnippetContext
LOWpython/zvec/extension/jina_function.py161 # Check if it's an OpenAI API errorCOMMENT
LOWpython/zvec/extension/sentence_transformer_function.py149 # Check if model has sparse encoding methodsCOMMENT
LOWpython/zvec/extension/openai_function.py128 # Check if it's an OpenAI API errorCOMMENT
LOW…c/extension/sentence_transformer_embedding_function.py730 # Check if it's a sparse matrix (duck typing - has toarray method)COMMENT
LOW⚡python/tests/test_reranker.py429 # Print results for manual verification (useful during development)COMMENT
LOWpython/tests/test_reranker.py941 # Print results for manual verification (useful during development)COMMENT
LOWpython/tests/test_embedding.py958 # Check if vector is normalized (L2 norm should be close to 1.0)COMMENT
LOWpython/tests/detail/distance_helper.py31 # Check if they have the same keysCOMMENT
LOWpython/tests/detail/distance_helper.py35 # Check if all values are closeCOMMENT
LOW.github/workflows/build_wheel_on_windows.yml210 # Check if version is emptyCOMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH.github/workflows/clang_tidy.yml94 # Auto-generated code is exempt from clang-tidy and must not be edited.COMMENT
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWscripts/build_android.sh8# Usage:COMMENT
LOWscripts/generate_standard_tokenizer_unicode.py5# Usage:COMMENT
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWpython/zvec/zvec.py29CODE