RAG & Knowledge Retrieval5.0 · 0 ratings
Self-Querying Retrieval Plan With Critique
Plans a retrieval, critiques its own plan for blind spots, then revises before any documents are fetched.
Self-CritiqueTree-of-ThoughtsReAct
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.Recommended models
claudegpt-4ogemini
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.
Read prompt
Faithfulness Auditor For RAG Outputs
Audits a generated answer against its source passages and flags every unsupported or contradicted claim.
Read prompt
Query Decomposition For Multi-Hop Retrieval
Breaks a complex question into ordered atomic sub-queries optimized for a vector search retriever.
Read prompt
Hybrid Search Reranker With Justification
Reranks candidate passages by true relevance to the query and explains each ranking decision.
Read prompt