Claude Code relies on agentic search through the file system, while Cursor uses semantic code search. Rogut cited Cursor’s reported 24% relative improvement in answer accuracy with Composer and online test results of 2.6% higher code retention in large codebases and 2.2% fewer dissatisfied requests. He described embeddings as cached compute: pay upfront to index code, then reuse that work across agent sessions.
Benchmarking semantic code retrieval on Claude Code
Speaker
Kuba Rogut of Turbopuffer presents at AI Engineer on benchmarking semantic code retrieval in Claude Code and how it compares with grep-based search.
Rogut used a human-labeled benchmark that tracks whether an agent found the files, lines, and symbols relevant to a task. He compared Claude Code out of the box, Claude Code limited to 50-line reads, and that same setup with windowed reads and Turbopuffer semantic search. The read limit helped make differences visible when agents explored long files.
Claude Code’s baseline precision was about 65% for files, 33% for lines, and 43% for symbols. Windowed grep improved precision, and adding semantic search brought file precision to about 87%; Rogut summarized this as reducing irrelevant file reads to roughly one in eight. The baseline found more needed files overall, but line recall dropped, and semantic search and windowed grep had similar recall across tasks.
Across 50 tasks, semantic search performed better on some tasks and windowed grep on others. Semantic search found behavior-related files with different keywords, such as implementations across several ORM libraries. Grep worked well for tracing imports when an early search surfaced the right keywords. Rogut said Claude Code’s results lagged Cursor’s in part because semantic search was an added tool rather than a built-in capability the agent knew when to use.
Rogut defined his approach as vector search using Voyage Code 3 embeddings and Turbopuffer. He found semantic search more effective when code had inline comments that gave chunks useful context, and discussed parent-child representations as a possible way to connect human-readable concepts such as an authentication flow to raw code. He said vector databases can also help with shared knowledge bases and multimodal data that is difficult to search with grep.
Takeaways
- Indexing can pay off when several agents repeatedly search the same codebase, since semantic results can be reused across sessions.
- Use grep and semantic search as complementary retrieval methods: keyword matches help with import tracing, while semantic search can surface related code with different vocabulary.
- Measure retrieval quality at the file, line, and symbol level; a tool can improve precision without increasing recall on every task.
- Inline comments can give embedding models useful context about what a code chunk means.
- Consider vector search when data is shared, relational, or multimodal and local file search is a poor fit.
Mentioned in this talk
Search inside this talk
What was claimed 10
- feature
Turbopuffer: Serverless full-text and vector search database built on object storage
“we’re a serverless full-text and vector search database built from first principles on top of object storage”
YouTube Unverified1 source· Talk
- uses
Cursor uses
Turbopuffer
“indexes codebases into Turbopuffer”
YouTube Unverified1 source· Talk
- usesTurbo Grep uses
Turbopuffer
“upload it to Turbopuffer”
YouTube Unverified1 source· Talk
- usesTurbo Grep uses voyage-code-3
“embed it with the Voyage Code model”
YouTube Unverified1 source· Talk
- integrates withTurbo Grep integrates with
Claude Code
“a simple CLI tool for Claude Code called Turbo Grep”
YouTube Unverified1 source· Talk
- uses
Claude Code uses
Turbopuffer
“It call the Turbopuffer tool, now called ‘tpuffer search’”
YouTube Unverified1 source· Talk
- metricvector search: Windowed grep plus semantic search reached about 87% file precision
“windowed grep plus semantic search reached about 87% file precision”
YouTube Unverified1 source· Talk
- metric
Claude Code: Baseline precision: about 65% file, 33% line, and 43% symbol
“The baseline reached about 65% file precision, 33% line precision, and 43% symbol precision.”
YouTube Unverified1 source· Talk












