Sounds like the goal here is to augment search with a sort of query language. One that's more structured than a mere list of keywords?
Ribbing aside, the "rethinking" here sounds a lot like an AI-specific spin on the "bring the code to the data, instead of data to the code" paradigm. I imagine that the same multitenancy caveats of allowing arbitrary user-defined queries against a relational database (execution limits, access controls, etc.) will apply here as well.
SQL was designed with tabular data and a relational model in mind, and free-form documents have neither of those properties. You can shoehorn full-text search functionality into SQL - that's what the likes of MySQL/PostgreSQL/SQLite do - and it's good enough in cases where search isn't a core competency. But it's awkward to use and subject to the limitations of a syntax catered to declarative queries and rigid schemas.
Google Search used to essentially be this, then they had to tack on finnicky AI systems to handling the parsing of unstructured queries, and that was a cost/time sink that swung the pendulum over to fully AI-native search. This is the pendulum swinging back the other way with a new generation of UX designers. And it'll swing back eventually, too.
I found this approach very interesting and was wondering if it could be applied to grep-based search for coding agents to increase speed and reduce LLM turns, but the part im not quite understanding is how the model will know enough about the codebase to construct a complicated multi-stage search pipeline based just on the prompt.
Maybe this is just different from web search, but it seems like the model needs sequential tool calls to know where to look next, and coding agents have already put in a lot of work to encourage parallel tool calling.
Coding agents prefer to do iterative search, I have yet to see them create a complex search script. They try different search cmds in parallel, evaluate their results and then refine or dive deeper.
This approach usually works great but I can see many use cases where a smarter search strategy may make sense especially to optimize context.
Wasn’t there work being done where a model could remove irrelevant context? Maybe these complex search scripts can help the model get the revenant files and then it can remove it.
Yeah I think this maps onto grep-based code search well. Right now agents grep, read the results, grep again, and every hit lands in context. This architecture turns that into one program: fan out the greps, filter and dedupe in the sandbox, hand back only what matters. The "won't know the codebase" worry flips around too. The first program shouldn't be "find the bug," it should be "build me a map" (grep the file tree, import graph, symbols). That needs zero prior knowledge, then the model plans the real search over that map. So it's less about replacing sequential exploration and more about making each grep step way wider without flooding context
Claude code already fans out and sandboxes context by calling sub agents so I'm not sure this approach brings much benefit there. A complex search strategy only makes sense if the search is slow and compute intensive.
It feels like there will be some hard to deal with customer support issues related to limits. The generated Python code is unlikely to always run queries in an optimal way.
Normally you'd tell your customer they need to fix their code if they're doing something inefficient, but here, they didn't write the code and are presumably not expected to understand it.
Sounds like the goal here is to augment search with a sort of query language. One that's more structured than a mere list of keywords?
Ribbing aside, the "rethinking" here sounds a lot like an AI-specific spin on the "bring the code to the data, instead of data to the code" paradigm. I imagine that the same multitenancy caveats of allowing arbitrary user-defined queries against a relational database (execution limits, access controls, etc.) will apply here as well.
I don't understand why you wouldn't simply provide SQL with requisite security precautions. Do you really need more?
SQL was designed with tabular data and a relational model in mind, and free-form documents have neither of those properties. You can shoehorn full-text search functionality into SQL - that's what the likes of MySQL/PostgreSQL/SQLite do - and it's good enough in cases where search isn't a core competency. But it's awkward to use and subject to the limitations of a syntax catered to declarative queries and rigid schemas.
Google Search used to essentially be this, then they had to tack on finnicky AI systems to handling the parsing of unstructured queries, and that was a cost/time sink that swung the pendulum over to fully AI-native search. This is the pendulum swinging back the other way with a new generation of UX designers. And it'll swing back eventually, too.
A duckdb backend that can query something like Sourcebot would be swell.
I found this approach very interesting and was wondering if it could be applied to grep-based search for coding agents to increase speed and reduce LLM turns, but the part im not quite understanding is how the model will know enough about the codebase to construct a complicated multi-stage search pipeline based just on the prompt.
Maybe this is just different from web search, but it seems like the model needs sequential tool calls to know where to look next, and coding agents have already put in a lot of work to encourage parallel tool calling.
Coding agents prefer to do iterative search, I have yet to see them create a complex search script. They try different search cmds in parallel, evaluate their results and then refine or dive deeper.
This approach usually works great but I can see many use cases where a smarter search strategy may make sense especially to optimize context.
Wasn’t there work being done where a model could remove irrelevant context? Maybe these complex search scripts can help the model get the revenant files and then it can remove it.
Yeah I think this maps onto grep-based code search well. Right now agents grep, read the results, grep again, and every hit lands in context. This architecture turns that into one program: fan out the greps, filter and dedupe in the sandbox, hand back only what matters. The "won't know the codebase" worry flips around too. The first program shouldn't be "find the bug," it should be "build me a map" (grep the file tree, import graph, symbols). That needs zero prior knowledge, then the model plans the real search over that map. So it's less about replacing sequential exploration and more about making each grep step way wider without flooding context
Claude code already fans out and sandboxes context by calling sub agents so I'm not sure this approach brings much benefit there. A complex search strategy only makes sense if the search is slow and compute intensive.
i find claude subagents are incredibly slow and the vast majority of that is inference time between tool calls
It feels like there will be some hard to deal with customer support issues related to limits. The generated Python code is unlikely to always run queries in an optimal way.
Normally you'd tell your customer they need to fix their code if they're doing something inefficient, but here, they didn't write the code and are presumably not expected to understand it.
It’s funny how many agentic things decompose into a DSPy RLM with specialized tools, although the tools here do the heavy lifting.
How does this compare to something like cocoindex-code? That indexes your code for semantic searches.
Is there a need for this over simply providing a rich enough search API?
What kind of tool does one use to create flowchart graphics like these?
Perplexity still exists?
It is useful, so yes
[flagged]
Can you please not post AI-generated or AI-edited comments to HN? It's not allowed here - see https://news.ycombinator.com/newsguidelines.html#generated and https://news.ycombinator.com/item?id=47340079. Of course, it's impossible to know for sure what was LLM processed, but your posts are getting classified that way and, on inspection, this does seem justified.
(Your earlier comments were, of course, fine.)