Before you build RAG: five questions that decide success

Most RAG projects do not fail on the vector database. They fail on the questions nobody asked at the start.

Bas GeerdinkNovember 20263 min readBased on our whitepaper

Retrieval augmented generation is a simple idea: instead of hoping a language model remembers a fact, you retrieve the relevant text when the question is asked and put it in the prompt. The model's job shifts from recall to reading, which it does much better. That is why RAG is the default pattern for enterprise AI assistants. It is also why it gets applied to problems it does not solve. These five questions help you avoid that.

Is it really a RAG question?

Write down twenty questions real users will ask. Mark each one as a lookup, an aggregation or a genuinely open question. 'How many contracts expire next quarter?' is a database query: faster, cheaper and more reliable in SQL than through a model that counts retrieved snippets. Only the open questions need RAG.

From practice

In our experience the most common architectural mistake is not a bad vector database. It is building RAG for a question that was really a query.

Can you read your own documents?

Before chunking, documents must become clean text, and real corpora punish naive extraction. Tables flatten into noise, multi column PDFs mix their columns, headers and page numbers pollute every chunk, and slides lose the meaning carried by their layout. Parsing is where most quality is won or lost.

For chunking, start with structure aware splitting of roughly 400 to 800 tokens, and give each chunk a short header with the document title and section. Treat those numbers as a starting hypothesis to measure, not as a best practice.

Do you need a new database at all?

The choice of embedding model matters more than the choice of vector store, and it is harder to change later. Test models on your own data and languages, especially for Dutch content. For many enterprise deployments, vectors inside PostgreSQL with pgvector are sufficient and much simpler than a new system to operate. A dedicated vector database earns its place at tens of millions of chunks, strict latency at high concurrency, or strict tenant isolation.

Who may see what?

Filtering is not a refinement, it is a security boundary. Retrieval must be limited to what the user may see before any text reaches the model. Filtering a generated answer afterwards is not access control, because the content has already left the perimeter.

Also decide early how a document is provably removed from every index, cache and log. The GDPR right to erasure applies to your vector store too.

How will you know it works?

Build an evaluation set from real questions before you tune anything, and log the query, the retrieved chunks and their scores, the prompt, the output, cost and latency. Without that, you cannot debug a single complaint.

Then improve what the numbers show. Combining vector and keyword search, followed by a reranking step, is often the biggest single gain. Instruct the model to answer only from the supplied context and to say so when it cannot. A system that admits it does not know is better than one that fails invisibly.

Key takeaways

  • Map real user questions first. Only open questions need RAG.
  • Invest in parsing and chunking before choosing a database.
  • Apply access rights before retrieval, not after generation.
  • Measure with an evaluation set and log what was retrieved.

Let's discuss your data and AI challenge

A short introduction call, without obligation. You speak directly with the expert.