Post

Improving search for coding agents

Improving search for coding agents

View tweet on X

Context

Agents are everywhere in software industry now. They are the gateway to accomplishing real work. While the models inside these agents decide what to do, the harnesses in these agents do the work. For example, calling a web_search tool or executing a bash command is done by the harness.

For agents to be effective, the tools exposed inside the harness need to be effective. One such critical tool for coding agents to be effective is the search tool. This tool allows the agent to find relevant context from the codebase so that the agents can modify the code as needed.

This brings us to the work by LightOn team. They released a tool called ColGrep earlier today. This is a Rust-based CLI tool that combined keyword search + semantic search on your codebase.

Claude says…..

ColGrep is a semantic code search tool from LightOn, powered by their LateOn-Code late-interaction retrieval models. It mirrors the familiar grep interface but replaces pure pattern matching with semantic ranking. It runs entirely locally, supports hybrid regex + semantic queries, and plugs directly into Claude Code, Codex, and OpenCode.

Benchmarking

Curious to see if it performs well, I quickly tested in on an ML workspace of 228 indexed files across multiple ML projects.

I would like to capture metrics, for a few queries, across the trifecta - search recall, token efficiency, and latency. Here are the results.

       
Querygrep Matchesgrep Tokensgrep Timecolgrep Matchescolgrep Tokenscolgrep Time
ensemble521,7620.13s153152.45s
preventing overfitting1160.13s152552.06s
learning rate scheduling1140.14s153342.15s
GPU memory optimization1140.13s152452.12s
data augmentation strategies1140.14s153232.09s
TOTAL561,8200.67s751,47210.87s
Use caseToolWhy
Find a specific function, variable, or stringgrepExact match, instant results
“Where does this codebase handle X?”colgrepUnderstands intent, surfaces implementations across different naming conventions
Hybrid: regex filter + semantic rankingcolgrep -ePre-filter with regex, then rank by meaning
Large unfamiliar codebasecolgrepNo need to guess the right keywords

Conclusions

  1. It’s pretty clear that the ColGrep search tool is able to capture intent while grep admittedly cannot. What’s impressive is the speed at which ColGrep operates. This is an insignificant increase in latency for which we are able to see semantically similar results from our search. That’s pretty cool!
  2. Nifty little CLI tools are here to stay. They help agents with specific functionality outside the model layer.
  3. Every great coding agent needs access to a code search tool for retrieval. ColGrep direction is promising as it efficiently packages a great BM25 search with a competent and strong late interaction model for semantic search. This combo is powerful!
This post is licensed under CC BY 4.0 by the author.