Skip to content

Compare several independent sites in one web_search - #34

Draft
devbadya wants to merge 2 commits into
mainfrom
cursor/compare-several-sources-in-web-search-ab70
Draft

Compare several independent sites in one web_search#34
devbadya wants to merge 2 commits into
mainfrom
cursor/compare-several-sources-in-web-search-ab70

Conversation

@devbadya

@devbadya devbadya commented Aug 26, 2026

Copy link
Copy Markdown
Owner

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_search now takes the shape weather already had: the work happens in the tool, not in the conversation.

What one call does

  1. Searches, asking for more candidates than it needs.
  2. Picks up to four results from different sites (siteOf reads investor.nvidia.com and nvidianews.nvidia.com as one site, and bbc.co.uk and theguardian.co.uk as two).
  3. Reads them in parallel through the same reader read_page uses. No new endpoint, no proxy, no server.
  4. Returns one brief under 4,000 characters, with what the sources agree and disagree on.

Run against the live web from the page itself:

Searched 2026-08-26 for "nvidia latest quarterly revenue" — 4 sources
2. NVIDIA (NVDA) Revenue 2005-2026 (stockanalysis.com)
   https://stockanalysis.com/stocks/nvda/revenue/
   NVIDIA had revenue of $81.62B in the quarter ending April 26, 2026, with 85.23% growth. This
   brings the company's revenue in the last twelve months to $253.49B, up 70.68% year-over-year…
4. Nvidia Earnings 2026: $81.6B Record Quarter (tech-insider.org)
   https://tech-insider.org/nvidia-earnings-81-billion-quarter-2026/
   The chipmaker posted $81.6 billion in revenue for its first quarter of fiscal 2027, up 85% year
   over year, with data center revenue alone reaching $75.2 billion…
Agreed across sources: "NVIDIA" in 2/4; "2026" in 2/4

Decisions worth reviewing

  • Wikipedia is held back, not preferred. Its extract is a paragraph where a results page gives a line, so in rank order it decides every answer by itself, and a mirror of it is not a second opinion. It is a way to have two readings instead of one, and is dropped once two independent sites have answered. The Wikipedia provider keeps returning the article list it always did — one encyclopedia cannot be several independent sources.
  • Each page is read from its first real sentence. This is the change that mattered most, and it came out of running the thing: read from the top, un.org spent the whole 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. A page with no sentence in it at all — a price grid — is read from the top, because that is what it says.
  • The comparison is deterministic, for the reason weather.ts reconciles 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.
  • A dead link costs one source, not the brief. allSettled, with a fallback to the search snippet, labelled snippet only. Exercised for real: britannica.com answers the reader with a 403, and the brief kept it as a snippet rather than failing.
  • Naming both figures is not disagreeing. A disagreement is reported only when a site names a value and not the one the others agree on; a single unchallenged reading is reported as nothing.
  • LangSearch summaries are back on, capped at 800 characters. They were off because each is a whole page; capped, they let that provider compare sites on the one request it was already spending, off the reader's 20-per-minute budget.
  • Every source keeps its own URL on its own line, because that is what reviewAnswer grounds a citation against and what splitSources turns 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-question and lookup-term exemplars teach reading the brief: state the consensus, name the site that disagrees, cite more than one URL.
  • README: new "Comparing several sites in one call" section, plus the Tools table, the provider notes and "What leaves the browser".

Verification

pnpm check and pnpm build pass; 941 tests, 35 of them new. Both searches above were run through import('/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.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 26, 2026 10:18
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants