iterative-retrieval

Refine codebase context retrieval through iterative query evaluation loops.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/thanhquan3010/hospital-service-management-system --skill iterative-retrieval-thanhquan3010
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/thanhquan3010/hospital-service-management-system/tree/main/.agent/skills/iterative-retrieval
Command: npx skills add https://github.com/thanhquan3010/hospital-service-management-system --skill iterative-retrieval-thanhquan3010

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of providing subagents with the precise codebase context they need, especially when that context is unknown upfront, preventing "context too large" or "missing context" errors.

Core Features & Use Cases

  • Progressive Context Refinement: Iteratively narrows down relevant files and code snippets through a multi-phase loop.
  • Dynamic Query Building: Adapts search queries based on evaluated relevance and identified information gaps.
  • Use Case: When debugging a complex authentication flow, this Skill can intelligently discover and retrieve only the most relevant files related to tokens, sessions, and user management, avoiding the need to load the entire codebase.

Quick Start

Use the iterative-retrieval skill to find files related to user authentication and session management.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I retrieve relevant codebase context for subagents without loading the entire project?

Iterative context retrieval solves this by dispatching broad queries, evaluating relevance, and refining search criteria in a loop to gather only the necessary files for subagents. This prevents missing context or context overload errors.

What is the best way to find specific files for debugging a complex multi-agent workflow?

Progressive context refinement dynamically narrows down relevant code snippets through a multi-phase loop. It adapts search queries based on evaluated relevance and identified information gaps up to three times to ensure sufficient context.

How does iterative context retrieval handle missing information during codebase exploration?

It evaluates retrieved content for relevance and identifies information gaps, then dynamically builds and refines search queries. This loop repeats up to three times to ensure subagents receive the precise codebase context required.

Can I use this approach to prevent context too large errors in multi-agent systems?

Yes, this pattern prevents context too large errors by iteratively narrowing down relevant files and code snippets. It dispatches broad queries and refines search criteria to gather only the exact context needed for the task.

When do I need progressive context refinement for RAG tasks?

You need progressive context refinement when the exact codebase context required by a subagent is unknown upfront. It dynamically adapts search queries to retrieve precise files without overwhelming the multi-agent workflow with irrelevant data.