Ingest docs (Notion, Google Drive, PDFs, websites), chunk + embed, store in pgvector, then serve a chat UI that retrieves top chunks and streams LLM answers with source citations. Stack: Next.js + Supabase + assisters.dev-compatible API.
create table kb_chunks (id uuid, source text, url text, title text, chunk text, embedding vector(1536), updated_at timestamptz); plus an ivfflat or HNSW index.updated_at from source to stored, re-embed if newer. Delete orphans.| Tool | Best For | Price |
|---|---|---|
| Supabase pgvector | Vector store | Free tier |
| LlamaIndex | Ingestion framework | Free |
| Unstructured.io | PDF/doc parsing | Free tier |
| Cohere Rerank-compatible | Re-ranking | $1/1K |
| shadcn/ui | Chat components | Free |
Q: Can I use Notion/Confluence as source? Yes — both have APIs. Poll or webhook to sync.
Q: How do I handle images in docs? Use vision models (Claude, GPT-4V) to caption images; embed the captions.
Q: What's a good retrieval quality metric? Hit@3 (is correct chunk in top 3?). Aim for >85%.
Q: Can I keep data on-premise? Yes — self-host Supabase, use local embedding model (bge-m3), local LLM (Llama).
Q: How many docs can pgvector handle? Millions of chunks comfortably with HNSW index on a 4-core VPS.
Q: Do I need LangChain? No — 200 lines of plain TypeScript does this. LangChain adds complexity fast.
AI knowledge bases replace 80% of support tickets and onboarding questions. Start with your help center docs, measure hit rate weekly, and expand sources. One KB can save your team 20+ hours per week.
Free newsletter
Join thousands of creators and builders. One email a week — practical AI tips, platform updates, and curated reads.
No spam · Unsubscribe anytime
Replace keyword search with semantic search using embeddings, pgvector, and hybrid BM25 + vector scoring — better result…
Ship a Perplexity-style AI search engine using embeddings, RAG, and streaming LLM responses — deployed on your own infra…
Build a production retrieval-augmented generation app with pgvector, embeddings, and any OpenAI-compatible LLM. Covers c…
Comments
Sign in to join the conversation
No comments yet. Be the first to share your thoughts!