3 ms·
How do you use AI to grep?
by normie3000 2y ago
How do you use AI to grep?
- kmac_ 2y agoGrepping is an oversimplification: I ask for specific use cases, for listing all code paths that perform some action, etc. It works really well.
- aeonik 2y agoHow though? Do you setup RAG for this? Large context window? What do you use?
- kmac_ 2y agoI started with Repomix as an MCP server plus system prompt to reduce the scope to single packages. However, it still consumed too many tokens (and polluted the context with useless information). I used Gemini, context size wasn't an issue, but it was too expensive. Now I just use Cursor, it has built-in indexing with embeddings (I assume).
- jey 2y agoTry Claude Code. It’s perfect for this type of use case.
- DrFalkyn 2y agoMaybe for translating a natural language query into a regular expression that can be ingested by grep.
- DonHopkins 2y agoOh god no. Then you have three problems: ai, regular expressions, and your original problem.