Why I’m Against Claude Code’s Grep-Only Retrieval? It Just Burns Too Many Tokens
Blog post from Zilliz
AI coding assistants such as Claude Code and Gemini CLI have sparked a debate over the effectiveness of their code search methods, with Claude Code relying solely on the traditional grep (literal string matching) method, which some argue is fast and precise but criticized for being inefficient and lacking semantic understanding. Critics point out that grep can result in irrelevant matches, increased token usage, and a lack of context, which hampers workflow efficiency. In contrast, Cursor, another coding assistant, employs a vector search-based Retrieval-Augmented Generation (RAG) approach, yielding more accurate and contextually relevant results while reducing token usage by 40%. In response to the limitations of grep, Cheney Zhang developed Claude Context, an open-source plugin that integrates semantic vector-powered search into Claude Code, enhancing search accuracy and efficiency. This solution, built on open standards, is compatible with other coding platforms like Gemini CLI and Cursor, offering a more effective tool for developers and demonstrating the potential for AI tools that prioritize performance without sacrificing simplicity.