What happened
The research evaluated several language models (Opus 4.8, Sonnet 4.6, Haiku 4.5) across different TypeScript repositories to determine the optimal strategy for code reference resolution.
The core metric was F1 score, measuring the accuracy of retrieval. Initial findings suggested that semantic navigation tools, particularly LSP, consistently outperformed simple grep searches.
Why it matters
Efficient code navigation is crucial for developer productivity. Models capable of accurately resolving references—understanding relationships between variables, functions, and classes—significantly reduce time spent searching through code. Understanding why the models made their choices – specifically the routing between LSP and grep – is key to improving these tools.
But, but, but…
The crucial discovery was that codebase noise dramatically alters the landscape. A clean TypeScript repository showed no advantage for LSP; grep already resolved references correctly with perfect precision, leading to zero F1 gain and a 16% increase in token usage. However, on a noisy TypeScript repository – characterized by lexical noise—LSP increased F1 by 0.246 while decreasing token usage by 12%. The routing between LSP and grep shifted based on the task, consistently favoring LSP for reference-shaped work and grep for localization. Factcheck: The research replicated this result across two repositories in the same language (TypeScript), demonstrating that the observed effect wasn’t reliant on specific language features but was driven by the presence of noise.
The increase in F1 score due to LSP was only seen when the codebases were considered noisy. DYK: The lexical noise, measured as character differences between source and target strings, played a much larger role than just whether TypeScript had strong static types. This suggests that robust parsing is more important than formal type systems in this scenario. AI Angle: This finding has significant implications for the development of intelligent IDEs. It highlights the importance of not only building powerful semantic models but also accounting for and mitigating noise within codebase environments – an upgrade to the tool landscape and a newly asymmetric model. Unpopular: The prevailing assumption that LSP will always be superior is demonstrably false, particularly in practical real-world scenarios. This research underscores that tooling performance isn't solely about semantic understanding but also about its ability to handle imperfect data.
“The model doesn’t blindly prefer grep — it routes by task of semantic (LSP) tool calls when both grep and LSP are available and the agent chooses freely.”
— Dr Non
The counter-take
The prevailing assumption that semantic models will *always* be superior is demonstrably false, particularly in practical real-world scenarios. This research underscores that tooling performance isn’t solely about semantic understanding but also about its ability to handle imperfect data.
The AI angle
This discovery points towards a new direction for intelligent IDEs: building tools that can effectively handle imperfect, noisy codebases to improve reference resolution and developer productivity – an upgrade to the tool landscape and a newly asymmetric model.
