Deep Search: AI-Powered Code Search for Complex Codebases
Blog post from Sourcegraph
Sourcegraph's Deep Search is an AI-driven tool designed to provide synthesized answers to complex codebase inquiries by leveraging an agentic retrieval pattern similar to those used by Gemini and ChatGPT. Unlike traditional code search, which requires exact queries and returns a list of matching files, Deep Search processes natural-language questions, conducts multiple targeted searches, and delivers explanations grounded in specific files with inline citations. This iterative method is particularly valuable in software engineering contexts, where understanding how systems work often involves reading across multiple files and repositories. Deep Search's application in codebases enables faster onboarding for new developers, efficient cross-repository investigations, and streamlined support for non-engineering teams by reducing the time spent on manual exploration. It operates within private code repositories, utilizing tools like regex search, symbol lookup, and Git history to construct answers that are contextually informed and verifiable. While sharing the agentic approach with web research tools like Gemini and ChatGPT, Deep Search is distinct in its focus on comprehensively navigating code environments, thus addressing the unique challenges associated with large and complex engineering systems.