lancedb
12
总安装量
2
周安装量
#25957
全站排名
安装命令
npx skills add https://github.com/poletron/custom-rules --skill lancedb
Agent 安装分布
github-copilot
1
antigravity
1
Skill 文档
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
- Best Practices: best-practices.md