lancedb
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "lancedb" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-36c211cd86bf787c3d1d1e0e1c485412068541dbc8d4fbf8ab530ce30117c778. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
LanceDB embedded vector database — serverless, zero-configuration vector search for AI applications. Suitable for serverless vector search, embedded or local vector databases, in-file vector search, lightweight RAG storage, and use cases involving table creation, vector search, full-text search, hybrid search, and multimodal embeddings.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Audience
- RAG prototypes and local development (no infrastructure to set up) Edge/embedded applications that need vector search Desktop apps and CLI tools with AI features Projects too small for Pinecone/Qdrant but need more than arrays Multimodal search (text + images in same index)
- Software, accounts and paid services
- ```bash npm install @lancedb/lancedb
- Testing
- Not tested
Browse files
Frontmatter
name: lancedb
description: >-
Embedded vector database with LanceDB — serverless, zero-config vector search
for AI applications. Use when someone asks to "vector search without a server",
"embedded vector database", "LanceDB", "local vector search", "serverless
vector DB", "vector search in a file", or "lightweight RAG storage". Covers
table creation, vector search, full-text search, hybrid search, and multimodal
embeddings.
license: Apache-2.0
compatibility: "Node.js/Python. Runs locally (embedded) or serverless cloud."
metadata:
author: terminal-skills
version: "1.0.0"
category: data-ai
tags: ["vector", "embedded-db", "lancedb", "rag", "search"]LanceDB
Overview
LanceDB is an embedded vector database — it runs inside your application process with zero external dependencies. No Docker containers, no servers, no connection strings. Data is stored in Lance format (columnar, optimized for ML) on local disk or object storage (S3). Perfect for prototyping, edge deployments, and applications where running a separate vector database is overkill.
When to Use
- RAG prototypes and local development (no infrastructure to set up)
- Edge/embedded applications that need vector search
- Desktop apps and CLI tools with AI features
- Projects too small for Pinecone/Qdrant but need more than arrays
- Multimodal search (text + images in same index)
Instructions
Setup
npm install @lancedb/lancedb
# Optional: for automatic embedding generation
npm install @lancedb/lancedb openai
Basic Usage
// db.ts — Create a LanceDB table and search
import * as lancedb from "@lancedb/lancedb";
// Connect to local database (creates directory if needed)
const db = await lancedb.connect("./my-vector-db");
// Create a table with data
const data = [
{ id: 1, text: "The cat sat on the mat", vector: [0.1, 0.2, 0.3, ...] },
{ id: 2, text: "Dogs are loyal companions", vector: [0.4, 0.5, 0.6, ...] },
{ id: 3, text: "Fish swim in the ocean", vector: [0.7, 0.8, 0.9, ...] },
];
const table = await db.createTable("documents", data);
// Vector search — find similar items
const results = await table
.vectorSearch([0.1, 0.2, 0.3, ...]) // Query vector
.limit(5)
.toArray();
// results: [{ id: 1, text: "The cat sat on the mat", _distance: 0.001 }, ...]
With Automatic Embeddings
// auto-embed.ts — LanceDB generates embeddings automatically
import * as lancedb from "@lancedb/lancedb";
import { getRegistry } from "@lancedb/lancedb/embeddings";
const openai = getRegistry().get("openai")!.create({
model: "text-embedding-3-small",
});
const db = await lancedb.connect("./my-db");
// Define schema with embedding function
const schema = lancedb
.schema([
lancedb.field("id", new lancedb.Int32()),
lancedb.field("text", new lancedb.Utf8(), openai.sourceField()),
lancedb.field("vector", openai.vectorField()), // Auto-generated
]);
const table = await db.createTable("docs", [
{ id: 1, text: "How to set up authentication" },
{ id: 2, text: "Database migration guide" },
{ id: 3, text: "Deploying to production" },
], { schema });
// Search with text — embedding generated automatically
const results = await table
.search("how do I deploy my app?")
.limit(3)
.toArray();
Full-Text + Vector Hybrid Search
// hybrid.ts — Combine keyword and semantic search
const table = await db.openTable("documents");
// Create full-text search index
await table.createIndex("text", { config: lancedb.Index.fts() });
// Hybrid search: combines vector similarity + keyword matching
const results = await table
.search("deploy production", { queryType: "hybrid" })
.limit(10)
.toArray();
Filtering
// filter.ts — Vector search with metadata filters
const results = await table
.vectorSearch(queryVector)
.where("category = 'docs' AND created_at > '2026-01-01'")
.limit(10)
.toArray();
Examples
Example 1: Build a local RAG chatbot
User prompt: "Build a chatbot that answers questions about local documents without any external services."
The agent will use LanceDB embedded to store document embeddings locally, build a search function, and connect to a local LLM (Ollama) for generation.
Example 2: Semantic search for a CLI tool
User prompt: "Add semantic search to my note-taking CLI so I can find notes by meaning."
The agent will create a LanceDB database in the app's data directory, embed notes on save, and add a search command that finds semantically similar notes.
Guidelines
- Embedded = no server — runs in your process, data in a directory
- Lance format — columnar, compressed, fast for ML workloads
- S3-compatible storage —
lancedb.connect("s3://bucket/path")for cloud - Auto-embeddings — register an embedding function, never manually embed again
- Hybrid search — combine vector + full-text for best results
- Filtering with SQL-like syntax —
where("category = 'docs'") - IVF-PQ index for scale — create index when table exceeds 100K rows
- Data versioning built-in — Lance format supports time travel
- No connection pooling — it's embedded, just open and use
- Great for prototyping — start with LanceDB, migrate to hosted if needed
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 LanceDB 嵌入式向量数据库的完整端到端使用指南
- 覆盖 RAG 原型、边缘应用、桌面工具等高频刚需场景
- 支持自动嵌入、混合搜索、过滤等高级功能
Highlights
- 触发词覆盖全面且边界清晰
- 准确描述核心功能和使用场景
Areas to improve
-
description 内容重复 Reported severity: Minor
顶层 frontmatter 和 skill_body 内部均包含 description,内容一致但属冗余
Recommendation: 建议保留一处 description 以避免重复
Highlights
- 文档结构清晰完整,包含完整的使用流程和示例
- frontmatter 信息完整,包含 license、compatibility、metadata 等
Areas to improve
-
缺少错误处理示例 Reported severity: Minor
代码示例未展示连接失败、表不存在等常见异常的处理方式
Recommendation: 建议添加 try-catch 示例和常见错误处理指南
Highlights
- 工具来源明确,参数使用正确
- 代码示例完整可执行,涵盖主要使用场景
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 38, 40
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
```bash npm install @lancedb/lancedb
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.