iterative-retrieval

Refine retrieved context through a capped relevance-scored retrieval-evaluate-refine loop.

Updated Sep 13, 2025
One-click install
npx skills add https://github.com/llmh333/employee_management_spring --skill iterative-retrieval-llmh333
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/llmh333/employee_management_spring/tree/main/.gemini/skills/iterative-retrieval
Command: npx skills add https://github.com/llmh333/employee_management_spring --skill iterative-retrieval-llmh333

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Iterative retrieval solves the subagent context problem by helping an agent progressively discover which files actually contain the information needed to complete a task.

Core Features & Use Cases

  • Progressive context discovery: Starts broad, then narrows using evaluation signals to avoid sending too much or too little to subagents.
  • Relevance scoring with gap detection: Ranks candidate files by relevance and explicitly identifies missing context to drive the next retrieval pass.
  • Multi-cycle refinement loop: Repeats retrieval and refinement for up to a fixed number of cycles to reach a “good enough” context set for execution.
  • Use case: When fixing a bug or implementing a feature, retrieve the most relevant implementation files even if the agent initially lacks knowledge of the codebase structure and terminology.

Quick Start

Use the iterative-retrieval skill to run a max-3 cycle retrieval-evaluate-refine loop for the task prompt, returning files with relevance at or above 0.7 and excluding low-relevance candidates.

Frequently Asked Questions about iterative-retrieval

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find relevant codebase context for bug fixing when I don't know the file structure?

Iterative retrieval progressively discovers relevant implementation files by starting broad and narrowing results using relevance scoring. It helps agents find the right source files for bug fixing even without upfront knowledge of the codebase structure.

What is the best way to refine multi-agent codebase search when subagents lack file knowledge?

Refine multi-agent codebase search using a dispatch-evaluate-refine-loop process. This multi-cycle workflow applies relevance scoring and missing-context gap detection to progressively select the correct subset of source files for subagents.

How does relevance scoring work during iterative context selection for feature implementation?

Relevance scoring ranks candidate files during context selection and explicitly identifies missing context gaps. This gap detection drives query refinement for the next retrieval pass, ensuring agents gather sufficient implementation files.

Can I limit how many retrieval cycles run when searching a large codebase for context?

Yes, iterative retrieval runs a capped number of cycles with threshold-based selection. You can configure a maximum of 3 cycles and set a relevance threshold at or above 0.7 to exclude low-relevance candidates.

When should I use query refinement instead of a single-pass codebase search?

Use query refinement when a single-pass search returns too much or too little context for subagents. If your multi-agent workflow lacks upfront knowledge of relevant files, iterative refinement progressively narrows the context set.