Repository Analysis

alibaba/zvec

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

12.2 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of alibaba/zvec, a C++ project with 14,877 GitHub stars. SynthScan v2.0 examined 177,571 lines of code across 633 source files, recording 1675 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 12.2 places this repository in the Low 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).

12.2
Adjusted Score
12.2
Raw Score
100%
Time Factor
2026-07-14
Last Push
14.9K
Stars
C++
Language
177.6K
Lines of Code
633
Files
1.7K
Pattern Hits
2026-07-14
Scan Date
0.08
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 48MEDIUM 184LOW 1443

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 1675 distinct pattern matches across 16 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.

Over-Commented Block663 hits · 656 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt181 COMPONENT python)COMMENT
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/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_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
LOWpython/tests/test_reranker.py1# Copyright 2025-present the zvec projectCOMMENT
LOWpython/tests/test_schema.py1# Copyright 2025-present the zvec projectCOMMENT
603 more matches not shown…
Decorative Section Separators144 hits · 495 pts
SeverityFileLineSnippetContext
MEDIUMpython/zvec/__init__.py51# ==============================COMMENT
MEDIUMpython/zvec/__init__.py53# ==============================COMMENT
MEDIUMpython/zvec/__init__.py144# ==============================COMMENT
MEDIUMpython/zvec/__init__.py146# ==============================COMMENT
MEDIUMpython/zvec/__init__.py226# ==============================COMMENT
MEDIUMpython/zvec/__init__.py228# ==============================COMMENT
MEDIUMpython/tests/test_query_executor.py42# ----------------------------COMMENT
MEDIUMpython/tests/test_query_executor.py44# ----------------------------COMMENT
MEDIUMpython/tests/test_query_executor.py56# ----------------------------COMMENT
MEDIUMpython/tests/test_query_executor.py58# ----------------------------COMMENT
MEDIUMpython/tests/test_typing.py27# ----------------------------COMMENT
MEDIUMpython/tests/test_typing.py29# ----------------------------COMMENT
MEDIUMpython/tests/test_typing.py124# ----------------------------COMMENT
MEDIUMpython/tests/test_typing.py126# ----------------------------COMMENT
MEDIUMpython/tests/test_vamana.py67# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/tests/test_vamana.py69# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/tests/test_vamana.py139# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/tests/test_vamana.py141# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/tests/test_vamana.py352# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/tests/test_vamana.py354# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/tests/test_collection.py192# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py194# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py200# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py202# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py309# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py311# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py413# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py415# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py422# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py424# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py583# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py585# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py750# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py752# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py803# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py805# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py870# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py872# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py216# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py218# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py455# ----------------------------COMMENT
MEDIUMpython/tests/test_collection.py457# ----------------------------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
MEDIUMpython/tests/test_util.py22# ----------------------------COMMENT
MEDIUMpython/tests/test_util.py24# ----------------------------COMMENT
MEDIUMpython/tests/test_reranker.py35# ----------------------------COMMENT
MEDIUMpython/tests/test_reranker.py37# ----------------------------COMMENT
MEDIUMpython/tests/test_reranker.py146# ----------------------------COMMENT
MEDIUMpython/tests/test_reranker.py148# ----------------------------COMMENT
MEDIUMpython/tests/test_reranker.py439# ----------------------------COMMENT
MEDIUMpython/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
84 more matches not shown…
Hyper-Verbose Identifiers375 hits · 328 pts
SeverityFileLineSnippetContext
LOWpython/zvec/model/collection.py46def _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.py45def hnsw_rabitq_collection_schema():CODE
LOWpython/tests/test_collection_hnsw_rabitq.py130def collection_with_single_doc(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py148def collection_with_multiple_docs(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py185 def test_vector_schema_validation(self, hnsw_rabitq_collection: Collection):CODE
LOWpython/tests/test_collection_hnsw_rabitq.py226 def test_insert_multiple_docs(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py273 def test_fetch_nonexistent_doc(self, collection_with_single_doc: Collection):CODE
LOWpython/tests/test_collection_hnsw_rabitq.py317 def test_query_with_different_ef_values(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py379 def test_query_with_output_fields(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py399 def test_query_with_include_vector(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py486 def test_delete_multiple_docs(CODE
LOWpython/tests/test_collection_hnsw_rabitq.py504 def test_optimize_close_reopen_and_query(CODE
LOWpython/tests/test_query_executor.py155 def test_isinstance_compatibility(self):CODE
LOWpython/tests/test_query_executor.py195 def test_properties_with_weighted_reranker(self):CODE
LOWpython/tests/test_query_executor.py210 def test_properties_with_callback_reranker(self):CODE
LOWpython/tests/test_query_executor.py230 def test_do_build_without_queries(self):CODE
LOWpython/tests/test_query_executor.py241 def test_do_build_query_wo_vector(self):CODE
LOWpython/tests/test_query_executor.py252 def test_do_merge_rerank_results_single_without_reranker(self):CODE
LOWpython/tests/test_query_executor.py262 def test_do_merge_rerank_results_empty(self):CODE
LOWpython/tests/test_query_executor.py271 def test_do_merge_rerank_results_with_reranker(self):CODE
LOWpython/tests/test_query_executor.py288 def test_execute_python_pipeline(self):CODE
LOWpython/tests/test_query_executor.py304 def test_build_search_query_by_missing_id_raises_value_error(self):CODE
LOWpython/tests/test_query_executor.py317 def test_build_search_query_validates_query(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.py59def test_metric_type_has_member(member):CODE
LOWpython/tests/test_typing.py90def test_data_type_has_member(member):CODE
LOWpython/tests/test_typing.py95def test_index_type_has_member(member):CODE
LOWpython/tests/test_typing.py100def test_quantize_type_has_member(member):CODE
LOWpython/tests/test_typing.py120def test_status_code_has_member(member):CODE
LOWpython/tests/test_vamana.py180 def test_to_dict_includes_all_fields(self):CODE
LOWpython/tests/test_vamana.py202 def test_repr_contains_key_fields(self):CODE
LOWpython/tests/test_vamana.py299 def test_repr_contains_key_fields(self):CODE
LOWpython/tests/test_vamana.py344 def test_index_type_enum_member(self):CODE
LOWpython/tests/test_vamana.py400 def test_insert_and_query_self_recall(CODE
LOWpython/tests/test_vamana.py432 def test_query_param_ef_search_affects_only_quality(CODE
LOWpython/tests/test_collection.py301 def test_create_index_field_is_not_exist(self, test_collection: Collection):CODE
LOWpython/tests/test_collection.py588 def test_empty_collection_update(CODE
LOWpython/tests/test_collection.py755 def test_empty_collection_upsert(self, test_collection: Collection, single_doc):CODE
LOWpython/tests/test_collection.py764 def test_empty_collection_upsert_batch(CODE
LOWpython/tests/test_collection.py808 def test_empty_collection_delete(self, test_collection: Collection, single_doc):CODE
LOWpython/tests/test_collection.py813 def test_empty_collection_delete_batch(CODE
315 more matches not shown…
Unused Imports267 hits · 215 pts
SeverityFileLineSnippetContext
LOWtools/core/convert_cohere_parquet.py1CODE
LOWpython/zvec/__init__.py15CODE
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__.py70CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py73CODE
LOWpython/zvec/__init__.py93CODE
LOWpython/zvec/__init__.py94CODE
LOWpython/zvec/__init__.py97CODE
LOWpython/zvec/__init__.py98CODE
LOWpython/zvec/__init__.py98CODE
LOWpython/zvec/__init__.py98CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py102CODE
LOWpython/zvec/__init__.py124CODE
LOWpython/zvec/__init__.py124CODE
LOWpython/zvec/__init__.py124CODE
LOWpython/zvec/__init__.py127CODE
LOWpython/zvec/__init__.py127CODE
LOWpython/zvec/__init__.py127CODE
LOWpython/zvec/__init__.py127CODE
LOWpython/zvec/__init__.py130CODE
207 more matches not shown…
Docstring Block Structure34 hits · 170 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.py191Create 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.py228Open 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.py394Perform vector similarity search with optional filtering and re-ranking. At least one `Query` must be provided STRING
HIGHpython/zvec/model/collection.py458Perform group-by vector search. Groups results by a scalar field value, returning the top-k documents wSTRING
HIGHpython/zvec/model/schema/collection_schema.py29Defines 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
LOWpython/zvec/__init__.py46except Exception:CODE
LOWpython/zvec/__init__.py238except 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.py211 except Exception as e:CODE
MEDIUMpython/zvec/model/schema/collection_schema.py203def __repr__(self) -> str:CODE
LOWpython/zvec/model/schema/field_schema.py173 except Exception as e:CODE
LOWpython/zvec/model/schema/field_schema.py298 except Exception as e:CODE
MEDIUMpython/zvec/model/schema/field_schema.py169def __repr__(self) -> str:CODE
MEDIUMpython/zvec/model/schema/field_schema.py294def __repr__(self) -> str:CODE
LOWpython/tests/test_collection_fts.py75 except Exception as e:CODE
LOWpython/tests/test_collection_hnsw_rabitq.py125 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.py151 except Exception as e:CODE
LOWpython/tests/test_collection_fts_vector_hybrid.py82 except Exception as e:CODE
LOWpython/tests/test_collection_diskann.py154 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.py410def create_collection_thread(thread_id):CODE
MEDIUMpython/tests/detail/test_collection_create_and_open.py583def open_collection_thread(thread_id):CODE
LOWpython/tests/detail/test_collection_create_and_open.py419 except Exception as e:CODE
LOWpython/tests/detail/test_collection_create_and_open.py593 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
LOWpython/tests/detail/test_collection_concurrency.py248 except Exception as e:CODE
16 more matches not shown…
Self-Referential Comments18 hits · 52 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/detail/test_collection_create_and_open.py530 # Create a temporary directory and path for the collectionCOMMENT
MEDIUMpython/tests/detail/test_collection_create_and_open.py562 # Create the collection firstCOMMENT
MEDIUM.github/workflows/_build_wheel_job.yml96 # 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 Indicators15 hits · 26 pts
SeverityFileLineSnippetContext
LOWpython/tests/detail/test_collection_ddl.py630 # Step 2: Create indexCOMMENT
LOWpython/tests/detail/test_collection_ddl.py638 # Step 3: Insert docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py699 # Step 6: Fetch docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py707 # Step 7: Query docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py711 # Step 8: Drop indexCOMMENT
LOWpython/tests/detail/test_collection_ddl.py714 # Step 9: Insert docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py759 # Step 12: Fetch docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py767 # Step 13: Query docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py771 # Step 14: FlushCOMMENT
LOWpython/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
Structural Annotation Overuse15 hits · 26 pts
SeverityFileLineSnippetContext
LOWpython/tests/detail/test_collection_ddl.py630 # Step 2: Create indexCOMMENT
LOWpython/tests/detail/test_collection_ddl.py638 # Step 3: Insert docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py699 # Step 6: Fetch docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py707 # Step 7: Query docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py711 # Step 8: Drop indexCOMMENT
LOWpython/tests/detail/test_collection_ddl.py714 # Step 9: Insert docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py759 # Step 12: Fetch docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py767 # Step 13: Query docCOMMENT
LOWpython/tests/detail/test_collection_ddl.py771 # Step 14: FlushCOMMENT
LOWpython/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
Deep Nesting24 hits · 19 pts
SeverityFileLineSnippetContext
LOW…c/extension/sentence_transformer_embedding_function.py760CODE
LOWpython/zvec/extension/bm25_embedding_function.py287CODE
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.py111CODE
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.py425CODE
LOWpython/tests/detail/test_collection_dml.py480CODE
LOWpython/tests/detail/fixture_helper.py145CODE
LOWpython/tests/detail/fixture_helper.py364CODE
LOWpython/tests/detail/distance_helper.py295CODE
LOWpython/tests/detail/distance_helper.py340CODE
Modern Structural Boilerplate17 hits · 18 pts
SeverityFileLineSnippetContext
LOWpython/zvec/__init__.py147__all__ = [CODE
LOWpython/zvec/zvec.py24__all__ = ["create_and_open", "init", "open"]CODE
LOWpython/zvec/extension/__init__.py36__all__ = [CODE
LOWpython/zvec/typing/__init__.py25__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.py43__all__ = ["Collection"]CODE
LOWpython/zvec/model/param/query.py23__all__ = ["Fts", "Query", "VectorQuery"]CODE
LOWpython/zvec/model/param/__init__.py39__all__ = [CODE
LOWpython/zvec/model/schema/collection_schema.py23__all__ = [CODE
LOWpython/zvec/model/schema/__init__.py21__all__ = ["CollectionSchema", "CollectionStats", "FieldSchema", "VectorSchema"]CODE
LOWpython/zvec/model/schema/field_schema.py30__all__ = [CODE
LOWpython/zvec/executor/__init__.py21__all__ = [CODE
LOWpython/zvec/executor/query_executor.py30__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
HIGHpython/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
LOWpython/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
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