Why Free Web Search and Page Fetching in LLMs Is a Resource Scheduling Decision

    This article explains why making web search and page fetching free in large model services is a resource scheduling strategy rather than charity. It breaks down the retrieval-augmented generation pipeline, analyzes where the real costs sit, and presents five engineering practices—multi-level caching, rate limiting with quota isolation, asynchronous processing and batching, observability, and compliant fetching—along with a reference architecture and common pitfalls to avoid.

    1. The Technical Logic Behind the Free Tier: Repricing, Not Charity

    Making web search and page fetching free in a large model service is essentially a repricing of resource tiers and scheduling policy. To understand why, it helps to look at what actually happens when a user asks a question that requires live information.

    A complete retrieval-augmented generation flow typically follows this chain:

    1. Intent detection: decide whether the question needs external, real-time information;
    2. Query rewriting: turn the natural-language question into a set of search keywords;
    3. Retrieval: query the search capability and get back a list of candidate documents;
    4. Page fetching and content extraction: fetch each candidate URL, remove noise, extract the main text, and normalize encoding;
    5. Chunking and reranking: split documents into chunks, vectorize or rerank by keywords, and select the most relevant passages;
    6. Generation and citation: splice the passages into the context, produce an answer, and attach sources.

    Steps 3 and 4 are the heavy lifting. Fetching has to deal with timeouts, anti-scraping defenses, garbled text, and oversized pages; retrieval has to handle high concurrency and low latency. What they mainly consume is outbound network bandwidth, CPU and memory on the fetching cluster, and a large number of short-lived connections—not the most expensive inference compute. This clears up a common misconception: opening up web access for free does not mean giving away the scarcest inference resources. It means opening up a class of capabilities that can be reused efficiently, cached, and made asynchronous.

    The core tension in the original discussion—“free users consume compute and dilute the paid experience”—can be stated more precisely in engineering terms: different requests have very different resource profiles. Long web sessions, frequent refreshes, and repeated questions generate a lot of low-value duplicate computation, while API-side requests usually carry clear business semantics, predictable concurrency curves, and stronger cacheability. When a platform converges low-value duplicate traffic—through stricter anonymous-call limits or clearer guidance toward task-oriented usage, for example—the freed-up resources can go into improving the throughput and stability of the paid path. This is not a moral question; it is the inevitable result of queuing theory and cost accounting.

    2. Cost Breakdown: Where the Money Actually Goes

    Breaking the chain apart is the only way to know where a free quota should save money.

    • Retrieval and fetching: mostly bandwidth and connection costs; marginal cost drops sharply as the cache hit rate rises;
    • Document processing: content extraction, denoising, and chunking are CPU-intensive, and the results can be reused for a long time;
    • Vectorization and reranking: a batch-friendly workload, suitable for offline precomputation;
    • Generation inference: unit cost is determined by GPU memory and batching efficiency; this is the most expensive segment;
    • Storage and logs: request logs, fetch snapshots, and audit records accumulate continuously and need lifecycle policies.

    The conclusion is straightforward: the parts opened up for free are exactly the parts that are easiest to amortize through engineering. For enterprise users, the real optimization focus is therefore not “eliminating retrieval calls” but accumulating reusable intermediate artifacts.

    3. Using the Free Capability Correctly: Five Engineering Practices

    3.1 Multi-Level Caching: Turn Repeated Calls into Zero Cost

    A three-tier cache is recommended: query level (query → result summary), document level (url → page snapshot), and chunk level (chunk fingerprint → vector and rerank score). An illustrative implementation:

    1. import hashlib, json, time
    2. class TTLCache:
    3. def __init__(self, ttl=1800):
    4. self.store = {}
    5. self.ttl = ttl
    6. def key(self, *parts):
    7. raw = "|".join(str(p) for p in parts)
    8. return hashlib.sha256(raw.encode("utf-8")).hexdigest()
    9. def get(self, k):
    10. item = self.store.get(k)
    11. if not item:
    12. return None
    13. if time.time() - item[0] > self.ttl:
    14. self.store.pop(k, None)
    15. return None
    16. return item[1]
    17. def set(self, k, v):
    18. self.store[k] = (time.time(), v)

    Engineering note: the TTL for document-level snapshots can be significantly longer than for the query level (hours to days, for example), because page content changes far less often than questions repeat.

    3.2 Rate Limiting and Quota Isolation: Don’t Let the Free Tier Drag Down the Main Path

    Treat web retrieval as a degradable dependency: give it its own quota and concurrency cap, and isolate it on the business side:

    1. limits:
    2. search_per_minute: 60
    3. fetch_concurrency: 8
    4. queue_max_wait_ms: 400
    5. fallback:
    6. on_quota_exhausted: use_cache_then_model_only
    7. on_timeout: answer_without_citation

    The key point is that fallback must be defined explicitly: when the quota runs out, do you serve from cache, fall back to model knowledge only, or return “real-time information is temporarily unavailable”? These three strategies map to completely different user experiences.

    3.3 Asynchrony and Batching: Trade Latency for Throughput

    Fetching is naturally suited to asynchronous processing: return candidate titles and links first, complete content extraction in the background and write it to cache, so follow-up questions hit directly. For batch scenarios such as daily report generation or knowledge base inspection, moving fetching and vectorization into an offline queue and decoupling with a message queue can significantly improve overall throughput and smooth out peaks.

    3.4 Observability: Free Does Not Mean Unmonitored

    At minimum, track four metrics: cache hit rate, empty retrieval result rate, the distribution of fetch failure reasons (timeout, encoding errors, being blocked), and end-to-end P95 latency. The hit rate is the north star metric most worth watching, because it directly determines how long your free quota will last.

    3.5 Compliance and Polite Fetching

    Free access does not mean unlimited fetching. Respect the target site’s access rules, set a reasonable User-Agent and rate, prefer publicly licensed or first-party corpora, and apply source attribution and copyright review to fetched content. Enterprise scenarios in particular should retain audit logs to keep non-compliant content out of generated results.

    4. Reference Architecture for Enterprise Deployment

    A robust implementation can be layered as follows:

    • Access layer: an API gateway handles authentication, quotas, and rate limiting;
    • Orchestration layer: task-oriented orchestration (intent detection → retrieval → fetching → reranking → generation) with timeout and circuit breaking;
    • Data layer: object storage holds fetch snapshots, a cache service holds hot results, and logging plus monitoring and alerting handle tracing;
    • Offline layer: a container platform runs batch fetching and vectorization jobs, with elastic scaling for peaks.

    To productize this capability under unified governance, it can be assembled on Baidu AI Cloud from general-purpose cloud product categories: a container platform for fetching and batch processing, object storage for accumulating snapshots, a message queue for asynchronous decoupling, and logging plus monitoring and alerting to close the observability loop. This keeps the cost benefits of the free capability without sacrificing stability or compliance.

    5. Common Pitfalls and Decision Guidance

    • Pitfall 1: free means unlimited. A free quota is essentially a shared pool, and exceeding it inevitably triggers degradation; the right move is to push the cache hit rate high enough.
    • Pitfall 2: retrieval results are always more accurate. Retrieval introduces noise and stale information, so reranking and citation verification are needed.
    • Pitfall 3: putting fetching in the synchronous path. Synchronous fetching exposes long-tail latency directly to users, so asynchrony is almost mandatory.
    • Decision guidance: do caching and rate limiting first, then asynchrony and offline batch processing, and only then consider scaling out. Most teams can cut call volume several-fold in the first two steps alone.

    6. Conclusion

    Making web search and page fetching free is the result of resource profiles being repriced, not a simple giveaway or a betrayal. For developers, the real dividend goes to teams that get caching, asynchrony, degradation, and observability right: with the same free quota, engineering maturity decides whether it is “good enough” or “collapses at the first touch.”