lancedb

star 1

LanceDB vector database patterns and best practices. Trigger: When using LanceDB vector database.

odjaramillo By odjaramillo schedule Updated 3/7/2026

name: lancedb description: > LanceDB vector database patterns and best practices. Trigger: When using LanceDB vector database. license: Apache-2.0 metadata: author: poletron version: '1.0' scope: [root] auto_invoke: 'Working with lancedb'

When to Use

Use this skill when: - Storing and querying vector embeddings - Building semantic search - Implementing RAG systems - Working with multi-modal data

Critical Patterns

Table Creation (REQUIRED)

import lancedb

# ✅ ALWAYS: Define schema clearly
db = lancedb.connect("./my_db")

data = [
    {"id": 1, "text": "Hello world", "vector": [0.1, 0.2, ...]},
    {"id": 2, "text": "Goodbye world", "vector": [0.3, 0.4, ...]},
]

table = db.create_table("my_table", data)

Vector Search (REQUIRED)

# ✅ Search by vector similarity
results = table.search([0.1, 0.2, ...]).limit(10).to_list()

# ✅ With filter
results = table.search(query_vector) \
    .where("category = 'tech'") \
    .limit(5) \
    .to_list()

Decision Tree

Need semantic search?      → Use vector search
Need exact match?          → Use where clause
Need hybrid search?        → Combine vector + filter
Need persistence?          → Use file-based connection

Resources

Install via CLI
npx skills add https://github.com/odjaramillo/custom-rules --skill lancedb
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator