Urgent.News

What's breaking now, across thousands of outlets.

Tech

Stop Letting Your Coding Agent Blindly Grep Decoy Files: Raw Grep vs. a 0-Token AST Dependency Map (3.15x Faster)

๐Ÿ’ก AI Labo Benchmark Series โ€” Experiment E09 (Guides & Context Hygiene) This post is part of our empirical benchmark series testing AI coding agent harness patterns inside network-isolated Proxmox VMs against a hidden 20-case grading suite. ๐Ÿš€ View All 41 Benchmark Results & Master Ranking ๐Ÿ›ก๏ธ Read How Our Proxmox & systemd Anti-Cheating Sandbox Works Metadata & Experiment Identity Experiment ID:โ€ฆ

In a benchmark experiment, researchers tested two approaches for AI coding agents to explore codebases: raw grep exploration and a 0-token AST dependency map. The experiment involved an 8-module multi-tenant API quota & billing repository, which contained both active pipeline modules and legacy decoy modules.

Mode A, raw grep exploration, involved the agent performing standard repository-wide grep and iterative file inspection across matching modules. This resulted in the agent reading 5 files, including 3 decoy files, and taking 42.30 seconds to complete the task. Mode B, the 0-token AST dependency map, pre-scanned the codebase using a Python ast.parse() call to extract function signatures, constants, and the live call chain into an 11-line AST mini-map.

This approach resulted in the agent reading only 3 files, eliminating all decoy file reads, and taking just 13.45 seconds to complete the task.

Key findings included a 66.7% reduction in LLM calls (from 3 to 1), a 59.1% reduction in input tokens (from 9,508 to 3,893), and a 63.0% reduction in API cost (from $0.0259 to $0.0096). The experiment demonstrated that using an AST dependency map before calling the LLM can significantly improve the efficiency and effectiveness of AI coding agents when working with complex codebases that contain both active modules and legacy decoy modules.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

Request IDs vs Correlation IDs: Never Get Lost in Distributed Logs Again

A Request ID is a unique string assigned to a single incoming HTTP requestโ€”a digital message sent over the internetโ€”as soon as it arrives at a server.

  • Request IDs uniquely identify each HTTP request at the server level
  • Correlation IDs link operations across multiple services in a transaction
  • They help engineers trace data flow and resolve production incidents

More from Wednesday 18 November โ†’