Skip to main content
use-apify.com

Vector database: guides & tutorials

Turn crawled pages into searchable vectors: chunking, embeddings, and sync to Pinecone, Qdrant, or pgvector. Apify pairs extraction with RAG-ready storage.

3 articles

View all tags

Vector databases store crawled content as embeddings so LLMs can retrieve it by meaning, not just keywords. These guides cover chunking, embedding, and syncing data to Pinecone, Qdrant, or pgvector.

A good vector store is only as useful as the pipeline feeding it, which is where clean, current crawls matter. Apify pairs extraction with RAG-ready output. Below you will find tutorials on building and maintaining vector search backends.

Related topics

Self-hosting16 min read

Self-Hosted RAG Pipeline: Dify + Qdrant + Ollama on Liquid Web (2026)

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

TL;DR

  • One docker-compose.yml: Dify (API + worker + web + sandbox) + Qdrant + Ollama + PostgreSQL + Redis + Caddy
  • Measured idle RAM: ~7.4 GB (Llama 3 8B loaded, CPU inference); minimum server: 16 GB VPS
  • Replaces: OpenAI Assistants API ($0.03/1k tokens) + Pinecone Starter ($70/mo) with a fully local, zero-egress alternative
  • Your documents never leave the server — not during upload, not during embedding, not during inference

Retrieval-Augmented Generation (RAG) lets you ask questions against a private document corpus and get answers grounded in the actual content. The dominant hosted pattern — OpenAI Assistants + Pinecone — works, but every document chunk and every query travels to OpenAI's servers. For legal contracts, internal knowledge bases, or any non-public data, that is a compliance liability.

This guide deploys a fully self-hosted RAG stack: Dify as the orchestration and document management layer, Qdrant as the vector database, and Ollama serving both the embedding model and the chat LLM — all on a single Liquid Web VPS.

AI4 min read

Architecting RAG Ingestion Pipelines: DOM-to-Vector (2026)

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

Large language models (the latest GPT and Claude Sonnet 4.6 models) have two practical limits you hit in production:

  1. Stale knowledge: Weights reflect the world only up to their training cutoff.
  2. No access to your data: They do not know your internal wikis, repos, or live systems unless you give them a path in.

Retrieval-Augmented Generation (RAG) is the usual fix. Instead of retraining or fine-tuning the model for every document change, RAG takes the user question, looks up relevant passages in an external store of facts (typically a vector database), and asks the LLM to answer using that retrieved text as ground context.

This guide focuses on the part that breaks most often: ingestion—getting web pages into a shape embeddings can use.

Architecture4 min read

RAG Ingestion: Architecting Vector Database Pipelines (2026)

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

Retrieval-Augmented Generation (RAG) is entirely dependent on the structural integrity of its underlying Vector Database. Attempting to hydrate a Pinecone index by recursively dumping raw, unparsed HTML <div> nodes into an embedding model guarantees catastrophic semantic hallucination upon retrieval.

In 2026, the data ingestion pipeline is the critical engineering bottleneck. This guide details the explicit architectural flow required to extract complex JavaScript Single-Page Applications (SPAs), mathematically flatten the DOM into clean Markdown, and synchronize the vectors utilizing the Apify Serverless Infrastructure.

Guides on this site

Frequently asked questions

Frequently Asked Questions

A vector database stores high-dimensional embeddings that enable semantic similarity search—"find content most similar to this query" without exact keyword matching. Web scraping populates these databases by crawling documentation, articles, and product pages, converting text to embeddings, and upserting them. Apify actors automate the fetch-embed-store cycle.

Pinecone for fully managed, easy-to-use semantic search. Qdrant for open-source with strong filtering and hybrid search. pgvector for teams already on PostgreSQL wanting minimal infrastructure. Weaviate for GraphQL queries over embeddings. Chroma for local development. Choose based on scale, query complexity, and whether self-hosting is feasible.

Store source_url and scraped_at alongside each embedding. Schedule Apify re-crawls of changed pages and re-embed only updated content. Use content hashing to skip unchanged pages. Implement a staleness threshold and purge embeddings for URLs not re-crawled within the window. Webhook-driven updates are more efficient than full re-crawl schedules.

Embedding 10 million scraped text chunks with OpenAI text-embedding-3-small costs roughly $10-20. Pinecone storage for 10M vectors runs $70-140/month depending on tier. Self-hosted Qdrant eliminates storage fees but adds server costs. The dominant cost at scale is usually scraping and embedding compute, not vector database storage.