跳到主要内容Skip to main content
RAG 与知识库RAG & Knowledge Bases本地优先Local-first

LanceDB

lancedb / lancedb

嵌入式多模态向量数据库,Rust 核心 + Python/JS SDK,底层 Lance 列存,支持向量、全文、SQL 过滤和版本化。An embedded multimodal vector database with a Rust core and Python/JavaScript SDKs, built on Lance columnar storage with vector, full-text, SQL filtering and versioning.

12.0k stars 1174 forks Rust 语言Language Apache-2.0 许可License 最近推送Last push 2026-11-20

为什么选Why choose it

  • 本地或边缘 RAG 的轻量选择:不用起独立服务,数据和索引就是本地文件。Embedded deployment with no separate server.
  • 列存格式对图片、音频 embedding 和大表扫描友好,适合多模态数据集。Multimodal and full-text search in one store.
  • 支持增量写入与版本管理,做实验和离线评测比内存索引更稳。Lance versioning helps reproduce datasets.

不适合Not for

需要成熟分布式集群、在线扩缩容和细粒度多租户的生产系统。You need a distributed multi-writer cluster.
多人同时高频写入同一数据集的场景,仍要自己做并发控制。Your workload is purely relational.

最小上手Minimum setup

  1. pip install lancedb,准备一批文本或图片 embedding。Create a table with vectors and metadata.
  2. 建表、写入 1,000 条向量,跑一次 top-k 查询和元数据过滤。Run a vector query and a SQL filter together.
  3. 用 10 万条数据测建索引时间、查询延迟与磁盘占用。Test a versioned dataset update and roll back.

依赖与成本Dependencies and cost

Python 3.9+ 或 Node 18+;本地磁盘;多模态还要 embedding 模型。Check runtime, model weights and external service dependencies in the README.

许可与使用边界License and usage boundaries

代码 Apache-2.0;模型与数据另计。Code is Apache-2.0; model weights, training data and generated content may have separate terms — check each before commercial use.

开源不等于可商用:GPL / AGPL 有传染性;代码许可、模型许可、生成内容许可要分开看。上线前读仓库 LICENSE 与模型卡,必要时让法务确认。Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

替代与相邻Alternatives and neighbors

  • Chroma — 轻量Lightweight,轻量向量库,Python/JS 上手快,适合原型与中小规模知识库。A lightweight vector store with quick Python and JavaScript onboarding, suited to prototypes and small knowledge bases.
  • pgvector — 生产可用Production,Postgres 的向量扩展,给普通表加 vector 列、距离操作符和 HNSW/IVFFlat 索引,让向量检索和业务数据留在同一个库。A Postgres extension that adds vector columns, distance operators and HNSW or IVFFlat indexes, keeping vector search next to business data.
  • Qdrant — 生产可用Production,Rust 写的向量数据库,带过滤、混合检索、分布式与量化。A Rust vector database with filtering, hybrid search, distributed deployment and quantisation.

下一步Next steps

  • 打开 GitHub,先读 README、LICENSE、最近 release 与 issue。Open GitHub and read the README, LICENSE, latest release and issues first.
  • 按“部署依赖 / 显存 / 数据 / 网络 / 权限”列一张上手清单。Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • 用一个小样本跑通,再决定是否进生产;不要直接上生产数据。Run a small sample first, then decide on production; never start with production data.

GitHub 仓库 ↗GitHub repository ↗ 文档 ↗Docs ↗ 加入对比Add to compare

快照口径:stars / forks / language / license / pushed_at 来自 GitHub API 2026-11-20 快照;之后的变化没有回写。标签与“适合 / 不适合”是编辑判断,不是 GitHub 元数据。Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
不背书:本站只做索引与风险提示,不审计代码、不保证安全、不替你做许可判断。仓库脚本与模型权重请自行审查。No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.