RAG Is Simpler Than You Think
TL;DR Highlight
Start RAG with BM25 and query rewriting; add embeddings only when data shows you need them.
Who Should Read
A backend developer building RAG who is unsure whether to jump straight to a vector DB and reranking.
Core Mechanics
- Jumping to embeddings overcomplicates things
- The author says many teams go straight to embeddings, vector DBs and reranking.
- Users often just want to find the doc on resetting a password.
- Recipe 1 is plain BM25 full-text search
- With Elasticsearch or Postgres full-text search, API cost is zero and latency is under 10ms.
- It needs no chunking or eval setup and has no model deprecation risk.
- It misses synonyms ("car" vs "automobile") and struggles with semantic questions ("How do I...?").
- Query rewriting is easier to fix than embeddings
- An LLM turns messy questions into keyword queries, about $0.001 per query with GPT-4o-mini.
- If results are poor, you edit the system prompt instead of re-embedding.
- Put internal terms (e.g. Atlas) in the prompt so they are kept as exact keywords.
- Pick the embedding approach by data profile
- High churn favors on-the-fly embedding, which adds 200-500ms per query.
- Clear hot docs favor hot/cold tiers.
- A stable corpus above 10K queries per day favors full pre-embedding.
- Model-switch cost differs greatly by approach
- Full pre-embedding of 1M docs costs about $10,000 plus downtime on re-embed, by the author's math at $0.01 per doc.
- Hot/cold tiers cost about $2,000, and on-the-fly costs one line of code.
- Split multi-intent queries into sub-queries
- Break a question like read CSV, clean, plot into 3 sub-queries run in parallel.
- Simple ones use BM25 and only complex ones use an LLM, so cost is $0.002 vs $0.03 without decomposition, 15x cheaper.
- The decision path is BM25, measure, rewrite, then hybrid
- Measure a baseline for 2-4 weeks and stop if users are happy.
- The author's split is 60% full-text plus rewriting, 25% hybrid, 10% full pre-embedding, 5% custom.
Community Reactions
- Practitioner experience backing BM25-first
- Someone with large-scale RAG experience says full-text search is underrated and embeddings overrated.
- They say embeddings lead to re-embedding, reranking and vector search operations burden.
- Opinion: agentic query rewrite on Lucene is the end game
- The commenter says letting the agent query the store iteratively makes capabilities unbounded.
- They argue embeddings stack non-determinism on non-determinism, while lexical search is easier to debug.
- Experience dropping indexing from a coding agent
- Retrieval returned zero results due to a bug for a while and nobody noticed, and things worked better.
- After A/B tests they dropped indexing and rely on grep, though very large codebases may differ.
- Pushback and criticism of the article
- One commenter argues 90% of document RAG projects should use embedding semantic search as the primary method.
- Others say the article reads as AI-written and lists whats without whys.
- Some found the on-the-fly and sparse+dense reranking explanations unclear.
How to Apply
- Audit your search failures by query type
- Within 30 minutes, collect 20 recent failed queries and label them keyword, conversational or internal-term.
- Run the prompt below and eyeball the rewritten queries.
- Put your internal glossary in the rewrite prompt
- List internal framework and service names as do-not-modify keywords in the system prompt.
- Feed rewritten queries to your existing BM25 or Postgres full-text search and compare.
- Run a 2-week A/B test before adding embeddings
- Compare a rewrite group against your current search for two weeks.
- Add hybrid (BM25 top 50-100 reranked by embeddings) only if data shows it is needed.
- Decompose multi-intent queries
- Have the LLM output sub-queries as a JSON list when a question has several intents.
- Call BM25 per sub-query in parallel and merge the results.
Try It
# Paste into Claude or ChatGPT (the article's query-rewriting method as a prompt)
You are a query rewriter for document search. Turn the user's conversational question into BM25 keyword queries.
Rules:
- Remove stopwords (filler like "how do I").
- Add synonyms.
- Split multi-intent questions into several sub-queries and output a JSON array.
- Never modify the internal terms below; use them as exact keywords.
{{internal terms: name - description list}}
Question: {{user question}}
Output: only the JSON list of queries.
Next step: run your 20 failed queries through this, feed the results to your BM25, and check whether results improve.Terminology
Related Papers
FutureBench: A Renewable Framework for Evaluating Knowledge-Context Conflict in LLMs
Adding 'verify and prioritize the passage' to RAG prompts raised false-passage adoption; a knowledge-priority warning fixed it.
Faster Retrieval for Better, More Efficient RAG
Small neural nets learned query routing, hitting the same recall up to 8x faster in IVF search
Memorilla: Latent Semantic Memory for LLMs
Compressing documents into 16 memory tokens beat full-context accuracy on FactKG.
What the Author Wrote, What the Agent Reads: Silent Cue Loss in Enterprise Document Ingestion
Preserving red text and highlights in docx ingestion lifted marked-requirement F1 from 0.150 to 0.690.
Multimodal Reranking Is a System One Decision
One multiple-choice question to a VLM over 16 candidates reranks them, beating a dedicated 2B reranker.
You could have invented transformers from memory
Viewing linear, MLP and attention layers as memory stores: capacity goes ~64 to ~2,700 to over a million
Pointing AI at archives found a forgotten meteorite, lost rhinos, and more
Embedding search plus a cheap filter model surfaced unrecorded events in 400 years of archives
EmbeddingGemma 2: An open, lightweight multimodal embedding model
One open 740M model embeds text, images, audio and video into a single shared vector space