Repository navigation
Description
Summary
In a live chat on the local install (2026-11-19, deployed commit f98f24e811) the user asked "what's the weather in Riga?". A locally served model called web_search once, then respond. The answer listed four weather sites and contained no weather data.
The model had nothing else to work with: every search result reached it as title + URL only.
Evidence
Observed (live): the web_search call returned 5 results; all 5 had an empty snippet.
Observed (code, origin/main at f98f24e811):
| Where | What |
|---|---|
autobot-browser-worker/playwright-server.js:436 |
const snippet = ''; — the result loop reads the title and the href and hardcodes the snippet to the empty string. Unchanged since cbc60ebccd (2025-08-15). |
autobot-backend/resources/prompts/chat/system_prompt.md:102 |
The web_search parameter list names only query. |
autobot-backend/chat_workflow/tool_handler.py:226 and :2434 |
fetch_full exists in the tool schema and is honoured by the handler, but the prompt never mentions it, so the model cannot know to ask for page content. |
Inferred, not verified: no search provider is configured on this install, so the search fell back to scraping a search engine's result page through the browser worker. This is read off the log line emitted at autobot-backend/services/playwright_service.py:161; the provider configuration itself was not inspected.
Impact
Any question whose answer normally sits in a result snippet (weather, a price, an opening time, a date) produces a list of links instead of an answer. The model is not at fault: it is given no content.
Fix
- Extract the result snippet in the browser worker instead of hardcoding
''. - Advertise
fetch_fullto the model — preferably by generating theweb_searchparameter list in the prompt from the tool schema, so the prompt and the schema cannot drift again (same defect class as bug(chat): the chat system prompt never mentions the page-reading tools — three hand-written browser tool lists, none generated from the tool catalogue #21772).
Acceptance criteria
- The browser-worker search path returns a non-empty snippet for results whose result block has one; a test pins this against a fixture result page.
- A result with no snippet element still returns (empty snippet, no exception).
- The chat system prompt lists every
web_searchparameter the tool schema declares, includingfetch_full, and a test fails when the two diverge. - Host evidence: the same question on the local install returns an answer containing weather data, not only links.
Related
- bug(chat): the chat system prompt never mentions the page-reading tools — three hand-written browser tool lists, none generated from the tool catalogue #21772 (PR test(chat): a held call parks the production graph at one approval (#19951) #21749) adds the page-reading tools to the prompt. That helps the model go and read a page, but does not fix the empty snippet.
- fix(search): rank results by source authority and cite the source of each specific fact #17506 — ranking results by source authority and citing the source of each fact; needs snippet content to exist first.
- agent: wrong specific facts in answers despite correct web_search results (e.g. wrong bus number for directions) — grounding/faithfulness + no authoritative transit source #12508 — grounding of answers in search results.
Activity
fix(search): web_search output reaches the model wrapped as untrusted…
Merge pull request #21888 from mrveiss/issue-21880
github-actions commentedon Nov 19, 2026
Landed in #21888, merge
f559d8c0a7mrveiss commentedon Nov 19, 2026
AC check against
mainatf559d8c0a7(merge of #21888). Three of four ACs have code evidence. This stays open for the host AC. #21888 is not deployed.origin/mainautobot-browser-worker/search-snippet.js:31extractSnippet, called per result atplaywright-server.js:437and returned assnippet(:443). Testthe snippet is read from the ${name} result layout(tests/search-snippet.test.js:25) runs over fixtures for the three result layouts the worker scrapes (:18-22). The fixtures are result blocks, not a whole saved pagesearch-snippet.js:38catch path. Testsa result with no snippet element gives an empty snippet, not an exception(:30) anda snippet element that cannot be read gives an empty snippet(:34)web_searchparameter the tool schema declares, includingfetch_full, and a test fails when the two diverge."{{ web_search_parameters }}(system_prompt.md:102,system_prompt_simple.md:87) fromWEB_SEARCH_SCHEMA(web_search_schema.py,fetch_fullat:16). Teststest_both_prompts_list_every_web_search_parameter_the_schema_declares(tests/test_browser_tool_prompt.py:91),test_a_parameter_added_to_the_schema_reaches_both_prompts_without_a_prompt_edit(:99),test_no_web_search_parameter_is_hand_written_in_the_prompt_files(:115)Remaining: the host check after #21888 is deployed. Ticked 3 of 4.
fix(search): web_search results carry the engine's snippet; the promp…
mrveiss commentedon Nov 20, 2026
Deploy status, 2026-11-20: the local install now runs
13685f3999, which is currentmain. It includes the merges of #21749 (80870f228d) and #21888 (f559d8c0a7), verified withgit merge-base --is-ancestor.Host evidence: none gathered yet. The live chat check is paused until the owner decides how the test logs in, because credentials come only from the secrets manager. No AC is ticked from this deploy.
Remaining: host evidence that web_search results carry snippets on the live install.
mrveiss commentedon Nov 20, 2026
Live check on the local install at
13685f3999, 2026-11-20 21:26–21:35 Riga. One chat session, two turns:navigateto a weather page, thenweb_search.Host AC not ticked. I asked a different question from the one in the AC, so this is supporting evidence only:
web_searchoutput carried snippets. Example: result 1, "Status of Python versions … The main branch is currently the future Python 3.16 …".Remaining: rerun the AC's weather question through
web_search.mrveiss commentedon Nov 21, 2026
Live check on the local install at
7657af8cb986(includes #21911, not #21954), 2026-11-21 11:13–11:16 Riga, chat46a8048a.python.org/downloads/latest, so the snippets now reach the model.Tool web_search: SUCCESS (1.99s).mrveiss commentedon Nov 21, 2026
Live check on the local install at
51c5988f2a3c(includes #21954), 2026-11-21 16:07–16:15 Riga, chatc02e2454. Host AC ticked. "Search the web for the current weather in Riga…" calledweb_search(returned 16:12:00). The answer was "Temperature: 34°F (1°C) to 36°F (2°C) Conditions: Overcast", which is weather data, not only links. All criteria are ticked, so I'm closing this. The duplicate reply in the same turn (a rawrespondTOOL_CALL entry stored next to the answer) is tracked in #21880.