Compare several independent sites in one web_search - #34
Draft
devbadya wants to merge 2 commits into
Draft
Conversation
A search returned a title, a URL and one line each, and left the model to open the promising ones and notice where they disagreed. A 0.8B model spends its whole tool budget there. web_search now searches, picks up to four results from different sites, reads them in parallel through the same reader read_page uses, and returns one brief under 4,000 characters. Wikipedia is held back unless nothing else can be read: its extract is a paragraph where a results page gives a line, so in rank order it decides every answer by itself. What the sources agree and disagree on is worked out deterministically, as weather.ts reconciles three forecasts rather than asking the model to. LangSearch sends its own text with each result, capped, so that provider compares sites on the one request it was already spending. Co-authored-by: Sebastian <devbadya@users.noreply.github.com>
Verified against the live web, the extracts were menus. un.org spent the whole 700-character budget on "Skip to main content · Welcome · English Français · Home · Biography", and the paragraph naming the office holder never reached the model. A menu is a list of labels and carries no sentence, so the lead now starts at the first line that ends one and stops at the heading after it. A page with no sentence in it at all is read from the top, because that is what it says. Flattened table rows are skipped for the same reason. The same run showed Wikipedia padding a brief that already had independent sources, which is what the change was meant to stop: an encyclopedia is now a way to have two readings instead of one, and is dropped once two independent sites have answered. Co-authored-by: Sebastian <devbadya@users.noreply.github.com>
This was referenced Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A search returned a title, a URL and one line each, and left the model to open the promising ones and notice where they disagreed. A 0.8B model spends its whole tool budget there — the recorded failure is four searches in a row, none of them read.
web_searchnow takes the shapeweatheralready had: the work happens in the tool, not in the conversation.What one call does
siteOfreadsinvestor.nvidia.comandnvidianews.nvidia.comas one site, andbbc.co.ukandtheguardian.co.ukas two).read_pageuses. No new endpoint, no proxy, no server.Run against the live web from the page itself:
Decisions worth reviewing
Skip to main content · Welcome · English Français · Home · Biography, and the paragraph naming the office holder never reached the model. A menu is a list of labels and carries no sentence. A page with no sentence in it at all — a price grid — is read from the top, because that is what it says.weather.tsreconciles three forecasts in code: a generation spent grading four extracts is the capacity the answer needed. Names and figures are all a rule can honestly compare, so they are all it claims to have compared.allSettled, with a fallback to the search snippet, labelledsnippet only. Exercised for real:britannica.comanswers the reader with a 403, and the brief kept it as a snippet rather than failing.reviewAnswergrounds a citation against and whatsplitSourcesturns into pills.Cost
A DuckDuckGo or Jina search now spends up to five of the reader's 20 requests a minute instead of one. Called out in the provider note under Tools → Web access.
Also changed
research-questionandlookup-termexemplars teach reading the brief: state the consensus, name the site that disagrees, cite more than one URL.Verification
pnpm checkandpnpm buildpass; 941 tests, 35 of them new. Both searches above were run throughimport('/src/tools/search-brief.ts')in the DevTools console of the dev server, which is the only way to prove the requests survive CORS from a page. No model generation was tested — this VM has no GPU adapter.DevTools console showing the multi-source brief for the UN question, with Wikipedia excluded and one source kept as snippet only
DevTools console showing a four-source brief with real revenue figures from four independent sites
Tools panel Web access section with the updated explanation and provider note
To show artifacts inline, enable in settings.