Menu

How to use LanceDB for RAG: hybrid search, one table per workspace, and the single-writer catch
πŸ“°

How to use LanceDB for RAG: hybrid search, one table per workspace, and the single-writer catch

DEV Community: kubernetesΒ·Ahmed NafiesΒ·6 days ago
#A3VFcDIz
#devtokubernetes#devto#dev#table#search
Reading 0:00
15s threshold

LanceDB is not a server. It is a library you import, and it reads and writes a directory on disk. That single fact is why it is pleasant to use for RAG, and why running it inside Kubernetes forces an unusual architecture.

I spent the last stretch building a local RAG stack on it: Markdown/text in, hybrid retrieval, streamed answers with citations, all on a Colima k3s cluster with three containers and no cloud services. Then I added workspaces and permissions. This is a field report on what LanceDB actually gives you for RAG, with the parts that bit me written down. Everything here runs on one Mac; the numbers come from a smoke test, not a benchmark.

The code is public: nf1s/rag-lancedb . Every snippet below is shortened from it.

Why LanceDB fits RAG

A RAG index needs three things: store vectors, search them by similarity, and search the same text by keywords. Most setups reach for a vector database plus Elasticsearch, or a vector DB with a keyword add-on that is easy to forget.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.