Vector Database
A vector database is a database system specialized for storing and retrieving high-dimensional vector data. It persistently stores embedding representations of unstructured data such as text, images, and audio, and supports approximate nearest neighbor (ANN) search based on similarity metrics such as cosine similarity and Euclidean distance. Vector databases are widely applied in semantic search, recommendation systems, image retrieval, and retrieval-augmented generation for large language models.
Core Facts
RAG(检索增强生成)技术架构将文档切片、向量化、存入向量数据库,查询时先检索相关片段再交给模型生成回答
An Agent's memory mechanism is typically divided into two categories: short-term memory and long-term memory, with long-term memory requiring external persistent storage such as vector databases, relational databases, and graph databases.
Vector databases such as FAISS, Chroma, and Weaviate build indexes by encoding text as high-dimensional vectors, enabling semantic similarity retrieval in milliseconds.
Timeline (last 90 days)
LLM gateways are becoming a key component of enterprise AI infrastructure alongside vector databases and orchestration frameworks.
The author decided not to change the system, because installing Mem0 or a vector database would add fixed text at the start of every session (the most frequently paid part), while the fragment approach's advantage under real routing is only a few percentage points.
Even if the context window expands to millions of tokens, cross-session memory remains an engineering challenge, usually requiring an external vector database or a structured memory layer to achieve.
Vector databases (such as Pinecone, Weaviate, and Qdrant) specialize in storing and retrieving vectors; in AI scenarios they convert data such as text and images into vectors, so that content with similar semantics is also close in distance in vector space.
Planning refers to an Agent breaking down a big goal into an executable sequence of subtasks, with common approaches including task decomposition, prioritization, and dynamic replanning; the memory mechanism allows an Agent to maintain contextual coherence across multiple turns of interaction, with short-term memory usually being the conversation history and long-term memory relying on external storage such as vector databases.
Multi-vector indexes outsourced to third-party vector databases must be stored encrypted just like the original text, especially at rest.
AI工作流通常是多步的,典型的RAG流程包括:嵌入用户查询、搜索向量数据库、重排结果、将上下文与查询一起送入LLM;如果不把这些操作链接到同一条trace中,就无法诊断如“向量库返回了不相关结果,导致LLM产生幻觉”这类问题。
When an embedding column is partially regenerated, the vector database's nearest-neighbor search does not report an error; the only symptom is a slow decline in retrieval quality, which looks like model drift or data quality rot.
Vector databases allow embedding vectors from different model versions to coexist in the same index, because these vectors are completely valid in terms of data type, even if their geometric meanings are mutually contradictory.
embedding是原始文本的语义压缩,并不天然携带任何权限标签,因此如果不在检索时对向量查询附加过滤条件,向量数据库会一视同仁地召回所有语义相关的片段。
40 more timeline events
All Facts (20)
RAG(检索增强生成)技术架构将文档切片、向量化、存入向量数据库,查询时先检索相关片段再交给模型生成回答
90%VerifiedAn Agent's memory mechanism is typically divided into two categories: short-term memory and long-term memory, with long-term memory requiring external persistent storage such as vector databases, relational databases, and graph databases.
80%VerifiedVector databases such as FAISS, Chroma, and Weaviate build indexes by encoding text as high-dimensional vectors, enabling semantic similarity retrieval in milliseconds.
80%VerifiedRetrieval-Augmented Generation (RAG) splits codebases into semantic segments via vector databases and dynamically retrieves the most relevant content to inject into the context when an AI handles specific tasks.
80%VerifiedVector memory databases convert historical conversation content into high-dimensional semantic vectors, and during new conversations dynamically retrieve relevant memory fragments via similarity search and inject them into the context window.
80%VerifiedRAG addresses the limitation of large models' knowledge cutoff dates by splitting private documents into text chunks, converting them into vector representations stored in a vector database, and injecting retrieved relevant content into the Prompt.
80%VerifiedRAG(检索增强生成)的核心思想是在大模型生成回答之前,先从外部知识库中检索相关文档片段作为上下文注入Prompt
80%VerifiedAgent的记忆系统通常分为三个层次:工作记忆(当前对话上下文窗口)、短期记忆(近期交互历史)和长期记忆(通过向量数据库持久化存储)
80%VerifiedVector databases store high-dimensional vectors converted from text by an Embedding model, typically 768 or 1536 dimensions.
80%VerifiedVector databases (such as ChromaDB, Milvus, and Pinecone) use indexing algorithms such as HNSW and IVF to achieve millisecond-level retrieval among millions or even hundreds of millions of vectors.
80%VerifiedThe pgvector extension adds vector storage and similarity search capabilities to PostgreSQL, enabling Supabase to serve simultaneously as a traditional database and a vector database.
80%VerifiedVector databases (such as Pinecone, Weaviate, Milvus, etc.) convert text into high-dimensional vectors via embedding models and use cosine similarity or Euclidean distance for approximate nearest neighbor (ANN) search.
80%Verified长期记忆Agent通常基于RAG(检索增强生成)技术构建,通过向量数据库将信息转化为高维向量并持久化存储
80%Verified向量数据库的核心操作是近似最近邻搜索(ANN),通过HNSW、IVF等索引算法将相似度计算加速到毫秒级响应
80%Verified向量数据库将文本内容通过嵌入模型(Embedding Model)转化为高维数值向量,检索时通过余弦相似度等算法找出语义最接近的内容
80%VerifiedRAG (Retrieval-Augmented Generation) introduces external memory during the inference phase to constrain the model's generation boundaries, by chunking documents, embedding them as vectors stored in a vector database, and retrieving relevant chunks to inject into the prompt at inference time.
75%VerifiedVector retrieval relies on vector databases for fuzzy matching and cannot precisely express structural relationships, whereas graph retrieval uses graph databases as the storage medium and is specifically optimized for multi-hop traversal queries.
75%VerifiedMainstream solutions to the long-term memory problem in AI narratives include storing key plot nodes in vector databases, dynamically recalling memory fragments via RAG technology, and dedicated memory management modules.
75%VerifiedEnterprise-grade Agent systems typically introduce external memory modules (such as vector databases) to store long-term memory, in order to overcome context window limitations.
75%VerifiedVector databases achieve semantic-level fuzzy retrieval through cosine similarity or Euclidean distance.
75%