数据库
混合搜索做三件事:向量搜索(Vector Search)、全文搜索(Full-Text Search)和 结构化查询
用 向量搜索 来理解用户的意图
用 全文搜索 来匹配特定的关键词。
用 结构化查询 来做精确的筛选
向量数据库
Vector databases
插拔式的模块,作为python包-Python package ,存储和查询向量storage and search,
存储: Zvec stores both the original vectors and their quantized versions
量化精度:FP16 (Half-Precision Floating Point) INT8 (8-Bit Integer Quantization) INT4 (4-Bit Integer Quantization)
查询:Inverted Index
查询:暴力搜索(Brute Force Search)
数据模型
1.文档和集合 collections and documents
documents: 核心组件 id vectors fields
Each collection is self-contained within its directory.
dedicated schema and indexing configuration
documents-- 文档 有三个核心组件 id vectors fields
three core components
2.数据类型
标量和向量
Scalar types 和 Vector types
标量: Elementary Types 和 Array Types
向量 Vector Types: 稠密和稀疏向量
稠密向量
稀疏向量: sparse vectors
use integer indices to map terms to their positions within a vocabulary dictionary
rather than storing the term strings directly
Indexes 索引: vector index types HNSW/IVF 向量索引的创建
Flat (Brute-Force) index
HNSW (Hierarchical Navigable Small World)
IVF (Inverted File Index)
3.嵌入模型 An embedding model
模型
距离: cosine similarity, dot product, or Euclidean distance.
模型量化(Model Quantization)是一种将神经网络模型中的高精度数值(如 32 位浮点数)转换为低精度数值(如 8 位整数、4 位整数甚至二值)的技术
其他
在MongoDB中,databases 保存 文档(Documents)的集合(Collections)
MongoDB在collections中存储文档(documents)。
Collections类似于关系型数据库中的表(tables),默认情况下,collection不要求文档有相同的结构
document represents a row in a table
边缘数据库
Turso 是一个嵌入式 SQL 数据库,完全兼容 SQLite
OceanBase seekdb 是蚂蚁集团旗下数据库产品OceanBase于2025年11月18日发布的首款AI数据库,并在同期宣布开源
in a single engine, enabling hybrid search and in-database AI workflows.
pyseekdb 需要python版本3.11
docker run -d \
--name seekdb \
-p 2881:2881 \
-v ./data:/var/lib/oceanbase/store \
oceanbase/seekdb:latest
AI应用的数据处理流
seekdb引入了 "Document in, Data out" 的设计理念
参考
https://zvec.org/en/docs/quickstart/
https://github.com/oceanbase/seekdb
https://zhuanlan.zhihu.com/p/1988902297217025545
https://chuna2.787528.xyz/OBCE666/p/19400264