Getting Started with SeekDB: An AI‑Native Embedded Search Database
This guide introduces SeekDB, an AI‑native embedded database that unifies vector, text, and structured search, walks through installation with uv, shows a complete Python demo, and shares practical pros, cons, and usage tips for developers.
Overview
SeekDB is an AI‑native search database that unifies vector, text, structured, and semi‑structured data in a single engine, enabling hybrid retrieval. Official repository: https://github.com/oceanbase/seekdb
Key Features
Embeddable like SQLite – no separate server process.
Full‑text search comparable to Elasticsearch.
Vector (embedding) search with built‑in embedding function.
Supports structured and semi‑structured queries.
Installation (requires uv )
uv init seekdb-demo
cd seekdb-demo
uv python pin 3.12
uv venv
uv pip install pyseekdbRun the demo:
uv run src/demo.pyComplete Python Example (src/demo.py)
import pyseekdb
from pyseekdb import DefaultEmbeddingFunction, HNSWConfiguration
client = pyseekdb.Client()
coll_name = "notes"
collection = client.create_collection(name=coll_name)
print("Collection created:", collection.name)
docs = [
"今天跑了 10 公里,状态不错。",
"Mapbox 的 polyline 编码可以有效减少地址长度。",
"Python asyncio 和 gevent 的对比需要实测。",
]
ids = ["run1", "map1", "py1"]
metas = [{"tag": "run"}, {"tag": "map"}, {"tag": "python"}]
collection.add(ids=ids, documents=docs, metadatas=metas)
print("Documents added.")
query = "跑步 状态"
res = collection.query(query_texts=query, n_results=2)
print("Query:", query)
for i, rid in enumerate(res["ids"][0]):
print("Result", i + 1)
print(" id:", rid)
print(" doc:", res["documents"][0][i])
print(" meta:", res["metadatas"][0][i])
print(" distance:", res["distances"][0][i])
client.delete_collection(coll_name)Advantages
Embedded experience: works like a local SQLite file, ideal for edge devices or small teams.
Simple API flow: init → add → query → delete.
Automatic embedding: the SDK handles vectorization internally.
Hybrid search aligns with Retrieval‑Augmented Generation (RAG) and other AI workloads.
Known Limitations
Current resource footprint is modest but noticeable (approximately 1 CPU core and 1 GB RAM); optimization is pending.
Aikesheng Open Source Community
The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
