Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Sourcegraph 12 min read How-to mediumAdept

How to evaluate Sourcegraph on your own codebase

In a 288-task evaluation of the Sourcegraph MCP server, structured code retrieval raised file-level F1 from 0.091 to 0.240 and recall from 0.120 to 0.272, yet aggregate task completion was effectively unchanged. Cost moved with how hard the work was to localize: 15–51% savings when the baseline agent searched broadly, about $0.15 more when it found the code in seven searches or fewer. Observed search burden in baseline traces, not codebase size, predicted benefit (r = -0.57 across 113 paired tasks). The post gives nine controls for a fair evaluation: pin revisions for parity, strip tasks that name the answer's location, hold the agent constant, run at least three repeats, segment by localization difficulty, and audit actual tool calls. It closes with a CodeProbe workflow for running the comparison on your own repositories.

Related posts

  • Sourcegraph MCP server and a cheaper model beat a Mythos-class model alone

    Sourcegraph easyNovice

    On nine discovery-heavy CodeScaleBench tasks, Claude Sonnet 4.6 using the Sourcegraph MCP server with no source on disk scored a mean reward of 0.698, beating Claude Fable 5 with a full local checkout (0.568) and winning six of nine tasks at $1.02 versus $1.83 per quality point. The gap concentrates on cross-repository discovery such as vulnerability tracing and cross-organization dependency following, while tasks both setups already solve tie and Fable won one cross-org task. The sample is small because Fable 5 access was restricted shortly after release, so it is an early signal: cheaper models with good code retrieval can outperform frontier models on navigation-heavy agent work.

  • Why coding agents fail in large codebases (and what to do about it)

    Sourcegraph mediumAdept

    Across 1,281 scored agent runs on 40+ large open-source repos (CodeScaleBench), coding agents fail in five repeatable ways: getting lost in exploration, picking the wrong file or symbol, partial completion, tool thrashing, and context overflow. Indexed code search with keyword, semantic and find-references tools helps most in the 400K–2M LOC range (+0.259 reward delta) but slightly hurts below 400K LOC (−0.080). In one refactoring task it cut tool calls from 96 to 5. Augmented agents were 30% cheaper and 38% faster on average, which supports the claim that these are context-infrastructure problems rather than model-capability problems. The recommended fixes are structural navigation, hybrid retrieval for coverage, and task-aware context management.

  • Better tools made Copilot code review worse. Here’s how we actually improved it.

    GitHub Engineering mediumAdept

    Swapping Copilot code review's bespoke exploration tools for the shared Copilot CLI tools (grep, glob, view) initially raised review cost and reduced useful comments, because the tool instructions encouraged broad, repo-browsing behavior instead of diff-anchored investigation. Benchmark traces exposed the browsing loop, and rewriting tool guidance around a reviewer's workflow (form questions from the diff, narrow with grep/glob, batch discovery, view only known ranges, recover from failed searches with simpler queries or glob) cut average review cost about 20% in production without a quality regression. The same focused instructions did not help the interactive CLI, so tool prompting must match the product's job.

  • Ghostwriter AI & Complete Code Beta

    Replit mediumAdept

    Replit's Ghostwriter adds AI code completion, generation, transformation, explanation and semantic search to its IDE, with Complete Code starting in closed beta. Completion is built on Salesforce's CodeGen, converted to FasterTransformer and served on Triton, with a 2B model distilled to about 1B parameters and int8 quantization under exploration, for a median latency under 400ms. On the editor side, suggestions are matched against existing whitespace, braces and AST structure, adjusted as the user keeps typing, filtered by heuristics and streamed line by line. Other features use a 'society of models': a fine-tuned CodeBERT embedding model for contextual natural-language code search, and large OpenAI and 100B+ parameter models for explaining, generating and transforming code.

  • Evaluating OpenWiki with WikiBench

    LangChain mediumAdept

    WikiBench evaluates OpenWiki-generated codebase wikis by having a reader agent answer auto-generated coverage and retrieval questions about a pinned repository. Answers are scored against JSON rubrics of expected facts, with LLM judges checking both presence and grounding in pages read, and the wiki score is the mean across questions. OpenWiki 0.3.0 beat 0.2.5 and bare Deep Agents, mainly on coverage questions thanks to added planning. Across models, DeepSeek Flash matched GLM 5.2 at about one-sixth the cost. Giving the reader both wiki and source produced the best scores at lower cost than source alone, while the wiki alone did much worse, so the wiki works best as an index.

The quest for software engineering knowledge.

Look:
Layout: