[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EFAPNF4AZSA7WDDXBK7BG9":3,"skill-same:01M6EFAPNF4AZSA7WDDXBK7BG9":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":32,"frontMatter":33,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":7,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M6EFAPNF4AZSA7WDDXBK7BG9","lancedb","向量数据库检索",null,"","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Flancedb\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8C8215FRMSQKF7VRNXVQ0MP","RAG 检索增强开发","SCENARIO","使用场景",[5],"2026-11-10 10:12:30",false,"# LanceDB\n\n## Overview\n\nLanceDB 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.\n\n## When to Use\n\n- RAG prototypes and local development (no infrastructure to set up)\n- Edge\u002Fembedded applications that need vector search\n- Desktop apps and CLI tools with AI features\n- Projects too small for Pinecone\u002FQdrant but need more than arrays\n- Multimodal search (text + images in same index)\n\n## Instructions\n\n### Setup\n\n```bash\nnpm install @lancedb\u002Flancedb\n# Optional: for automatic embedding generation\nnpm install @lancedb\u002Flancedb openai\n```\n\n### Basic Usage\n\n```typescript\n\u002F\u002F db.ts — Create a LanceDB table and search\nimport * as lancedb from \"@lancedb\u002Flancedb\";\n\n\u002F\u002F Connect to local database (creates directory if needed)\nconst db = await lancedb.connect(\".\u002Fmy-vector-db\");\n\n\u002F\u002F Create a table with data\nconst data = [\n  { id: 1, text: \"The cat sat on the mat\", vector: [0.1, 0.2, 0.3, ...] },\n  { id: 2, text: \"Dogs are loyal companions\", vector: [0.4, 0.5, 0.6, ...] },\n  { id: 3, text: \"Fish swim in the ocean\", vector: [0.7, 0.8, 0.9, ...] },\n];\n\nconst table = await db.createTable(\"documents\", data);\n\n\u002F\u002F Vector search — find similar items\nconst results = await table\n  .vectorSearch([0.1, 0.2, 0.3, ...])  \u002F\u002F Query vector\n  .limit(5)\n  .toArray();\n\n\u002F\u002F results: [{ id: 1, text: \"The cat sat on the mat\", _distance: 0.001 }, ...]\n```\n\n### With Automatic Embeddings\n\n```typescript\n\u002F\u002F auto-embed.ts — LanceDB generates embeddings automatically\nimport * as lancedb from \"@lancedb\u002Flancedb\";\nimport { getRegistry } from \"@lancedb\u002Flancedb\u002Fembeddings\";\n\nconst openai = getRegistry().get(\"openai\")!.create({\n  model: \"text-embedding-3-small\",\n});\n\nconst db = await lancedb.connect(\".\u002Fmy-db\");\n\n\u002F\u002F Define schema with embedding function\nconst schema = lancedb\n  .schema([\n    lancedb.field(\"id\", new lancedb.Int32()),\n    lancedb.field(\"text\", new lancedb.Utf8(), openai.sourceField()),\n    lancedb.field(\"vector\", openai.vectorField()),  \u002F\u002F Auto-generated\n  ]);\n\nconst table = await db.createTable(\"docs\", [\n  { id: 1, text: \"How to set up authentication\" },\n  { id: 2, text: \"Database migration guide\" },\n  { id: 3, text: \"Deploying to production\" },\n], { schema });\n\n\u002F\u002F Search with text — embedding generated automatically\nconst results = await table\n  .search(\"how do I deploy my app?\")\n  .limit(3)\n  .toArray();\n```\n\n### Full-Text + Vector Hybrid Search\n\n```typescript\n\u002F\u002F hybrid.ts — Combine keyword and semantic search\nconst table = await db.openTable(\"documents\");\n\n\u002F\u002F Create full-text search index\nawait table.createIndex(\"text\", { config: lancedb.Index.fts() });\n\n\u002F\u002F Hybrid search: combines vector similarity + keyword matching\nconst results = await table\n  .search(\"deploy production\", { queryType: \"hybrid\" })\n  .limit(10)\n  .toArray();\n```\n\n### Filtering\n\n```typescript\n\u002F\u002F filter.ts — Vector search with metadata filters\nconst results = await table\n  .vectorSearch(queryVector)\n  .where(\"category = 'docs' AND created_at > '2026-01-01'\")\n  .limit(10)\n  .toArray();\n```\n\n## Examples\n\n### Example 1: Build a local RAG chatbot\n\n**User prompt:** \"Build a chatbot that answers questions about local documents without any external services.\"\n\nThe agent will use LanceDB embedded to store document embeddings locally, build a search function, and connect to a local LLM (Ollama) for generation.\n\n### Example 2: Semantic search for a CLI tool\n\n**User prompt:** \"Add semantic search to my note-taking CLI so I can find notes by meaning.\"\n\nThe 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.\n\n## Guidelines\n\n- **Embedded = no server** — runs in your process, data in a directory\n- **Lance format** — columnar, compressed, fast for ML workloads\n- **S3-compatible storage** — `lancedb.connect(\"s3:\u002F\u002Fbucket\u002Fpath\")` for cloud\n- **Auto-embeddings** — register an embedding function, never manually embed again\n- **Hybrid search** — combine vector + full-text for best results\n- **Filtering with SQL-like syntax** — `where(\"category = 'docs'\")`\n- **IVF-PQ index for scale** — create index when table exceeds 100K rows\n- **Data versioning built-in** — Lance format supports time travel\n- **No connection pooling** — it's embedded, just open and use\n- **Great for prototyping** — start with LanceDB, migrate to hosted if needed\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Flancedb",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":9,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill lancedb",{"tool":49,"command":50},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill lancedb",{"tool":52,"command":53},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill lancedb","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Flancedb\u002FSKILL.md",true,[],[58,67,76,85,91,97],{"skillNo":59,"name":60,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":30},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[64,65,66],"model","model hierarchy","model hierarchy skill",{"skillNo":68,"name":69,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":30},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[73,74,75],"MCP","zoom","zoom mcp",{"skillNo":77,"name":78,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":30},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[82,83,84,74],"sdk","zoom apps sdk","apps",{"skillNo":86,"name":87,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":30},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[87],{"skillNo":92,"name":93,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":30},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[93],{"skillNo":98,"name":99,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":30},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[99]]