logoalt Hacker News

OutOfHere07/31/20252 repliesview on HN

How would you use tool-calling to filter through millions of documents? You need some search functionality, whether old-school search or embedding search. If you have only thousands of documents, then sure, you don't need search, as you can feed them all to the LLM.


Replies

kridsdale107/31/2025

I haven’t built either system but it seems clear that tool calling will be ‘O(num_targets * O(search tool))’, while RAG will be ‘O(embed_query * num_targets)’.

RAG looks linear (constant per lookup) while tools look polynomial. And tools will possibly fill up the limited LLM context too.

kfajdsl07/31/2025

You give the LLM search tools.

show 1 reply