What I haven't seen suggested though, is the built-in spotlight. Press CMD+Space, type some unique words that might appear in the document, and spotlight will search it. This also works surprisingly well for non-OCRd images of text, anything inside a zip file, an email, etc..
Ask HN: I have many PDFs – what is the best local way to leverage AI for search?
31–40 of 92 posts
Re: Ask HN: I have many PDFs – what is the best local way to leverage AI for search?
#32Paperless supports OCR + full text indexing: https://docs.paperless-ngx.com/ As far as AI goes, not sure.
Re: Ask HN: I have many PDFs – what is the best local way to leverage AI for search?
#33You don't. You use a full-text indexer and normal search tools. A chatbot is only going to decrease the integrity of query results.
You wouldn't use a chatbot for the same query you'd use normal search tools for (and on a side note your answer would be much more useful with an example of what those tools would be, it's not really actionable). A vague natural language question over data whose structure you haven't fully understood using terms that might be inexact is not as likely to provide good results with normal search tools as with an llm bas…
opensource, local, yada yada, almost zero configuration (just add folders, run indexer, wait).
Re: Ask HN: I have many PDFs – what is the best local way to leverage AI for search?
#34Re: Ask HN: I have many PDFs – what is the best local way to leverage AI for search?
#35You don't. You use a full-text indexer and normal search tools. A chatbot is only going to decrease the integrity of query results.
Do keyword search systems have workarounds for this? My own idea was for each keyword to generate a list of neighbor keywords in semantic space. I figured with such a dataset, I'd get something approximating vector search for free.
I made some attempts at that (found neighbors by their proximity in text), but I ended up with a lot of noise (words that often go together without having the same meaning). So I'd probably have to use actual embeddings instead.
More generally, any suggestions for full-text indexing? Elasticsearch seems like overkill. I built my own keyword search in Python (simple tf-idf) which was surprisingly easy. (Long-term project is to have an offline copy of a useful/interesting subset of the internet. Acquiring the datasets is also an open question. Common Crawl is mostly random blogs and forum arguments...)
Re: Ask HN: I have many PDFs – what is the best local way to leverage AI for search?
#36RAG cli from llamaindex, allow you to do it 100% locally when used with ollama or llamacpp instead of OpenAI. https://docs.llamaindex.ai/en/stable/getting_started/starter...
llamaindex has an horrible API, very poor docs and is constantly changing. I do not recommend it.
Re: Ask HN: I have many PDFs – what is the best local way to leverage AI for search?
#37You don't. You use a full-text indexer and normal search tools. A chatbot is only going to decrease the integrity of query results.
What does that even mean. When you know the exact keywords then you use full-text.
When you don't know them then other tools can be helpful.
Re: Ask HN: I have many PDFs – what is the best local way to leverage AI for search?
#38Re: Ask HN: I have many PDFs – what is the best local way to leverage AI for search?
#39If you’re having trouble thinking of search terms to plug into HoudahSpot (or grep etc.) then I suppose you could ask a chatbot to assist your brainstorming, and then plug those terms into HoudahSpot/grep/etc.