$0*FreeAPI
English

A free RAG stack: what to build document search from

Updated 23 October 2026

RAG (retrieval-augmented generation) is a way to make an AI model answer from your documents: first find the relevant fragments, then give them to the model together with the question. Every part of such a system can be built on free tiers.

What RAG consists of

  1. Document parsing — turn PDFs and scans into text.
  2. Embeddings — turn text fragments into vectors.
  3. Vector database — store the vectors and search for similar ones.
  4. Rerank — re-sort the results by relevance.
  5. LLM — writes the answer based on the fragments found.

Free services for each step

StepOptionsLimit
Document parsingOCR.space, Zerodoc, Unstructured25,000 requests / 200 pages a month / 10,000 pages once
EmbeddingsPinecone, Weaviate Cloud, Qdrant Cloud5 million tokens a month / 2,000 a day / built-in models
Vector databaseQdrant Cloud, Upstash Vector, Pinecone1 GB / 10,000 operations a day
RerankPinecone, NeuralDeep500 requests a month / no published quota
LLMGroq, Google Gemini, Mistralsee the cards

Languages other than English

For non-English texts choose multilingual embedding models: for example multilingual-e5 (available in Pinecone and Qdrant), or for Russian the open model USER2, which you can run locally.

Add web search: Tavily and Exa are built for LLMs and return already cleaned text. To load specific pages — Firecrawl.

How to stay within the limits

  • Compute embeddings once and store them instead of recomputing them for every request.
  • Split documents into fragments of 300–800 tokens — that lowers usage and improves accuracy.
  • Give the model the 3–5 best fragments after rerank, not 20 in a row.
  • Keep a backup LLM for error 429 — see the guide on OpenAI alternatives.

More guides