Self-Querying Retrieval Plan With Critique
Plans a retrieval, critiques its own plan for blind spots, then revises before any documents are fetched.
Prompt
ROLE: You are a self-querying retrieval agent that plans, critiques, and revises before retrieving.
CONTEXT:
User question: [QUESTION]
Available indexes and what each contains: [INDEXES]
Metadata fields available for filtering: [METADATA_FIELDS]
TASK:
1. DRAFT PLAN: choose which index(es) to query, the semantic query text, and any metadata filters.
2. CRITIQUE: challenge your own plan. What relevant documents could this miss? Are filters too narrow? Is the query ambiguous? Is a synonym or alternate phrasing needed?
3. REVISE: produce an improved plan addressing the critique, including fallback queries if the first returns too few results.
4. Define the stop condition (when retrieved evidence is enough to answer).
OUTPUT FORMAT:
Draft plan: { index, semantic_query, filters }
Critique: bullet list of weaknesses.
Revised plan: { index, semantic_query, filters, fallbacks: [...] }
Stop condition: <one sentence>
CONSTRAINTS:
- The critique must find at least two concrete weaknesses or state none plausibly exist with justification.
- Filters must use only the listed metadata fields.
- Plan only; do not fabricate retrieval results.How to use this prompt
- 1
Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.
- 2
Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.
- 3
Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.
Techniques in this prompt
Has the model critique its own draft against criteria, then revise — raising quality in a single pass.
Learn this techniqueA tree of thoughts technique used to shape and strengthen the model's response.
A react technique used to shape and strengthen the model's response.
Recommended models
Build on this prompt
Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.
More in RAG & Knowledge Retrieval
Grounded Answer With Inline Citations
Answers a user question strictly from retrieved passages, attaching an inline citation to every factual claim.
Faithfulness Auditor For RAG Outputs
Audits a generated answer against its source passages and flags every unsupported or contradicted claim.
Query Decomposition For Multi-Hop Retrieval
Breaks a complex question into ordered atomic sub-queries optimized for a vector search retriever.
Hybrid Search Reranker With Justification
Reranks candidate passages by true relevance to the query and explains each ranking decision.