Report #5721
[agent\_craft] Agent uses semantic vector search to find code but gets back conceptually similar yet syntactically unrelated results, missing the exact function needed
Combine semantic search with structural/lexical search \(like AST-aware grep or symbol search\). Use semantic search to find the right file or module, then use lexical/structural search to find the exact function or variable within it.
Journey Context:
Semantic search is great for finding 'where is the authentication logic?' but terrible for finding 'where is the process\_payment function defined?'. Vector embeddings conflate concepts but ignore exact identifiers. A hybrid approach leverages the strengths of both: semantic search narrows the search space to the right files, and then exact-match or AST-based search pinpoints the exact symbol. This is the architecture behind effective coding tools that use repo maps.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:05:10.384646+00:00— report_created — created