{"id":662,"slug":"rag-when-it-pays-off-50-pages-threshold","title":"RAG on a marketing site only pays off above ~50 pages of substantive content AND when visitor questions don't map cleanly to navigation","kind":"reference","scope":"business","status":"current","audiences":["kevin","smb-owner","candid-team"],"topics":["knowledge-base","rag-architecture"],"reference_body":"**Threshold for when RAG pays off on a client marketing site:**\n\n- 50+ pages of substantive content (knowledge base, docs, case studies).\n- User questions don't map cleanly to navigation (complex services, regulated industries).\n- Client has high support-ticket volume that could be deflected.\n\n**When traditional search wins:**\n\n- Under 50 pages.\n- Strongly structured content (products with SKUs, locations, services with names).\n- Budget under $5k for the search feature alone.\n\n**Default RAG stack for SMB:**\n\n- **Embedding DB: pgvector in Postgres** (Supabase, Neon, or self-hosted). Per Encore's pgvector benchmarks: *\"pgvector handles millions of vectors with HNSW indexing. Benchmarks show query times under 20ms at 1M vectors with recall rates above 95%.\"*\n- **Don't reach for Pinecone/Weaviate/Turbopuffer for SMB work** — they're real wins above 10M vectors or with extreme multi-tenant requirements, neither of which apply to local-service businesses.\n- **Embedding model:** OpenAI `text-embedding-3-small` (1536 dim, cheap) or Voyage AI for higher quality.\n- **LLM for generation:** Claude Haiku for cost, Sonnet for quality.\n- **Frontend:** server-rendered chat island in Astro, streaming response via Cloudflare Worker.\n\n**For traditional search (preferred default):** Pagefind (free, runs at build time, sub-300kB index for most SMB sites), Orama (in-browser, no backend), MiniSearch (lightweight JS), Algolia (when typo tolerance / analytics matter), Meilisearch (self-hosted, faceted).","rationale_body":null,"metadata":null,"links":{"outgoing":[{"slug":"rule-avoid-astro-db-as-strategic-bet","title":"RULE: Don't recommend Astro DB / Astro Studio as a strategic platform bet — Studio was wound down late 2024","kind":"rule","scope":"business","link_type":"relates-to"}],"incoming":[]},"created_at":"2026-05-22T21:24:18.338Z","updated_at":"2026-05-22T21:24:18.338Z"}