Files
nexus/wiki/concepts/Vector-Store.md

51 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Vector-Store"
type: concept
tags: [RAG, 向量数据库, 嵌入向量]
sources: [rag从入门到精通系列1-基础rag]
last_updated: 2025-01-16
---
## Definition
Vector Store向量数据库是专门用于存储和检索高维向量Embedding Vector的数据库系统是 RAG 管道中 Retrieval 阶段的核心基础设施。
## Core Functions
1. **向量存储**:存储文本的 Embedding Vector 表示
2. **相似度检索**:支持多种相似度度量方法(余弦相似度、点积、欧氏距离),返回 Top-k 最相似的结果
3. **元数据过滤**:支持在检索时附加标量过滤条件(如时间、类别等)
4. **混合检索**部分向量数据库支持结合传统关键词检索BM25与向量检索
## Popular Vector Stores
| 名称 | 特点 | 语言 |
|------|------|------|
| Qdrant | 开源高性能支持过滤Rust 编写 | Rust |
| Chroma | 轻量级,适合本地和小规模场景 | Python |
| Milvus | 开源,分布式,成熟生产级 | Go |
| Weaviate | 原生支持混合检索GraphQL 接口 | Go |
| Pinecone | 云原生,全托管,无需运维 | 云服务 |
| pgvector | PostgreSQL 扩展,简化技术栈 | PostgreSQL |
## Indexing in Vector Store
向量数据库通常使用近似最近邻ANN算法构建索引以支持在海量向量中快速检索
- **HNSWHierarchical Navigable Small World**:图索引,高检索精度,中等内存占用
- **IVFInverted File Index**:倒排索引,支持聚类加速
- **PQProduct Quantization**:压缩索引,节省内存
## Connections
- [[Vector-Store]] ← supports ← [[Retrieval]]
- [[Vector-Store]] ← receives_data_from ← [[Indexing]]
- [[Vector-Store]] ← uses ← [[Embedding]]
## Aliases
- Vector Database
- Vector Search Engine
- Embedding Store
- 向量数据库