Agent Skills: ✅ ALWAYS: Define schema clearly

>

UncategorizedID: poletron/custom-rules/lancedb

Install this agent skill to your local

pnpm dlx add-skill https://github.com/odjaramillo/custom-rules/tree/HEAD/registry/skills/lancedb

Skill Files

Browse the full folder contents for lancedb.

Download Skill

Loading file tree…

registry/skills/lancedb/SKILL.md

Skill Metadata

Name
lancedb
Description
>

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