惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
B
Blog RSS Feed
罗磊的独立博客
V
V2EX
V
Visual Studio Blog
博客园 - 叶小钗
W
WeLiveSecurity
小众软件
小众软件
K
Kaspersky official blog
美团技术团队
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
Martin Fowler
Martin Fowler
Recorded Future
Recorded Future
Project Zero
Project Zero
Hugging Face - Blog
Hugging Face - Blog
Engineering at Meta
Engineering at Meta
Security Latest
Security Latest
Microsoft Azure Blog
Microsoft Azure Blog
V
Vulnerabilities – Threatpost
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
Help Net Security
Help Net Security
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Forbes - Security
Forbes - Security
M
MIT News - Artificial intelligence
H
Hacker News: Front Page
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
Spread Privacy
Spread Privacy
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Google Online Security Blog
Google Online Security Blog
PCI Perspectives
PCI Perspectives
The Last Watchdog
The Last Watchdog
AI
AI
N
News | PayPal Newsroom
D
DataBreaches.Net
Cloudbric
Cloudbric
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Vector Databases Explained: What They Don’t Tell You
Vektor Memor · 2026-05-07 · via DEV Community

Everyone working in AI reaches a moment where they search a document and get back something that looks right but means nothing — or searches for a concept and gets back noise. That moment is when they discover vector databases. This guide covers everything: the math, the architecture, the algorithms, the top tools, and — most importantly — what vector search alone cannot do for an AI agent that needs to remember.

What is a vector? Embeddings from first principles
A vector is just a list of numbers. [0.12, -0.87, 0.44, ...]. What makes vectors powerful for AI is what the numbers represent: the meaning of a piece of content, encoded by a neural network into a point in high-dimensional space.

When an embedding model (like OpenAI’s text-embedding-3-large, Cohere's embed-v3, or a local model like nomic-embed-text) processes a sentence, it outputs a vector of typically 768 to 3072 dimensions. Every dimension captures some latent feature of the content. You don't choose what the dimensions mean - the model learns them during training.

The key property: semantically similar content ends up close together in this space. “The capital of France” and “Paris” produce vectors that are close. “My favourite sandwich” and “Paris” produce vectors that are far apart. Distance in vector space ≈ conceptual distance.

embedding example — node.js

// Every piece of content becomes a point in space const embedding = await openai.embeddings.create({ model: "text-embedding-3-large", input: "What is a vector database?" }); // Returns ~3072 numbers: the meaning of that sentence const vector = embedding.data[0].embedding; // [0.0023, -0.0187, 0.0441, ... 3072 values]

The distance between two vectors is typically measured with cosine similarity (angle between vectors), Euclidean distance (straight-line distance), or dot product (magnitude-weighted angle). Cosine similarity is the most common for text because it ignores vector magnitude and focuses purely on direction — i.e., conceptual alignment.

Typical vector dimensions

ANN search latency at scale

Vectors in production deployments

How vector databases work: ingestion, indexing, retrieval
A vector database has two workflows: ingestion (turning content into stored vectors) and retrieval (finding the most similar vectors to a query). Here’s how each works.

Ingestion pipeline
Step 1 — Embed. Your content (text, images, audio, code) is passed through an embedding model. The output is a dense numerical vector. Each piece of content produces one vector (or, if chunked, several).

Step 2 — Store. The vector is stored alongside its metadata: IDs, timestamps, source, category, or any structured fields you want to filter on later. Most vector databases store vectors and metadata separately in optimised structures.

Step 3 — Index. Raw storage is not enough for fast retrieval. The database builds a vector index that organises vectors so nearest-neighbour search can skip brute-force comparisons. More on this in the next section.

Retrieval pipeline
Step 1 — Embed the query. The user’s query is embedded with the same model used at ingestion time. This is critical — mismatched embedding models produce meaningless distance comparisons.

Step 2 — ANN search. The query vector is compared against stored vectors using an Approximate Nearest Neighbour (ANN) algorithm. ANN trades a small amount of accuracy for enormous speed gains — returning the top-k most similar vectors in milliseconds rather than seconds.

Step 3 — Metadata filtering. If you passed filters (e.g., “only documents from this user” or “created after 2025”), the database applies them. Some systems pre-filter (narrow the candidate set before ANN), some post-filter (filter ANN results). Hybrid approaches are becoming standard.

Step 4 — Return ranked results. The top-k results, ranked by similarity score, are returned. Your application decides what to do with them: feed them to an LLM, display them to a user, or use them to trigger further actions.

⚙ How RAG uses vector databases

Retrieval-Augmented Generation (RAG) is the most common pattern: embed all your documents at ingestion time, then at query time embed the user’s question, retrieve the top-k most relevant chunks, and pass them to an LLM as context. The LLM generates its answer grounded in retrieved content rather than hallucinating from training data alone.

Indexing algorithms: HNSW, IVF, PQ, LSH
The choice of indexing algorithm determines speed, accuracy, and memory usage. Here are the four you’ll encounter most:

HNSW — Hierarchical Navigable Small-World
The dominant algorithm in production vector databases today. HNSW builds a multi-layer graph where each vector is connected to its approximate nearest neighbours. Search starts at the top (sparse) layer and progressively zooms in to the bottom (dense) layer. This gives sub-linear search time — even with 100M vectors, an HNSW query typically completes in single-digit milliseconds.

Best for: High-throughput, low-latency production search. Used by Qdrant, Weaviate, pgvector, and Milvus.

IVF — Inverted File Index
IVF clusters the vector space into Voronoi cells (using k-means). At query time, only the nearest clusters are searched, skipping most of the index. IVF is memory-efficient and highly parallelisable, making it the backbone of large-scale FAISS deployments.

Best for: Very large datasets (billions of vectors) where memory matters more than per-query latency.

PQ — Product Quantisation
PQ compresses vectors by splitting them into sub-vectors and quantising each. A 3072-dimensional float32 vector (12KB) can be compressed to ~96 bytes — a 125× reduction. The trade-off is a small accuracy loss. PQ is almost always combined with IVF (IVF-PQ) for large-scale deployments that need both speed and memory efficiency.

Best for: Deployments where storing raw vectors at full precision would require dozens of terabytes.

LSH — Locality-Sensitive Hashing
LSH projects vectors into hash buckets such that similar vectors land in the same bucket with high probability. Approximate search becomes a hash lookup. LSH is fast but less accurate than HNSW for high-dimensional dense vectors, so it’s more commonly used for sparse vectors and certain specialised tasks.

Best for: Very high-dimensional sparse data, deduplication tasks, and situations where approximate accuracy is sufficient.

⚠ Accuracy vs speed trade-off

Every ANN algorithm trades some recall accuracy for speed. HNSW typically achieves 95–99% recall at query speeds 100× faster than brute-force. For most production applications, this is the right trade-off. For safety-critical applications requiring exact nearest neighbours, exact k-NN search (brute force) is still supported by most databases — just much slower at scale.

Real-world use cases
Vector databases are not a niche technology. They are now infrastructure-layer components in production AI applications serving millions of users. Here are the dominant use cases:

Semantic search
Instead of matching keywords, semantic search finds content that means what the user is asking. A search for “can’t access my account” returns “password reset documentation” even if that phrase never appears in the query. This powers enterprise document search, e-commerce, support portals, and knowledge bases.

Retrieval-Augmented Generation (RAG)
The dominant architecture for grounding LLM outputs in real data. All reference material is embedded at ingestion. At query time, the most relevant chunks are retrieved and injected into the LLM’s context window. This is how most enterprise AI assistants, chatbots, and copilots are built today.

Recommendation systems
User preferences, item features, and behavioural history are embedded into the same space. Recommendations become nearest-neighbour queries: “find products whose vector is closest to this user’s preference vector.” Spotify, Netflix, and most e-commerce platforms run some version of this.

Image and multimodal search
Models like CLIP embed images and text into a shared vector space. You can search image libraries with text queries, find visually similar products, power content moderation, or detect near-duplicate images — all via the same k-NN retrieval mechanism.

Anomaly detection
Embed sequences of actions, log events, or network packets. Normal behaviour clusters tightly in vector space. Anomalies appear as outliers far from any cluster. This pattern is used in fraud detection, intrusion detection, and predictive maintenance.

Long-term AI agent memory
This is the use case that separates serious agent deployments from demos. Agents need to remember what they’ve done, what users have told them, and how the world has changed since their last session. Vector databases are the obvious answer — and they work, up to a point. We’ll get to the limits in section 6.

Top vector databases compared
Press enter or click to view image in full size

The vector database market is crowded. Here’s a technical breakdown of the most widely used options, their architecture, and when to choose each:

Write on Medium
★ = Stack used by VEKTOR Slipstream — better-sqlite3 loads sqlite-vec as a native extension, giving agent-memory workloads zero-latency vector search with full SQL and no external process.

The gap: why vector search alone is not agent memory
Here is the thing nobody mentions in the “vector databases explained” articles: storing vectors and retrieving similar ones is not the same as remembering.

Vector search answers one question: “What stored content is most similar to this query?” That is powerful. But an AI agent needs to answer different questions:

What has changed since I last spoke to this user?
Is this new fact consistent with what I already know?
How are these two facts related — not in text similarity, but in logical causality?
What should I forget because it’s stale or contradicted?
What is the narrative arc of this user’s project over time?
None of these questions are cosine similarity problems. They are graph traversal, contradiction resolution, temporal reasoning, and compression problems. A vector database is necessary but not sufficient.

Press enter or click to view image in full size

This is the architectural gap that motivated VEKTOR. We needed persistent agent memory that did more than retrieve similar chunks — we needed a system that could reason about what it knows, resolve conflicts, and stay clean over thousands of interactions.

“Every long-running agent eventually accumulates contradictory, stale, redundant memory. Vector search doesn’t fix this. A compression-aware memory graph does.”

MAGMA: four-layer memory graph beyond cosine similarity
MAGMA (Multi-layer Associative Graph Memory Architecture) is the memory model at the core of VEKTOR Slipstream. Instead of a single flat vector store, MAGMA maintains four distinct memory layers — each capturing a different type of relationship between facts.

Layer 1 — Semantic layer
Standard vector embeddings. The familiar cosine-similarity retrieval layer that surfaces content close in meaning to the query. This is what every RAG system has. In MAGMA it is the entry point, not the whole system.

Layer 2 — Causal layer
Directed edges between facts that have a cause-and-effect relationship. “User changed jobs” → “budget constraints changed” → “paused subscription.” Vector similarity would never surface this chain from a query about subscription status. Causal traversal does.

Layer 3 — Temporal layer
Every memory node carries a timestamp and a decay weight. Facts become less authoritative over time unless reinforced. Contradicting facts trigger the AUDN loop for resolution. This is how VEKTOR avoids the “hairball problem” — the entropy accumulation that kills long-running agents.

Layer 4 — Entity layer
Named entities (people, projects, tools, companies) are indexed as first-class nodes. Queries can traverse entity relationships: “everything this user’s company uses,” “all decisions made in this project,” “everyone who worked on this problem.” This is graph traversal, not vector search.

Every new memory ingestion triggers the AUDN decision: Add (new fact, store it), Update (existing fact has changed, modify the node), Delete (fact is contradicted or obsolete, remove it), or None (redundant, discard). This loop is what keeps MAGMA’s graph coherent over time. Without it, vector stores accumulate contradictions silently. Deep dive →

Periodically, VEKTOR runs a REM (Recall-Evaluate-Merge) compression cycle inspired by how biological memory consolidates during sleep. Redundant memories are merged. Stale knowledge is decayed. Contradictions are resolved. The graph stays small and signal-rich even after thousands of interactions. Read the REM deep dive →

VEKTOR Slipstream & Cloak: vector memory in practice
VEKTOR Slipstream is the single-package implementation of MAGMA. It ships as an npm package that installs in minutes, runs entirely on local hardware, and exposes its full capability as an MCP server — meaning Claude, Cursor, Windsurf, VS Code, and Groq Desktop all get access to persistent, graph-backed memory through the standard MCP protocol.

Under the hood, Slipstream stores memory in a local SQLite database. No cloud dependency, no per-call API fees, no data leaving your machine. The vector index lives inside the same .db file as the graph. It is truly sovereign infrastructure.

terminal — install slipstream

Install globally npm install -g vektor-slipstream # Start the MCP server vektor mcp # Your AI apps now have persistent memory ✓ Claude Desktop connected ✓ Cursor connected ✓ Windsurf connected

Cloak is the stealth browser and SSH orchestration layer inside Slipstream. It is where agent actions meet real-world execution: fetching URLs with human-realistic browser fingerprints, executing SSH commands on remote servers with automatic backup and rollback, managing credentials in an AES-256 encrypted vault, and running multi-step operations as atomic transactions with a single approval gate.

Cloak’s memory integration means every action it takes can be remembered: the server it SSH’d into, the config it changed, the page it fetched, the credential it used. That context accumulates in MAGMA and becomes available to future agent sessions. This is the difference between an agent that executes and an agent that knows what it has done.

vektor slipstream — remember + recall

// Store a memory with graph relationships await vektor.store("User migrated from Pinecone to LanceDB in March", { entities: ["user:alex", "tool:pinecone", "tool:lancedb"], causal: "cost_reduction", temporal: new Date() }); // Recall with graph traversal, not just similarity const memory = await vektor.recall("what vector db is this user running?"); // Returns: LanceDB (March migration) - not Pinecone // Standard RAG would return both, with no preference

Vex & Vek-Sync: open-source memory tooling
Two open-source tools from the VEKTOR ecosystem solve problems that every developer building on vector databases eventually hits.

Vex — Vector Exchange Format
Switching vector databases is painful because every database uses its own export format. Moving from Pinecone to Qdrant means writing a one-off migration script. Moving from Weaviate to LanceDB means writing another. The ecosystem has no interchange standard.

Vex is the open interchange format for agent memory. A .vex file contains vectors, metadata, and graph relationships in a portable schema that any vector database can import. Write one migration path to Vex, then go anywhere. GitHub →

Vek-Sync — One config file to rule them all
Every AI app on your machine stores its MCP server config in a different directory. Update your VEKTOR Slipstream path and you have to edit five JSON files. Vek-Sync maintains one canonical mcp-sync.json and propagates it to every detected AI app with a single vek-sync push command. Credential rotation, server updates, new tool additions - all handled in one place. Read the article → · GitHub →

How to choose the right vector layer for your stack
The right answer depends on three variables: scale, sovereignty, and what kind of memory your agent actually needs.

For prototypes and research
Use LanceDB (embedded, no server) or pgvector (if you’re already on Postgres). Zero ops overhead. Both support HNSW. Good enough for tens of millions of vectors.

For production RAG at scale
Use Qdrant (self-hosted, Rust performance, sparse + dense) or Weaviate (strong hybrid search, good ecosystem). Both are battle-tested at hundreds of millions of vectors with sub-10ms query latency.

For teams who want zero infrastructure
Use Pinecone. Fully managed, reliable, expensive. Worth it if engineering time costs more than the bill.

For AI agents that need persistent, graph-backed memory
A flat vector store is the wrong abstraction. You need a system that handles contradiction resolution, temporal decay, entity relationships, and compression. That is what VEKTOR Slipstream + MAGMA is designed for. It uses an embedded vector index for semantic recall as its foundation, then adds the four memory layers on top. Local-first, MCP-native, no cloud dependency.

Storing documents for semantic search? Any vector database works. Pick based on scale and ops preference.

Building a RAG pipeline for an LLM app? Qdrant or Weaviate self-hosted, Pinecone if managed. Use a chunking strategy and metadata filters.

Building an AI agent that needs to remember across sessions? You need more than a vector store. You need MAGMA. See VEKTOR Slipstream →

Originally published at https://vektormemory.com on May 7, 2026.