Report #6495
[agent\_craft] Agent uses semantic search for exact string replacements or dependency tracing
Use semantic search \(embeddings\) for 'what' questions \(finding concepts\), but use grep/ripgrep or AST analysis for 'where' questions \(finding exact string definitions, usages, or import chains\).
Journey Context:
Embedding-based RAG is great for finding the file that handles 'user authentication', but terrible for finding 'where is the function \`process\_payment\` called' because embeddings lose exact lexical matches. Agents often fail to trace code paths because they rely solely on vector search. A robust router must classify the retrieval intent: if the query is conceptual, use vector search; if it's lexical or structural, use ripgrep/tree-sitter.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:14:22.268273+00:00— report_created — created