Home / Blog / Explainers

Explainers

Semantic code search vs grep for AI coding agents

Use grep when you know the exact identifier or literal and need every occurrence. Use semantic search when you know what the code does but not what it's called. Agents need both — and a call graph to connect the hit to its callers.

Published September 26, 2026 · 5 min read

What grep is good at

Exact, exhaustive, instant. If the agent knows the identifier rrf_fuse, grep finds every occurrence and misses none. No index, no model, no ambiguity. Finder's guidance tells agents to keep using native exact search for exactly this case.

Where grep fails

Grep can't find "where do we retry failed uploads?" if the code calls it backoff_requeue. It ranks a comment mentioning "token" the same as the function that refreshes tokens. So agents grep, open the top matches, and read until they get lucky.

Semantic search embeds every chunk of code and the question into the same vector space, then ranks by meaning. Synonyms, renames and paraphrases stop mattering.

Why embeddings alone aren't enough

A semantic hit is a starting point. To change it safely the agent needs the callers, the callees and the tests — relationships embeddings don't capture. Finder builds a tree-sitter call graph for 21 languages and expands each hit breadth-first through it, including framework edges for React, Express, Django, Spring and Gin.

Side by side

NeedBest tool
Every use of a known namegrep / ripgrep
"Where is X handled?"Semantic search (finder)
Callers and tests of a symbolCall graph (context)
What breaks if I change itCall graph (impact)
Lines inside a known filefile-finder

Frequently asked questions

Is semantic code search slower than grep?
Per query, yes — Finder's median is under a second versus milliseconds for grep. But it usually replaces several grep-and-read rounds, so the task finishes faster.
Does semantic search work on any language?
Embeddings work on any text file. Symbols and call edges come from tree-sitter for 21 languages including Python, TypeScript, Rust, Go, Java, C/C++, C#, PHP, Ruby, Swift and Kotlin.
Can I filter semantic results?
Yes: kind, language and path filters narrow candidates, e.g. only functions in Rust under src/api.

Put the right code in your agent's context

One command installs Finder and wires it into your harness. Start with 40 free credits.

$ curl -fsSL https://downloads.skillissuelab.com/install.sh | sh