State-Gated Retrieval (SGR)
- State-Gated Retrieval (SGR) is a method where answer-bearing evidence is revealed through specific configurations of website controls such as filters and view modes.
- SGR-Bench evaluates this approach using curated tasks across diverse domains, measuring extraction accuracy and state maintenance via metrics like Item-level F1 and Row-level F1.
- Empirical results show that even the strongest systems face challenges in multi-step state management, highlighting the need for improved joint modeling of interface states.
State-Gated Retrieval (SGR) denotes a retrieval setting in which answer-bearing evidence is not directly exposed at a website’s default entry state, but becomes accessible only after an agent establishes the correct site-specific retrieval state through operations such as filters, view modes, hierarchy selections, time scopes, or query-field settings. In this formulation, retrieval is gated by navigational and configurational state rather than by source discovery alone, and successful performance requires discovering the appropriate website, manipulating its controls into the correct state sequence, and extracting a structured answer under that state (Li et al., 21 May 2026). Related 2026 work uses analogous state-conditioned retrieval ideas in other contexts, including hidden-state-gated retrieval loops in RAG pipelines and state-grounded skill retrieval for web agents, but these operate over different state spaces and different retrieval targets (Wei et al., 17 Apr 2026, Li et al., 3 Jun 2026).
1. Formal definition and problem structure
In the formalization introduced for SGR, let be a specialized “expert” website, and let its retrieval state be , where the state comprises the site-specific controls currently in force. The visible content under that state is denoted by , representing the entries, result-page content, or table rows exposed under . The default state is , and under the answer-bearing evidence for the correct answer is hidden. A successful SGR trajectory is a sequence of state-setting operations such that
Given a natural-language question 0 that does not name 1 explicitly, together with an output schema, an SGR agent 2 must infer the correct website 3, find a sequence of operations mapping 4 so that the union of views exposes 5, and extract and format the structured answer 6 in the prescribed schema (Li et al., 21 May 2026).
This definition separates SGR from ordinary document retrieval and from generic web navigation. The central difficulty is not merely locating a relevant source, but discovering and preserving the site-specific retrieval state that unlocks the relevant evidence. A plausible implication is that classical retrieval abstractions that treat retrieved content as independent of interface state are incomplete for this class of tasks.
2. Dataset design and task formulations
SGR-Bench operationalizes this setting as a benchmark of 100 expert-curated SGR problems spanning six high-level source families and 12 public data ecosystems. Each underlying problem appears in two prompt variants, yielding 50 paired comparisons between a constraint-guided formulation and a goal-oriented formulation of the same information need. Every task requires an ordered table of rows with a fixed schema; answers range from 2 to 44 rows, with mean 7 and median 4 (Li et al., 21 May 2026).
| Source family | Tasks |
|---|---|
| Environmental monitoring | 24 |
| Regulatory resources | 22 |
| Scholarly archives | 18 |
| Life-science resources | 18 |
| Official statistics | 12 |
| Vulnerability databases | 6 |
The paired prompt design is central to the benchmark. In the constraint-guided variant, the prompt explicitly decomposes the retrieval into steps, such as applying a filter, extracting a table, or cross-referencing with another source. In the goal-oriented variant, the same information need is presented without specifying the sequence of controls. This permits controlled comparison between explicit and implicit guidance for state-gated retrieval.
The benchmark also constrains tool access. Agents receive only generic tools: a web-search interface, a webpage fetch command, and a PDF reader for PDF documents. No task provides the site URL. Agents must therefore discover the website through search, navigate the relevant controls, and extract all required rows and fields while respecting the active retrieval state. This design isolates the state-establishment problem rather than assuming privileged access to the target source.
3. Evaluation protocol and empirical difficulty
SGR-Bench evaluates both retrieval correctness and schema-faithful structured extraction. Raw outputs are first canonicalized by reviewers to normalize trivial differences such as whitespace, date formats, and abbreviations, while disallowing factual corrections or hole-filling. Predictions and references are then parsed into aligned row sequences, using a task-specific key for row matching. Three metrics are reported: Item-level F1 over aligned field-slots, Row-level F1 over rows whose fields all match, and Pairwise Order Accuracy (P.O.A.) over shared row keys (Li et al., 21 May 2026).
The benchmark was used to evaluate eight CLI-based agentic LLM systems and three commercial search-agent products. The CLI systems included GPT-5.5, Claude Opus 4.7, Gemini 3.1 Pro, Qwen 3.6-Plus, GLM 5.1, Seed 2.0 Pro, Kimi K2.5, and DeepSeek V4 Pro. The commercial products were Google Search AI Mode, Gemini Deep Research, and OpenAI Deep Research.
The headline finding is that performance remains limited even for the strongest systems. The strongest system reaches only 66.18% item-level F1, while row-level F1 remains much lower; the detailed summary reports that strongest systems reach only 8 Item-F1 but much lower Row-F1 (9 max), leaving a 20+ point gap. Constraint-guided prompts help locate individual fields, with +0 points Item-F1, but do not eliminate state-maintenance errors. This pattern indicates that partial local correctness is substantially easier than globally correct retrieval-state management and row-complete extraction.
4. Failure modes and diagnostic interpretation
A manual audit of 156 analyzable failed CLI trajectories assigns each failure a single primary root-cause label. Two categories dominate: Retrieval-Scope Drift and Criterion Mismatch. Retrieval-Scope Drift occurs when an agent reaches a relevant page but mis-configures or loses the correct workspace, such as the wrong filters, time window, or jurisdiction. Criterion Mismatch occurs when the agent applies the wrong decision rule or query parameter, producing coherent but non-matching rows. Final Answer Composition, by contrast, accounts for only 10.3% of failures (Li et al., 21 May 2026).
| Failure mode | Share of audited CLI failures |
|---|---|
| Retrieval-Scope Drift | 37.2% |
| Criterion Mismatch | 27.6% |
| Intent Rewriting | 10.3% |
| In-Page Evidence Misreading | 7.7% |
| Retrieval Dependency Errors | 7.1% |
| Final Answer Composition | 10.3% |
These statistics clarify a common misconception: the principal difficulty is not final formatting after the evidence has already been collected. Most failures occur within the site, at the level of configuring and preserving the correct retrieval state. Retrieval-Scope Drift and Criterion Mismatch together account for 1 of failures. The benchmark summary further notes that interfaces requiring multiple interacting controls, such as jurisdiction 2 time window 3 category, are the hardest. This suggests that SGR is fundamentally a problem of stateful control under semantic constraints, rather than a simple extraction or answer-synthesis problem.
The example walkthroughs in the benchmark make this concrete. In the scholarly-archive example based on Europe PMC, the task requires locating specific PDFs, extracting candidate molecules from a forecast table in one year’s article, then filtering tables in the following year’s article for that cohort before recording multiple status fields. In the environmental example based on the USGS Water Quality Portal, the agent must apply HUC codes, set parameter and date filters, switch scopes, and then consolidate extracted rows into a single table. In both cases, the evidence exists, but only after the correct state has been established.
5. Hidden-state-gated retrieval in RAG systems
A distinct use of state gating appears in Skill-RAG, which introduces a failure-aware RAG framework coupling a lightweight hidden-state prober with a prompt-based skill router. Here the relevant state is internal to the LLM rather than external to a website UI. The mechanism gates retrieval at two pipeline stages. In the pre-retrieval stage, hidden states 4 from the LLM running on the initial query 5 are probed; if the prober judges the state “ready,” the model returns its parametric answer. Otherwise the system enters a retrieval loop. At each round 6, it retrieves top-7 documents 8 using the current query 9, generates reasoning 0 and answer 1 conditioned on 2, then applies post-generation gating on hidden states 3 from the last 4 layers. If the state is not “ready,” a skill router selects one of four retrieval skills—query rewriting, question decomposition, evidence focusing, or exit—and reformulates the next query as 5 (Wei et al., 17 Apr 2026).
The hidden-state prober is defined as a binary classifier 6 that signals “failure” when further retrieval is needed:
7
In practice, the system probes 8 layers and averages:
9
When 0, the routing input 1 is mapped to a skill distribution over 2:
3
with inference using 4.
The reported gains are concentrated on hard cases persisting after multi-turn retrieval, especially on out-of-distribution datasets. On MuSiQue, ACC improves from 13.9% for Probing-RAG to 20.0% for Skill-RAG; on 2WikiMultiHop, ACC improves from 38.9% to 52.5%; and average ACC rises from 42.4% to 46.8%. Representation-space analysis via t-SNE further identifies two clusters among examples still wrong after three standard retrieval rounds: Cluster 0 (“alignment-fixable”) and Cluster 1 (“irreducible”). Applying the four skills contracts Cluster 0 toward the decision boundary, while Cluster 1 remains. By contrast, an over-diversified skill set with more than six skills dissolves the two clusters into a single blob. This supports the view that failure states are typed rather than monolithic.
6. State-grounded dynamic retrieval for web agents
Another related but distinct line is State-Grounded Dynamic Retrieval (SGDR), introduced for online skill learning in web agents. SGDR does not retrieve evidence from websites in the SGR-Bench sense, and it does not gate retrieval using internal hidden-state failure probes as in Skill-RAG. Instead, it retrieves reusable skills step by step, conditioned jointly on the task goal and the current webpage state. The setting assumes a stream of natural-language tasks 5, with each task producing a trajectory
6
where 7 is the webpage observation and 8 a primitive action. A skill library 9 is updated after task completion by inducing 0 and setting
1
SGDR extracts intermediate-granularity skills from successful trajectories using sliding windows over window lengths 2, induces a text–code pair 3 for reusable segments, verifies the induced skill by replacing the original actions and re-running the trajectory through an evaluator, and stores only verified skills (Li et al., 3 Jun 2026).
Retrieval is state-grounded at each decision step. The raw DOM tree 4 is summarized into a short text 5, and each skill is scored by a joint task-state relevance function
6
with default 7. The top-8 skills are retained, then reranked by Maximal Marginal Relevance:
9
where 0 balances relevance and diversity. The selected set 1 is injected into the next-action prompt, and the agent may choose either a primitive browser action or a high-level skill call.
On WebArena across five domains, SGDR achieves average success rates of 37.5% with GPT-4.1 and 24.3% with Qwen3-4B, corresponding to relative gains of 10.6% and 10.0% over the strongest baseline, respectively. The detailed results report GPT-4.1 overall SR of 37.5% for SGDR versus 33.9% for CER, 33.0% for ASI, 27.8% for AWM, and 28.3% for Vanilla; and Qwen3-4B overall SR of 24.3% versus 22.1%, 20.8%, 15.7%, and 16.5%. SGDR also reduces average steps per task, with GPT-4.1 at 4.8 versus 6.4 for CER and Qwen3-4B at 5.6 versus 6.5. Ablations indicate that combining task and state outperforms task-only or state-only retrieval, that MMR reranking with 2 improves over relevance-only retrieval, and that sliding windows outperform full-trajectory or single-action extraction. A plausible implication is that state-conditioned retrieval has become a general architectural principle extending beyond evidence fetching to skill reuse.
7. Significance, boundaries, and research directions
Across these works, “state” refers to different control variables: a website’s site-specific retrieval state in SGR-Bench, a model’s hidden failure state in Skill-RAG, and a web agent’s current DOM-grounded execution state in SGDR. What they share is the claim that retrieval quality depends on conditioning on the right state representation at the right time. In SGR-Bench, this means discovering and preserving filters, scopes, and view settings so that answer-bearing evidence becomes visible; in Skill-RAG, it means deciding whether retrieval or reformulation is needed based on hidden-state probing; in SGDR, it means retrieving skills that match both goal and current webpage context (Li et al., 21 May 2026).
The SGR-Bench analysis is especially explicit about future system requirements. The benchmark summary identifies better joint modeling of “where I am on the site” and “what filter is active,” training signals that couple filter selections with expected page content, evaluation protocols that verify state consistency across extraction steps rather than only final plausibility, and environment models of site UIs so that agents can plan multi-step filter sequences. These directions delimit the concept’s boundaries as well. State-gated retrieval is not reducible to better search ranking, better scraping, or better final answer formatting. It concerns the controlled exposure of evidence under stateful interaction, and the empirical results indicate that this control problem remains unresolved even for strong contemporary agentic systems.