You tuned chunking, added a reranker, and swapped embeddings, but RAG still misses on short or conversational questions. The reason is often the query itself. Here is how query rewriting, multi-query, HyDE, and expansion fix retrieval at the query side, and how to measure
Plain RAG embeds chunks that have lost their document context, so 'revenue grew 3%' matches nothing useful. Contextual retrieval writes a short per-chunk context and prepends it before embedding and BM25. Here is the method, the build, and the honest ingest trade-off.
Now that 1M-token windows ship at flat pricing, should you stuff the whole corpus in one prompt or build a retrieval pipeline? This breaks long context vs RAG into reproducible per-query cost math, the recall limits of big windows, and four variables that decide it.
Vector search nails meaning but misses exact tokens like SKUs, error codes, and function names. Hybrid search adds a BM25 keyword leg and fuses both with Reciprocal Rank Fusion. Here is when each wins and how to wire it in n8n with Qdrant or pgvector.
Your RAG pipeline feels okay, but no number says if retrieval is good. This is the reproducible scorecard: context precision and recall for retrieval, faithfulness and answer relevancy for generation, scored 0 to 1 with Ragas, plus which metric to read when an answer is wrong.
RAG reranking re-sorts the chunks you already retrieved so the best one rises to the top, but it cannot recover a chunk you never retrieved. Here is what a cross-encoder reranker actually does, when it is worth the latency and cost, the real 2026 options (Cohere, Voyage, BGE),
When your n8n RAG chatbot returns wrong answers, the fix is retrieval, not the model. This guide walks 6 fixable causes: chunking, overlap, top-k, embeddings, metadata filtering, and reranking.
RAG chunking strategies decide whether the right passage is whole, findable, and small enough to rank before your model sees it. Here is how fixed, recursive, and semantic splitting differ, what chunk size and overlap to start with, why the public benchmarks disagree, and a
Your n8n RAG bot keeps answering with the wrong client's file. That is not a weak model, it is a missing filter. Here is the two-step metadata plumbing (Default Data Loader on insert, Metadata Filter on retrieval) for PGVector, Qdrant, and Supabase.
Compare pgvector, Chroma, and Qdrant for local RAG pipelines. Get the three-line decision: already on Postgres, use pgvector; prototyping locally, use Chroma; need scale or heavy filtering, use Qdrant.
A context window is the token budget for one request, and input plus output share it. Bigger windows hold more text but do not read it all equally: the lost-in-the-middle effect means facts buried mid-context get recalled worse. Here is how tokens, limits, and placement actually
You assumed more embedding dimensions mean better retrieval, and you are about to over-pay on vector storage for a margin you will never notice. OpenAI's own numbers show text-embedding-3-large at 256 dims beating ada-002 at 1536. Here is what dimensions cost and how to pick a