Skip to main content
use-apify.com

Vector search: guides & tutorials

Semantic search over crawled content: embeddings, vector databases, and retrieval patterns that power RAG systems built on Apify-collected data.

1 articles

View all tags

AI11 min read

RAG in Production: From Website Crawl to Vector Search That Actually Works (2026)

· 11 min read
Yassine El Haddad
Software Developer & Automation Specialist

Many RAG (Retrieval-Augmented Generation) projects fail in production not because the technology doesn't work, but because teams skip the hard parts: chunking strategy, embedding model selection, retrieval quality measurement, and stale data management. Validate each step on your own corpus — field names, SDK versions, and Actor outputs change over time.

The pipeline: crawl websites → chunk intelligently → embed → store in vector DB → retrieve with reranking → generate answers with citations.

TL;DR:

StageToolKey decisions
CrawlApify Website Content CrawlerMarkdown output, max depth, content filtering
ChunkLangChain RecursiveCharacterTextSplitter~2000 character chunks, ~200 overlap (~500 tokens/chunk at ~4 chars/token — tune for your content)
EmbedOpenAI text-embedding-3-small or local all-MiniLM-L6-v2Cost vs quality trade-off
StoreQdrant or pgvectorManaged vs self-hosted
RetrieveDense vector search + Cohere rerank (sample below)Top-k=20 candidates, rerank to top-5 — add BM25 / sparse hybrid in Qdrant if you need keyword-heavy queries
GenerateClaude SonnetWith source citations

Prerequisites:

  • Python 3.10+ or Node.js 18+
  • Apify account (sign up)
  • Vector database (Qdrant Cloud free tier or self-hosted)
  • LLM API key (Claude, GPT-4, or self-hosted Ollama)