Improve LLM search agents by optimizing query quality at each step using process-level rewards. Framework teaches agents to iteratively refine search queries through imitation, alignment, and generalization stages. Agents learn to identify low-quality queries and regenerate improved ones, significantly improving search efficiency and answer quality on knowledge-intensive reasoning tasks.
Scanned 9/9/2026
Install to Claude Code
npx -y skills add ADu2021/skillXiv --skill smart-search-query-refinement --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Smart Search Query Refinement?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/adu2021-smart-search-query-refinement)More formats (shields.io, HTML) on the badges page.
---
name: smart-search-query-refinement
title: "SmartSearch: Process Reward-Guided Query Refinement for Search Agents"
version: 0.0.2
engine: skillxiv-v0.0.2-claude-opus-4.6
license: MIT
url: "https://arxiv.org/abs/2601.04888"
keywords: [search-agents, query-optimization, reinforcement-learning, process-rewards, knowledge-intensive-tasks]
description: "Improve LLM search agents by optimizing query quality at each step using process-level rewards. Framework teaches agents to iteratively refine search queries through imitation, alignment, and generalization stages. Agents learn to identify low-quality queries and regenerate improved ones, significantly improving search efficiency and answer quality on knowledge-intensive reasoning tasks."
---
## Problem
Search agents frequently generate inaccurate or imprecise search queries, leading to:
1. **Poor Retrieval Results**: Queries that fail to capture task intent retrieve irrelevant documents
2. **Inefficient Search**: Agents waste tokens on multiple search iterations due to query misalignment
3. **Cascading Errors**: Low-quality queries compound through multi-hop reasoning tasks, degrading final answer quality
Current search agents focus on reasoning paradigms (chain-of-thought, self-reflection) rather than optimizing the quality of individual search queries—the actual tool at the core of retrieval.
## Solution
**SmartSearch** introduces **Process Reward-Guided Query Refinement**:
1. **Dual-Level Credit Assessment**: Evaluate search query quality with fine-grained supervision, distinguishing between queries that retrieve relevant documents vs. those that miss key information
2. **Iterative Query Refinement**: Identify low-quality queries during generation and regenerate improved versions before executing search
3. **Curriculum Learning Pipeline**: Train agents through three stages:
- **Imitation**: Learn from high-quality query examples
- **Alignment**: Optimize query generation using process rewards
- **Generalization**: Generate improved queries independently without explicit guidance
## When to Use
- Building search agents for knowledge-intensive QA (research, fact-checking, multi-hop reasoning)
- Improving efficiency of retrieval-augmented generation (RAG) systems with token constraints
- Training agents that must formulate multiple search queries in sequence
- Scenarios where search precision directly impacts downstream reasoning quality
- Multi-turn conversation tasks requiring dynamic information retrieval
## When NOT to Use
- For single-query lookup tasks (use static retrieval ranking instead)
- When queries can be directly provided by users (no generation needed)
- In low-resource settings where process reward training is computationally prohibitive
- For retrieval tasks where keyword matching is sufficient
## Core Concepts
The framework operates on the principle that **query quality is learnable**:
1. **Process Reward Signal**: Instead of only rewarding final answer correctness, reward intermediate steps where good queries lead to useful retrieval results
2. **Credit Assignment**: Distinguish which search query in a sequence was responsible for success/failure using fine-grained scoring
3. **Selective Regeneration**: Only regenerate queries scoring below a confidence threshold, reducing computational waste
## Key Implementation Pattern
The training pipeline follows curriculum stages:
```python
# Conceptual: process reward-guided query refinement
def train_query_agent(queries_with_rewards):
# Stage 1: Imitation
agent.learn_from_examples(high_quality_queries)
# Stage 2: Alignment
for epoch in training:
query = agent.generate_query(task)
reward = process_reward_model(query, retrieved_docs)
if reward < threshold:
query = agent.regenerate_query(task)
agent.optimize(reward_signal)
# Stage 3: Generalization
# Agent independently improves queries without constant guidance
```
Key mechanisms:
- Process reward model trained to score query-document relevance at generation time
- Confidence gating to avoid unnecessary regeneration
- Credit assignment linking query quality to retrieval success
## Expected Outcomes
- **Search Efficiency**: 20-40% reduction in search iterations while maintaining answer accuracy
- **Query Quality**: Significant improvement in precision of generated search queries
- **Scalability**: Framework improves with model scale; larger LLMs benefit more from process rewards
- **Generalization**: Training on one domain transfers to new domains with minimal additional tuning
## Limitations and Considerations
- Process reward model requires labeled data of query-document relevance
- Computational cost of training with process rewards (requires running retriever in loop)
- Framework assumes access to reliable document retrieval (garbage in = garbage out)
- Performance depends on quality of reward signals; weak reward models degrade training
## Integration Example
For a multi-hop QA agent:
1. Generate initial query from task description
2. Score query with process reward model
3. If confidence low, regenerate and rescore
4. Execute search with final query
5. Use results for next reasoning step
This ensures each search step is well-optimized before consuming retrieval resources.
## Related Work Context
SmartSearch advances search-augmented LLMs by moving optimization from reasoning architecture (better prompts, tree search) to the core retrieval unit (query generation). This direct optimization of the agent's primary tool interaction is more efficient than architectural improvements.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!