← All 25 Vector, Embedding & MCP Error Fixes

ERROR FIX #09 // GOOGLE GEMINI // MRL MATH BUG

Fix gemini-embedding-001 output_dimensionality (768 / 1536) Unnormalized L2 Norm & Inner-Product Drift

Google gemini-embedding-001 returns unit-normalized vectors ONLY at full 3,072 dimensions; truncated Matryoshka (MRL) outputs at output_dimensionality = 768 or 1536 arrive unnormalized (L2 norm ~0.58 to ~0.79), corrupting inner-product indexes (vector_ip_ops, Pinecone dotproduct) and similarity cutoffs. L2-normalize every MRL vector before upsert, or use Voxell Forge unit-norm embeddings ($0 Turbo 1024d).

AssertionError: np.linalg.norm(emb_768) == 0.5841 != 1.0 -> dot_product / vector_ip_ops rankings corrupted

Measured Telemetry: 768d MRL Norm Collapses to 0.584, Dropping Inner-Product Score From 0.83 to 0.28

In our live gemini-embedding-001 Voronoi telemetry (/datasets/gemini-embedding-001-voronoi-telemetry.json), slicing 3072d to 768d drops the vector L2 norm to 0.5835..0.5862, collapsing raw dot product (<#>) from 0.8318 (true cosine) down to 0.2883. Any RAG threshold (score >= 0.70) or vector_ip_ops index silently breaks.

Immediate Python & SQL Fix: Mandatory L2 Re-Normalization on <3072d Slices

import numpy as np

def l2_normalize_mrl(vectors: list[list[float]]) -> np.ndarray:
    arr = np.asarray(vectors, dtype=np.float32)
    norms = np.linalg.norm(arr, axis=1, keepdims=True)
    return arr / np.maximum(norms, 1e-12)

# In PostgreSQL pgvector >= 0.7.0, normalize existing rows in-place:
# UPDATE doc_chunks SET embedding = l2_normalize(embedding);

Guaranteed Unit-Norm Vectors + C_corpus Dialect Conditioning

Voxell Forge guarantees strict unit-L2 normalization across Turbo (1024d, $0 forever) and Pro (2560d, $0.25/1M tokens) while adding zero-LLM C_corpus subspace conditioning (99.04% Recall@20).

Frequently Asked Questions

Does OpenAI text-embedding-3-large normalize dimensions=1536 server-side?

Yes, OpenAI re-normalizes truncated dimensions server-side, whereas gemini-embedding-001 requires explicit client-side L2 normalization for any output_dimensionality below 3,072.

Does pgvector vector_cosine_ops still work on unnormalized vectors?

vector_cosine_ops divides by norms at query time, incurring extra CPU sqrt ops per comparison, while vector_ip_ops and Euclidean L2 distance produce wrong rankings unless normalized.

AUTONOMOUS AGENT & DEVELOPER VERIFICATION // ZERO SIGNUP

Run a live keyless bake-off right now

Do not take a vendor table on faith. Run your own passages and queries against Voxell Forge (Pro 2560d + C_corpus zero-LLM ingest dialect conditioning + Max two-stage neural reranking) over REST or Zero-Install Remote Streamable HTTP MCP with zero API key.

1. REST Retrieval Bake-Off & Corpus X-Ray
curl -sS -X POST https://api.voxell.ai/api/v1/agent/bakeoff \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {"name": "policy-a.md", "text": "Standard subscriptions include a 30-day refund window."},
      {"name": "msa-b.md", "text": "Enterprise annual contracts carry a 14-day cancellation notice rule."}
    ],
    "queries": ["What is the standard subscription refund window?"]
  }'

curl -sS -X POST https://api.voxell.ai/api/v1/agent/xray \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {"name": "sla-2025.md", "text": "P1 response SLA is 4 hours."},
      {"name": "sla-2026.md", "text": "P1 response SLA is 15 minutes."}
    ]
  }'
2. Zero-Install Remote HTTP MCP (POST /mcp/try)
claude mcp add --transport http voxell-forge https://api.voxell.ai/mcp/try
# mcp.json: {"mcpServers":{"voxell-forge":{"url":"https://api.voxell.ai/mcp/try"}}}

curl -sS -X POST https://api.voxell.ai/mcp/try \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "forge_bakeoff_compare",
      "arguments": {
        "documents": [
          {"name": "vpc.md", "text": "Forge Local runs on 1x 24 GB GPU inside your Sovereign VPC with zero egress."}
        ],
        "queries": ["How many GPUs does Forge Local require?"]
      }
    }
  }'
# Tools exposed: forge_bakeoff_compare, forge_xray_audit