// Is Grep All You Need? // Pay attention to this, AI devs. (bookmark it) They find that grep-style text search, when wrapped in the right agent harness, matches or beats embedding-based retrieval on coding-agent tasks. Are vector databases even needed where this is all going? It might be that what coding agents needed was not better embeddings. It was a better harness design around primitive tools. If you operate a coding-agent stack that depends on a vector DB, it might be time to re-evaluate. My personal experience on this has been that agentic search, if done right, is more than good enough for a lot of use cases. But you also have to understand how to properly index and structure information for the agents to take advantage. At scale, vector databases do shine, so take that into account as well. In most cases, a hybrid approach often works best, but that's something we haven't figured out really well as of yet.
In the end, it's just a search/retrieval problem. Vector search is just one candidate algorithm among many algorithms we can implement. Each algorithm has its own strengths and weaknesses.
Isn’t that why multi indexing RAGs are the answer?
A developer asking 'find the function that validates user permissions' won't match with grep on 'validate' or 'permissions' if the function is named 'checkAccess.' Embeddings handle semantic variation. The paper's finding is for coding-agent tasks, not all retrieval tasks. The hybrid approach (grep for exact, embeddings for semantic) is the pragmatic path. The 'haven't figured out really well' is honest.
We will see such endless discoveries. I think the fundamental problem relies on how we choose to solve them. Attempts like these are a must for us to rationalize our choices, so that is great. The majority of data-related problems pre-date the current explosion, but what was lost was an understanding of the reasons behind such structural shifts. We never shape data and process. Instead, we structure processing and fit data to efficient structures. AI is forcing us to look back at practices we may have abandoned. So, every time you see someone claim this structure is better than that one, the question that is often silently ignored is: for which processing problem? We never stopped to ask: how does the AI actually use it? And what was the core limitation that forced us to morph and invent these retrieval methods in the first place? Maybe asking these questions will force a structured evolution of bridging AI's gaps systematically, rather than relying on trial and error or based on hearsay, just as it did for other domains, such as Relational versus NoSQL, or row-based versus columnar storage.
I agree that grep-style search can be very effective for coding-agent harnesses and local agentic search. But I don’t think this should be framed as a novel thing. Even the paper itself is more careful: it evaluates long-memory conversational QA, where literal evidence spans matter a lot. In RAG, hybrid retrieval combining vectors and BM25 or other lexical methods has been a known pattern for years - so I'd say yes, we actually figured that part out :) Grep is a great fit for local, literal tasks like coding, where symbols, paths, errors and function names matter. But for RAG at scale, especially in domain-heavy systems, the baseline is rarely pure vector search.

Paper: https://arxiv.org/abs/2605.15184 Learn to build effective AI agents in our academy: https://academy.dair.ai/