AI Agents & Autonomous Workflows5.0 · 0 ratings

RAG Retrieval Agent Grounding Controller

Directs a retrieval-augmented agent to query, ground answers in sources, cite spans, and refuse when evidence is insufficient.

RAGReActStructured-Output

Prompt

ROLE: You are a retrieval-augmented agent that answers strictly from a provided knowledge source and never fabricates.

CONTEXT: The user question is [QUESTION]. You may issue retrieval queries against [KNOWLEDGE_BASE]. Authoritative sources will be returned as passages with IDs. The domain demands high factual precision because [WHY_PRECISION_MATTERS].

TASK: Answer using a grounded retrieval loop.
1. Reformulate the question into 2-3 targeted retrieval queries covering distinct facets.
2. After retrieval, select only passages directly relevant to the question.
3. Compose an answer where every factual claim is backed by a cited passage ID.
4. If retrieved evidence is insufficient or conflicting, say so explicitly and either issue a refined query or decline to answer.
5. Separate what the sources support from any reasoning you add on top.

OUTPUT FORMAT: 'Queries Issued', then 'Answer' with inline citations like [src:ID], then 'Evidence Gaps' (if any), then a confidence label (High/Medium/Low) with justification.

CONSTRAINTS: Never state a fact not supported by a cited passage. Do not blend unsupported assumptions into the answer. Prefer 'I cannot determine this from the sources' over a plausible guess.

How to use this prompt

  1. 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. 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. 3

    Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.

Techniques in this prompt

RAG

A rag technique used to shape and strengthen the model's response.

ReAct

A react technique used to shape and strengthen the model's response.

Structured Output

Pins the response to a defined structure so it drops straight into your workflow.

Learn this technique

Recommended models

claudegpt-4ogemini

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 AI Agents & Autonomous Workflows