Sharing for inspiration: Grep for agentic search was a game changer for us.

Reddit r/AI_Agents News

Summary

Describes improving agentic memory search by incorporating grep-based exact matching alongside vector embeddings, inspired by a paper; achieved significant recall gains in their memory layer.

Early this week we checked "Is Grep All You Need? How Agent Harnesses Reshape Agentic Search", and we are seeing early signs of improvement in our memory layer. We used SQLite plus OpenAI `text-embedding-3-small` vectors at 512 dimensions. And recall wasn't working as expected. Our ranking system used sensible local choices and produced bad global behavior. Before our change, every memory used the same 14-day exponential recency decay: compositeScore = cosineSimilarity * 2 ** (-ageDays / 14) That multiplier crushed old canonical memories. A curated 76-day-old memory, even if it was exactly the thing the agent needed, kept only about **2.3%** of its score. A one-day-old task completion that merely sounded related would outrank it. We also didn't have a minimum similarity floor, so the API always tried to fill the requested limit. And 1,634 rows had been embedded at 1536 dimensions by a custom provider, instead of 512-dimension request. The paper linked has the same shape in Table 1, Sen et al. report overall accuracy on the 116-question LongMemEval-S subset. In the inline result configuration, grep beat vector retrieval for every harness-model pair they tested. Claude Opus 4.6 under Chronos reached **93.1%** with grep versus **83.6%** with vector retrieval. GPT-5.4 under Codex CLI also hit **93.1%** with grep, while vector retrieval was **75.9%**. So we tried it. For our next memory-search architecture we decided to have SQLite for exact witnesses, vectors for semantic recall, and reciprocal rank fusion so the caller sees one list without pretending the scores mean the same thing. Would love to hear what y'all are trying.
Original Article

Similar Articles

Is Grep All You Need? How Agent Harnesses Reshape Agentic Search

Hacker News Top

This empirical study compares grep and vector retrieval strategies in LLM agent workflows, finding that grep generally yields higher accuracy across different agent harnesses and tool-calling styles, with performance heavily dependent on harness choice and context engineering.