ORIGINAL REDDIT POST

Searching & Scraping

I am trying to automate some “fact answer and verification”, where given a search, find some number of sources, pull referenced pages, extract results,and rank multiple sources based on the site reputation. For example, let’s say for sport S, who won X vs Y…

Original postr/LocalLLaMA

I am trying to automate some “fact answer and verification”, where given a search, find some number of sources, pull referenced pages, extract results,and rank multiple sources based on the site reputation. For example, let’s say for sport S, who won X vs Y on date Z. Or what movies were nominated/won for award A in year Y. That sort of thing. This is straightforward in many cases and individual cases could be automated with a custom script. But let’s say for some particular fact list the results aren’t indexed. I wanted to have an agent basically do what a human would do, “following leads”, and essentially exploring and navigating to wherever was necessary. I got this to work using Claude when the sources were “open”, but it refused to crawl anything where robots policy denied access. I’m not doing bulk robot operations, it’s low-rate/low-traffic web use like what a human would do, so I’m not feeling the robots policies really apply. So I turned my attention to local models, and have qwen running on a strix halo under llama-swap. Not quite sure what the best flow here is; should I build a custom agent loop and give it tool access and a sandbox, and task it to curate a library of “scraper tools” as needed to answer questions? Or should I just use existing bulk crawl/scrape tools (I’m not familiar with these) and then try to pluck the results from the file tree? I’m running completely async and distributed, based on a queue, so this isn’t a “run inside Hermes” type situation. Speed isn’t a major priority, but accuracy is. These are such majorly different architectures that I figured I’d ask for advice before diving in. I have no experience with scraping results off the web, and all the advice I’ve seen is for the “pre-AI” era. Thanks for any suggestions!

Collected discussion

5 comments

u/ChauKingy

For your setup, go agent loop, not bulk crawl. Bulk crawl is when you grab everything from a domain, and you want the opposite, targeted follow the lead retrieval where the agent picks the next hop. Give it search + fetch + extract as tools and let it loop One thing that helps accuracy a lot: have those tools return structured json, not raw html, ptherwise your model wastes context chewing through nav bars and cookie banners before it even gets to the facts The robots refusal you hit is a general agent framework thing. Scraping APIs don't have that gate. I work on one that ships an MCP server, so you can plug the scrapers straight into your agent as tools instead of building your own, probably the relevant bit for you since you're on local models one tip since you're queue based: cache and dedupe by canonical url. Fact checking hits the same sources over and over, no point re-fetching

u/flock-of-nazgulsOP

Great info. Should I save off any intel for later re-queries or related queries, or just let it choose each time fresh?

u/ChauKingy

Save it. Most facts don't change, so re-querying fresh every time is just wasting cycles hitting same sources again I'd keep two things. A cache of the raw pages by canonical url, and a separate store of the actual extracted facts with the source and a timestamp

u/scottgal2

I had a play with this a while ago https://mostlylucid.net/blog/doomsummarizer-deep-research It's QUITE A LOT to do it ffectively with local models as you have to be aware of context and theres a ton of corpus management (freshness, contradiction detection etc..etc..) all aimed at reducingthe segments passed to the local model for salience so the small context window doesn't compress away nuance.

u/Sevealin_

SearXNG + Firecrawl for fully local search. Works my Hermes agent pretty well.

Searching & Scraping