{"slug": "don-t-use-cosine-similarity-carelessly-we-fixed-it-this-way", "title": "Don't use cosine similarity carelessly We fixed it this way", "summary": "VectorPrism, an open-source retrieval engine from insightitsGit, claims to cut multi-vector storage costs to a single 1024-dimensional vector per chunk by multiplexing six specialized relevance subspaces plus a 16-float control header, using HNSW for stage-1 and intent-gated rescoring for stage-2. In a calibrated hard_adversarial finance pack, dense retrieval achieved only 7.1% Recall@10 and missed 13 of 14 queries, while the multi-channel approach recovered all 13 missed queries at 100% (13/13) with ~1.8 ms latency at 1000-doc scale, though the authors caution the results are not generalizable to all corpora.", "body_md": "**Positional Subspace Multiplexing (PSM) & Intent-Gated 2-Stage Retrieval Engine for High-Scale RAG.**\n\nOne contiguous\n\n1024dtensor. Six independently trained relevance subspaces. Stage-1 HNSW + Stage-2 intent-gated rescoring. Baseline vector-DB storage cost — not 6× multi-vector inflation.\n\n** Interactive demo** ·\n\n**·**\n\n[Benchmarks](/insightitsGit/VectorPrism/blob/main/BENCHMARKS.md)**·**\n\n[Pilot guide](/insightitsGit/VectorPrism/blob/main/PILOT.md)\n\n[Technical report](/insightitsGit/VectorPrism/blob/main/demos/finance_demo/TECHNICAL_REPORT.md)**Keywords:** pgvector multi-vector cost reduction, Intent-gated RAG retrieval engine, Causal retrieval for enterprise RAG, Positional subspace multiplexing vector search, Reduce hallucinations in root-cause RAG, VectorPrism, HNSW\n\n**Scope honesty:** the table below is from our calibrated `hard_adversarial`\n\nfinance pack (dense is *designed* to miss). It is **not** a claim that every public corpus shows the same Miss@10. For partner corpora use [ scripts/corpus_recovery_audit.py](/insightitsGit/VectorPrism/blob/main/scripts/corpus_recovery_audit.py) — see\n\n[.](/insightitsGit/VectorPrism/blob/main/demos/external_audit)\n\n`demos/external_audit/`\n\nDense fails on purpose **in that pack**. Multi-channel recovers those misses.\n\n| Metric | Result |\n|---|---|\n| Dense R@10 | 7.1% |\n| Dense Miss@10 | 13/14 (93%) |\n| Multi z-score recovered@10 | 13/13 (100%) |\n| RRF recovered@10 (conservative) | 10–11/13 (77–85%) |\n| Auto-graph recovered@10 | 11/13 (85%) |\n| 1000-doc scale recovered@10 | 13/13 (~1.8 ms) |\n\nFull tables, caveats, and reproduce commands → `BENCHMARKS.md`\n\nInteractive query comparison (dense vs multi) → [demo site](https://insightitsgit.github.io/VectorPrism/)\n\nRaw JSON/MD artifacts → `demos/finance_demo/results/`\n\nEnterprise RAG is stuck between two bad defaults:\n\n**Flat cosine over a single embedding**— semantically “close” neighbors that are causally wrong, taxonomically wrong, or temporally expired. Teams call them*funny neighbors*; production calls them**hallucination fuel**.** Multi-vector indexing**(one ANN index per representation) — better signal, but** 500%–1,000%**storage and query fan-out on pgvector / Qdrant bills.\n\n**VectorPrism** multiplexes **six specialized representation subspaces** plus a **16-float Control Header** into a **single 1024-dimensional contiguous buffer** per chunk:\n\n| Constraint | VectorPrism answer |\n|---|---|\n| Storage | 1× vector footprint (one `vector(1024)` / named full tensor) |\n| Stage 1 | HNSW only on the 368d dense core slice |\n| Stage 2 | In-RAM zero-copy slice scoring with intent weights |\n| Early exit | Header filters (`epistemic_truth` , `anchor_dist` , `model_version` ) before heavy math |\n| Latency target | < 15ms end-to-end search SLA (see benchmarks) |\n\nPhilosophically grounded channel design. Engineering-grounded memory contract. Production path for pgvector and Qdrant.\n\n**Keywords:** causal retrieval, incident log RAG, DevOps root-cause analysis, “why did the service fail”\n\nWhen on-call asks *“Why did Server X crash at 3 AM?”*, cosine-only RAG returns symptom-adjacent text. VectorPrism’s **Time ODE & Directional Causality** slice (`[896:1024)`\n\n) is trained with an asymmetric bilinear score (q^{\\top} M c) (`PSMRetrievalEngine.causal_score`\n\n). Intent routing up-weights the causal channel on “why / cause / reason” queries so Stage-2 rescoring prefers **cause→effect order**, not merely lexical neighbors.\n\n**Keywords:** hyperbolic embeddings RAG, taxonomy search, medical ontology retrieval, legal hierarchy search\n\nParent–child trees distort badly in Euclidean space. The **Hyperbolic Taxonomy (Porphyry)** slice (`[640:768)`\n\n) lives in a Poincaré ball (norm < 1) and is scored with Poincaré distance in Stage 2. Hierarchy intents (“category”, “parent”, “type of”, “tree”) shift `IntentClassifier`\n\nweights toward hyperbolic structure for medical, legal, and product taxonomies.\n\n**Keywords:** bitemporal retrieval, compliance RAG, healthcare audit trail, finance document expiry filter\n\nBefore Stage-2 matrix math, the **16d Control Header Manifest** (`[0:16)`\n\n) exposes O(1) metadata:\n\n- Epistemic truth score (soft by default; hard filter opt-in after ECE calibration)\n- Identity anchor distance (OOD / injection-risk gate in Stage 1)\n- Exact int64 timestamp (packed in the header for audit / future filters —\n**not** applied as a Stage-1 SQL/Qdrant predicate today) - Model version for safe re-ingest after retrains (\n**applied** as a Stage-1 filter; search defaults to the checkpoint’s`model_version`\n\n)\n\nStage 1 rejects low-truth, high-anchor-distance, or wrong-`model_version`\n\nchunks **before** rescoring.\n\n**Keywords:** multi-vector RAG cost reduction, pgvector HNSW, Qdrant named vectors, high-scale vector search\n\nInstead of six ANN indexes, VectorPrism stores **one 1024d tensor**. Stage 1 indexes only the generated **368d dense_core_slice**. Stage 2 pulls the full tensor for the top-~100 candidates and rescored slices in RAM. AI SaaS platforms keep multi-signal retrieval without multi-vector sticker shock.\n\nGround truth: `PSMTensorContract`\n\n/ `VectorPrismTensorContract`\n\nin [ tensor_contract.py](/insightitsGit/VectorPrism/blob/main/tensor_contract.py).\n\n```\n1024-d VectorPrism Tensor (float32)\n┌──────────────────────────────────────────────────────────────────────────┐\n│ [  0 ..  15]  16d   Control Header Manifest                              │\n│ [ 16 .. 383] 368d   Dense Semantic Core          (Hume / Wittgenstein)   │\n│ [384 .. 511] 128d   Relational Group Algebra     (Aristotle / Al-Khwarizmi)│\n│ [512 .. 639] 128d   Disentangled Latent Space    (Jabir)                 │\n│ [640 .. 767] 128d   Hyperbolic Taxonomy          (Porphyry)              │\n│ [768 .. 895] 128d   Identity Consistency         (Ibn Sina)              │\n│ [896 ..1023] 128d   Time ODE & Causality         (Mulla Sadra / Spinoza) │\n└──────────────────────────────────────────────────────────────────────────┘\n         ▲ Stage-1 HNSW indexes ONLY dense_core [16:384) → 368 dims\n```\n\n| Inclusive range | Code slice (`start:end` ) |\nDims | Channel | Role |\n|---|---|---|---|---|\n`[0000..0015]` |\n`HEADER` `[0:16)` |\n16 | Control Header Manifest | Bitmask, truth, anchor dist, timestamp, model version |\n`[0016..0383]` |\n`DENSE_CORE` `[16:384)` |\n368 | Dense Semantic Core | L2-normalized cosine space; Stage-1 ANN |\n`[0384..0511]` |\n`RELATIONAL` `[384:512)` |\n128 | Relational Group Algebra | Train: TransE (S+R\\approx O); serve today: L2 proximity (-|q_{\\mathrm{rel}}-c_{\\mathrm{rel}}|) (no query-time relation id yet) |\n`[0512..0639]` |\n`DISENTANGLED` `[512:640)` |\n128 | Disentangled Latent (Jabir) | VIB latent (z) |\n`[0640..0767]` |\n`HYPERBOLIC` `[640:768)` |\n128 | Hyperbolic Taxonomy (Porphyry) | Poincaré ball |\n`[0768..0895]` |\n`IDENTITY` `[768:896)` |\n128 | Identity Consistency (Ibn Sina) | Distance-to-frozen (v_0); Stage-1 gate only |\n`[0896..1023]` |\n`CAUSAL_TIME` `[896:1024)` |\n128 | Time ODE & Causality (Spinoza) | Scored as (q^{\\top} M c) |\n\n**Header sub-layout** (exact packing via `PSMTensorContract.pack_header`\n\n/ `unpack_header`\n\n):\n\n| Slot | Field | Encoding |\n|---|---|---|\n`[0]` |\nChannel bitmask | `uint32` ↔ `float32` bit reinterpret |\n`[1]` |\nEpistemic truth | `float32` in `[0, 1]` |\n`[2]` |\nIdentity anchor distance | `float32` |\n`[3:5]` |\nBitemporal timestamp | `int64` ↔ `2×float32` bit reinterpret |\n`[5]` |\nModel version | `uint32` ↔ `float32` bit reinterpret |\n`[6:16]` |\nReserved | zero-filled |\n\n```\n# From PyPI\npip install \"vectorprism[all]\"\n\n# Or from git (latest main / full adversarial packs)\ngit clone https://github.com/insightitsGit/VectorPrism.git\ncd VectorPrism\npython -m venv .venv && source .venv/bin/activate   # Windows: .venv\\Scripts\\activate\npip install -U pip\npip install -e \".[all]\"\n\nvectorprism version\nvectorprism pilot-check\npytest test_psm.py test_phases.py -q\n```\n\nThe PyPI wheel ships `schema.sql`\n\nand `data/*.example.jsonl`\n\n(enough for `pilot-check`\n\n/ `run-all-smoke`\n\n). Full adversarial finance packs stay in **git**, not on PyPI.\n\nPublish / release: [ PUBLISH.md](/insightitsGit/VectorPrism/blob/main/PUBLISH.md) · External pilot:\n\n[· Production:](/insightitsGit/VectorPrism/blob/main/PILOT.md)\n\n`PILOT.md`\n\n`PRODUCTION.md`\n\nCore deps: `torch`\n\n, `numpy`\n\n, `scipy`\n\n, `scikit-learn`\n\n. Optional extras: `encoder`\n\n, `postgres`\n\n, `qdrant`\n\n, `dev`\n\n, `all`\n\n.\n\n```\ndocker compose up -d db\ndocker compose run --rm test\ndocker compose run --rm finance-pg\ndocker compose run --rm production-smoke\n```\n\n- DB:\n`localhost:5433`\n\n· DSN`postgresql://vectorprism:vectorprism@localhost:5433/vectorprism`\n\n- Results:\n`demos/finance_demo/results/`\n\n(`PRODUCTION_RESULTS.md`\n\n, eval, live search JSON) - Full checklist:\n· Docker notes:`PRODUCTION.md`\n\n`DOCKER.md`\n\nEncode raw text with a frozen 768d encoder → `MultiTaskProjectionAdapter`\n\n→ contiguous **1024d** tensor (matches `ingestion_adapter.py`\n\n+ `ingest_pipeline.py`\n\n).\n\n``` python\nimport time\nimport torch\nimport numpy as np\n\nfrom base_encoder import SentenceTransformerEncoder\nfrom ingestion_adapter import MultiTaskProjectionAdapter, VectorPrismProjectionAdapter\nfrom tensor_contract import PSMTensorContract as C, VectorPrismTensorContract\nfrom losses import anchor_distance_score\n\n# Frozen base encoder (768d) + trainable 6-head adapter\nencoder = SentenceTransformerEncoder(\"sentence-transformers/all-mpnet-base-v2\")\nadapter = MultiTaskProjectionAdapter(base_dim=768)  # alias: VectorPrismProjectionAdapter\nadapter.eval()\n\ntexts = [\"Cache eviction storm preceded the 3 AM outage on Server X.\"]\nbase = encoder.encode(texts)  # (1, 768)\n\nheader = C.pack_header(\n    bitmask=C.default_channel_bitmask({\"dense\": True, \"identity\": True, \"causal\": True}),\n    epistemic_truth=1.0,\n    anchor_distance=0.0,\n    timestamp=int(time.time()),\n    model_version=1,\n)\nheader_t = torch.from_numpy(header).unsqueeze(0)  # (1, 16)\n\nwith torch.no_grad():\n    tensor_1024d, raw = adapter(base, header_t)\n    # Fill identity distance into header slot [2]\n    dist = anchor_distance_score(raw[\"identity\"], adapter.identity_anchor_v0)\n    out = tensor_1024d.cpu().numpy().astype(np.float32)\n    out[0, C.HDR_ANCHOR.start] = float(dist[0].item())\n\nassert out.shape == (1, 1024)\nassert out[0, C.DENSE_CORE.start:C.DENSE_CORE.end].shape == (368,)\nmeta = C.unpack_header(out[0])\nprint(meta)  # bitmask, epistemic_truth, anchor_distance, timestamp, model_version\n```\n\nProduction shorthand (upsert path):\n\n``` python\nfrom checkpointing import load_checkpoint\nfrom db_client import PgVectorClient  # or QdrantVectorClient\nfrom ingest_pipeline import VectorPrismIngestPipeline, IngestDocument\nfrom base_encoder import SentenceTransformerEncoder\n\nckpt = load_checkpoint(\"checkpoints/vectorprism.pt\")\nencoder = SentenceTransformerEncoder(\"sentence-transformers/all-mpnet-base-v2\")\ndb = PgVectorClient(\"postgresql://user:pass@localhost:5432/vectorprism\")\n\npipe = VectorPrismIngestPipeline(\n    encoder=encoder,\n    adapter=ckpt[\"adapter\"],\n    db=db,\n    model_version=ckpt[\"model_version\"],\n    enabled_channels=ckpt.get(\"enabled_channels\"),\n)\npipe.upsert_documents([\n    IngestDocument(document_id=\"inc-42\", chunk_text=\"Cache eviction preceded the outage.\"),\n])\n```\n\nIntent classification → HNSW on dense core → zero-copy slice rescoring (`PSMRetrievalEngine.search`\n\n).\n\n``` python\nfrom checkpointing import load_checkpoint\nfrom base_encoder import SentenceTransformerEncoder\nfrom db_client import PgVectorClient\nfrom ingest_pipeline import VectorPrismIngestPipeline\nfrom retrieval_engine import PSMRetrievalEngine, IntentClassifier, VectorPrismRetrievalEngine\nfrom tensor_contract import PSMTensorContract as C\n\nckpt = load_checkpoint(\"checkpoints/vectorprism.pt\")\nencoder = SentenceTransformerEncoder(\"sentence-transformers/all-mpnet-base-v2\")\ndb = PgVectorClient(\"postgresql://user:pass@localhost:5432/vectorprism\")\n\npipe = VectorPrismIngestPipeline(encoder, ckpt[\"adapter\"], db, model_version=ckpt[\"model_version\"])\nengine = PSMRetrievalEngine(  # alias: VectorPrismRetrievalEngine\n    db_client=db,\n    causal_matrix=ckpt[\"causal_matrix\"],  # learned M for qᵀ M c\n    hard_truth_filter=False,              # keep soft until ECE-calibrated\n)\n\nquery_text = \"Why did Server X crash at 3 AM?\"\nquery_1024d = pipe.encode_query(query_text)\n\n# Optional: inspect intent weights (dense, relational, disentangled, hyperbolic, causal)\nw_intent, filters = engine.classifier.classify(query_text)\nprint(\"w_intent=\", w_intent, \"filters=\", filters)\n\nhits = engine.search(query_1024d, query_text, top_k=5)\nfor h in hits:\n    print(h[\"document_id\"], h[\"final_score\"], h.get(\"chunk_text\", \"\")[:120])\n\n# Stage-2 scoring uses exact slices, e.g. causal:\n#   q_c = query_1024d[C.CAUSAL_TIME.start:C.CAUSAL_TIME.end]\n#   s_causal = engine.causal_score(q_c, candidate_causal_matrix)\n```\n\nCLI equivalents:\n\n```\npython train.py --channel dense --data data/dense_pairs.example.jsonl \\\n  --encoder sentence-transformers/all-mpnet-base-v2 --out checkpoints/vectorprism.pt\n\npython vectorprism.py ingest --checkpoint checkpoints/vectorprism.pt \\\n  --documents data/documents.example.jsonl --backend pgvector --dsn \"$VECTORPRISM_PG_DSN\"\n\npython vectorprism.py search --checkpoint checkpoints/vectorprism.pt \\\n  --query \"Why did Server X crash at 3 AM?\" --backend pgvector --dsn \"$VECTORPRISM_PG_DSN\"\n```\n\nExact DDL from [ schema.sql](/insightitsGit/VectorPrism/blob/main/schema.sql):\n\n```\nCREATE EXTENSION IF NOT EXISTS vector;\n\nCREATE TABLE IF NOT EXISTS psm_document_embeddings (\n    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n    document_id VARCHAR(255) NOT NULL UNIQUE,\n    chunk_text TEXT NOT NULL,\n\n    -- Full 1024-Dimensional Composite Tensor Payload\n    tensor_1024d vector(1024) NOT NULL,\n\n    -- Generated Column for Stage 1 Dense Core Slice [16..383] (368d)\n    -- pgvector subvector() is 1-indexed: (17, 368) == zero-indexed [16:384)\n    dense_core_slice vector(368) GENERATED ALWAYS AS (\n        subvector(tensor_1024d, 17, 368)\n    ) STORED,\n\n    epistemic_truth FLOAT NOT NULL DEFAULT 1.0,\n    anchor_dist FLOAT NOT NULL DEFAULT 0.0,\n    valid_timestamp BIGINT NOT NULL,\n    model_version INTEGER NOT NULL DEFAULT 0,\n\n    created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP\n);\n\nCREATE INDEX IF NOT EXISTS idx_psm_dense_core_hnsw\nON psm_document_embeddings\nUSING hnsw (dense_core_slice vector_cosine_ops)\nWITH (m = 16, ef_construction = 64);\n\nCREATE INDEX IF NOT EXISTS idx_psm_epistemic_truth ON psm_document_embeddings (epistemic_truth);\nCREATE INDEX IF NOT EXISTS idx_psm_anchor_dist ON psm_document_embeddings (anchor_dist);\nCREATE INDEX IF NOT EXISTS idx_psm_model_version ON psm_document_embeddings (model_version);\nCREATE INDEX IF NOT EXISTS idx_psm_document_id ON psm_document_embeddings (document_id);\n```\n\nApply:\n\n```\npsql \"$VECTORPRISM_PG_DSN\" -f schema.sql\n```\n\nMatches `QdrantVectorClient`\n\nin [ db_client.py](/insightitsGit/VectorPrism/blob/main/db_client.py):\n\n``` python\nfrom qdrant_client import QdrantClient\nfrom qdrant_client.http import models as qmodels\n\nclient = QdrantClient(url=\"http://localhost:6333\")\ncollection = \"psm_document_embeddings\"\n\nif not client.collection_exists(collection):\n    client.create_collection(\n        collection_name=collection,\n        vectors_config={\n            # Stage 1 — HNSW on dense core only\n            \"dense_core_slice\": qmodels.VectorParams(\n                size=368,\n                distance=qmodels.Distance.COSINE,\n                hnsw_config=qmodels.HnswConfigDiff(m=16, ef_construct=128),\n            ),\n            # Stage 2 — full 1024d tensor (flat / m=0, not a second ANN tax)\n            \"full_tensor\": qmodels.VectorParams(\n                size=1024,\n                distance=qmodels.Distance.COSINE,\n                hnsw_config=qmodels.HnswConfigDiff(m=0),\n            ),\n        },\n    )\n```\n\nPayload fields used for Stage-1 filters: `epistemic_truth`\n\n, `anchor_dist`\n\n, `model_version`\n\n. Payload also stores `valid_timestamp`\n\n, `chunk_text`\n\n, and `document_id`\n\n(timestamp is header metadata today; not a Stage-1 predicate).\n\nTargets enforced by the design and `benchmark_harness.py`\n\n/ `live_benchmark.py`\n\nbudgets:\n\n| Stage | Operation | Budget |\n|---|---|---|\n| Header | Bitmask / header unpack `[0:16)` via `PSMTensorContract.unpack_header` |\n< 0.05 ms |\n| Stage 1 | HNSW coarse search on `dense_core_slice` (368d) + header filters → top 100 |\n< 10 ms |\n| Stage 2 | RAM zero-copy slice rescoring (z-score fuse × `w_intent` ) |\n< 2 ms |\nE2E |\nEncode path excluded in pure Stage-2 harness; search SLA |\n< 15 ms |\n\n```\n# Stage-2 focused latency (synthetic corpus, real PSMRetrievalEngine.search)\npython benchmark_harness.py\n\n# End-to-end against a live backend (ingest + encode_query + search)\npython vectorprism.py live-benchmark \\\n  --checkpoint checkpoints/vectorprism.pt \\\n  --documents data/documents.example.jsonl \\\n  --backend memory --n-trials 20 --p95-budget-ms 15\n```\n\n**Architecture path (unchanged pillars):**\n\n```\nText ─► Frozen 768d Encoder ─► MultiTaskProjectionAdapter ─► 1024d tensor\n                              │\n                              ▼\n              pgvector / Qdrant (dense HNSW + full tensor)\n                              │\n         IntentClassifier ─► w_intent + filters\n                              │\n         Stage 1: HNSW(dense_core_slice) + truth/anchor filters\n                              │\n         Stage 2: dense / rel / dis / hyp / causal scores → top-k\n                  (Identity is Stage-1 gate only — not double-counted)\n```\n\nChannels are **earned**, not assumed. One channel at a time:\n\n```\npython train.py --channel dense --data your_pairs.jsonl \\\n  --encoder sentence-transformers/all-mpnet-base-v2 --out checkpoints/vectorprism.pt\n\npython vectorprism.py eval --checkpoint checkpoints/vectorprism.pt \\\n  --documents your_docs.jsonl --eval your_eval.jsonl \\\n  --encoder sentence-transformers/all-mpnet-base-v2\n\n# Only after dense DoD: add causal / relational / hyperbolic / ...\npython train.py --channel causal --data your_causal.jsonl \\\n  --init checkpoints/vectorprism.pt --out checkpoints/vectorprism.pt\n```\n\nSee [ IMPLEMENTATION_SPEC.md](/insightitsGit/VectorPrism/blob/main/IMPLEMENTATION_SPEC.md) for phased Definitions of Done and the gap matrix.\n\nBuilding a regulated RAG stack, a multi-tenant AI SaaS retrieval plane, or a private compliance-aware knowledge system?\n\nInsight ITS works with enterprise architects on:\n\n- Custom multi-task adapter fine-tuning for your ontology / incident / audit corpora\n- Private compliance connectors (bitemporal filters, calibrated epistemic truth, HITL review)\n- Managed control planes for versioned re-ingest across pgvector & Qdrant fleets\n\n**Talk to us**\n\n- Email:\n`insightits.info@gmail.com`\n\n- Soft CTA: email subject\n**RECOVER**→`insightits.info@gmail.com`\n\n- GitHub Discussions:\n[insightitsGit/VectorPrism](https://github.com/insightitsGit/VectorPrism/discussions) - Community:\n[GitHub Discussions](https://github.com/insightitsGit/VectorPrism/discussions)(no public Discord invite is published)\n\nApache License 2.0 — see [ LICENSE](/insightitsGit/VectorPrism/blob/main/LICENSE) (or repository license metadata).\n\nIf VectorPrism informs your research or production retrieval stack:\n\n```\n@software{vectorprism2026,\n  title  = {VectorPrism: Positional Subspace Multiplexing for Intent-Gated Retrieval},\n  author = {Amin Parva},\n  year   = {2026},\n  url    = {https://github.com/insightitsGit/VectorPrism}\n}\n```\n\n**VectorPrism** — six signals, one tensor, baseline storage cost, intent-gated speed.\n\n- Author:\n**Amin Parva**([insightits.info@gmail.com](mailto:insightits.info@gmail.com)) - Company:\n[https://www.insightits.com](https://www.insightits.com) - GitHub:\n[https://github.com/insightitsGit/VectorPrism](https://github.com/insightitsGit/VectorPrism) - PyPI:\n[https://pypi.org/project/vectorprism/](https://pypi.org/project/vectorprism/) - Product page:\n[https://www.insightits.com/products/vectorprism.html](https://www.insightits.com/products/vectorprism.html)", "url": "https://wpnews.pro/news/don-t-use-cosine-similarity-carelessly-we-fixed-it-this-way", "canonical_source": "https://github.com/insightitsGit/VectorPrism", "published_at": "2026-08-17 18:25:14+00:00", "updated_at": "2026-08-17 18:41:30.772773+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "ai-research", "ai-tools", "ai-infrastructure"], "entities": ["VectorPrism", "insightitsGit", "HNSW", "pgvector", "Qdrant"], "alternates": {"html": "https://wpnews.pro/news/don-t-use-cosine-similarity-carelessly-we-fixed-it-this-way", "markdown": "https://wpnews.pro/news/don-t-use-cosine-similarity-carelessly-we-fixed-it-this-way.md", "text": "https://wpnews.pro/news/don-t-use-cosine-similarity-carelessly-we-fixed-it-this-way.txt", "jsonld": "https://wpnews.pro/news/don-t-use-cosine-similarity-carelessly-we-fixed-it-this-way.jsonld"}}