Search, Inspect, Fetch: Exploiting Structure-Aware Boolean Retrieval for Deep-Search Agents
TL;DR Highlight
Boolean field filtering plus section-only fetch cut tokens 20.7–50.6% while raising agent accuracy.
Who Should Read
An agent or RAG developer whose deep-search agent burns context on whole webpages and wants lower token cost.
Core Mechanics
- Whole-page visits are the waste
- Existing Search–Visit puts the whole webpage into context even when one section is relevant.
- Sieve keeps structure through search, card inspection, and section-only fetch.
- Boolean filters pick candidates first
- BQL (Boolean Query Language) applies AND/OR/NOT over fields like title, body, and date to build the eligible set.
- A ranker such as BM25 or dense then only orders that set.
- 25-token snippets are key
- Result cards show the title, section headings, and a query-focused 25-token snippet.
- Removing snippets drops accuracy by 2.9–6.8 points.
- Zero-hit fallback is needed
- Only on zero results does it relax to partial matches, then to full-collection BM25.
- Turning fallback off lowers BCP-S accuracy by 6.4 points.
- Gains hold across agent backbones
Evidence
- Higher accuracy, fewer tokens vs best Search–Visit
- Default Sieve (BM25+Dense) gains +1.6 on HotpotQA, +3.1 on MuSiQue, +0.7 on BCP-S.
- Tokens are 30.4%, 50.6%, and 20.7% lower respectively.
- BCP-S vs BM25 Search–Visit
- Judge accuracy rose from 34.7 to 37.2 (+2.5 points).
- Tokens fell from 68k to 46k.
- Beats the no-BQL Search–Fetch control in all 9 pairs
- With the same rankers and section fetch, accuracy was higher in all nine ranker×collection pairs.
- Snippet and fallback ablations (BCP-S)
- Without snippets, accuracy drops from 37.2 to 30.4.
- Strict Boolean without fallback scores 30.8.
How to Apply
- Add section-level return to your fetch tool
- Today, split your visit tool output by heading and return only the list of section names first.
- Return body text only when the agent names a section.
- Put headings and a short snippet in result cards
- Show the title, section headings, and a 25-token snippet around query terms in each result.
- Do not include the full body.
- Open field and Boolean filters in your search tool
- Add parameters for title, body, and date fields with AND/OR/NOT.
- Run your existing ranker only inside the filtered set.
- Implement a fallback for zero-hit queries
- Only when the filter returns zero results, relax to partial matches, then to full BM25 ranking.
- Keep the constraints intact for queries that return results.
Try It
# Paste into Claude or ChatGPT — a simplified version of the paper's Search–Inspect–Fetch method
You are a research agent. Follow the rules below to answer {{질문}}.
Rules:
1. Search: pick only matching candidates from the document list below. First write an explicit query with field conditions (title/body/date) and AND/OR/NOT.
2. Inspect: for each candidate, look only at the title and section headings and decide which section to open. Do not ask for the full body.
3. Fetch: name the exact section and read only that. Never guess a section name.
4. If there are zero results, loosen the conditions one at a time and rewrite the query.
5. Output the shortest answer copied verbatim from the evidence.
Document list (title / section headings):
{{문서}}
Next to try: ask the same question with the full documents pasted in and compare token counts and answers.Terminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.
Related Resources
Original Abstract (Expand)
Existing deep-search agents use a Search-Visit workflow that retrieves whole webpages without considering the structure they expose through titles, headings, sections, and metadata. This prevents agents from directly constraining retrieval to parts of a webpage and often carries irrelevant content into their context. We introduce Sieve, a search-inspect-fetch strategy driven by a Boolean Query Language (BQL): it searches webpage fields to filter candidates, uses an interchangeable ranker to order them, presents structure-rich result cards for inspection, and fetches only selected sections. Across three QA collections, Sieve is more accurate than the strongest conventional Search-Visit configuration on each collection while using 20.7-50.6% fewer tokens. Boolean filtering improves every tested ranker, and the accuracy-context advantage persists across retriever choices and agent backbones. Our implementation is included in the SkimSearchAgent library https://github.com/ielab/skim-search-agent.