LatticeDB 是一款使用 Zig 语言开发且无外部依赖的嵌入式单文件属性图数据库 1。该产品类似于 SQLite,主要面向 Graph RAG、Agent 记忆以及本地知识工具等单机本地优先的工作负载 1。它能够在同一引擎和查询层中对关系、语义与文本数据进行遍历与检索,并原生支持基于 HNSW 的向量相似性搜索和 BM25 全文检索功能 1。
在性能指标上,LatticeDB 的节点查找延迟为 0.13 微秒 1。在包含 100 万个 128 维余弦向量,且参数设定为 M=16、ef_construction=200、ef_search=64、k=10 的测试条件下,其向量搜索平均延迟为 0.83 毫秒,召回率为 100% 1。与 SQLite 相比,LatticeDB 的 B+Tree 缓存查找速度比 SQLite 的磁盘查找快 23 倍,其 BM25 倒排索引也比 SQLite FTS5 快约 300 倍 1。
在查询与接口支持方面,LatticeDB 支持 Cypher 查询语言子集,包括 MATCH、WHERE、RETURN、CREATE、DELETE、SET、REMOVE、ORDER BY、LIMIT、SKIP 和 DETACH DELETE,以及向量距离运算符和全文检索运算符 @@ 1。该数据库提供 Python、TypeScript、Go 和 C 语言的 API 绑定 1。在架构设计上,LatticeDB 采用零配置的单写入者模型,不支持多客户端并发写入或跨机器分布式部署 1。
LatticeDB has been introduced as an embedded, single-file property graph database designed to function similarly to SQLite but tailored specifically for graph data 1. The system natively supports vector similarity search via HNSW and BM25 full-text retrieval, allowing users to traverse and query relational, semantic, and textual data within a unified engine and query layer 1. It is built for local-first, single-machine workloads such as Graph RAG, agent memory, and local knowledge tools 1. Operating on a zero-configuration, single-writer model, the database does not support concurrent writes from multiple clients or distributed deployments across machines 1.
Written in Zig with no external dependencies, LatticeDB delivers high performance, achieving a node lookup latency of just 0.13 microseconds 1. In tests involving one million 128-dimensional cosine vectors with parameters set to M=16, ef_construction=200, ef_search=64, and k=10, the vector search recorded an average latency of 0.83 milliseconds with a 100% recall rate 1. Furthermore, its B+Tree cache lookups are 23 times faster than SQLite's disk lookups, and its BM25 inverted index operates approximately 300 times faster than SQLite FTS5 1. The database provides API bindings for Python, TypeScript, Go, and C, and supports a subset of the Cypher query language 1. This Cypher subset includes standard clauses like MATCH, WHERE, RETURN, CREATE, DELETE, SET, REMOVE, ORDER BY, LIMIT, SKIP, and DETACH DELETE, alongside the vector distance operator and the full-text search operator @@ 1.
评论
还没有评论,欢迎留下第一条。