HeadlinesBriefing favicon HeadlinesBriefing.com

Avoid RAG Over-Engineering: Start Simple

Hacker News •
×

Most teams over-engineer their RAG stack by jumping straight to embeddings and vector databases, when users simply want to find specific documents. Before choosing an architecture, consider five key factors: data freshness, corpus characteristics, query patterns, scale, and team capabilities.

Start with BM25 and full-text search (Elasticsearch, Postgres). This approach has zero ML complexity, costs nothing per query, runs under 10ms, and is easy to debug. It handles many use cases effectively without chunking strategies or evaluation overhead. The main limitation is missing synonyms and failing on semantic queries.

For keyword-heavy queries with exact matches and proprietary terminology, BM25 is ideal. When users write conversational queries, use an LLM to rewrite them into clean keyword searches. This costs ~$0.001 per query and allows rapid iteration via system prompt adjustments.

With embeddings, poor results require re-embedding the entire corpus and regression testing. With query rewriting, fix issues by adjusting the system prompt and test immediately. Start simple and only advance when you have data proving you need more complexity.