Code Search: How Agents Search Across Snap's Codebase (eng.snap.com)

🤖 AI Summary
Snap has developed a new sharded code search platform designed to enhance its codebase exploration capabilities for AI-driven agents and engineers. Previously reliant on a limited regex tool that couldn't handle the scale of Snap’s extensive codebase, which includes millions of files across thousands of repositories, the new system leverages Zoekt for indexing and enables rapid, up-to-date search queries. This change is significant as it addresses two critical challenges faced by coding agents: identifying the right repositories to edit based on vague prompts and accessing prior solutions across multiple services to avoid redundant work. The newly implemented code search offers two modes: an exact search capable of regex and symbol queries that prioritizes speed and accuracy, and an AI search that interprets natural-language questions by executing multiple exact searches before generating an answer. This design decision intentionally favors performance stability over the speed provided by Retrieval-Augmented Generation (RAG) models, ensuring that agents can access precise information without the risks of incorrect suggestions. By structuring the code search prioritizing functional precision and agent-centric interaction, Snap has created a robust infrastructure that not only serves its current needs but is also scalable for future demands in AI code completion and analysis.
Loading comments...
loading comments...