Support workflow

Grounded answer from your docs

Checks whether your pasted docs can answer a question, answers by quoting the passages it used, then removes any claim it can't point to. Says plainly when the docs don't cover it.

RouterEvaluator–optimizerRuns in Claude Code, Codex, ChatGPT, Claude.ai

Running it here

Every step runs here with Claude when you're signed in, and in your own agent.

  1. TriggerQuestion and docsStart with {{question}} and {{docs}}.→ manual
  2. RouterCan the docs answer it?Read {{question}} and {{docs}}. Decide whether the docs fully answer the question, answer part of it, or don't cover it. Judge only from the docs, not from what you know.
    • AnsweredAnswer {{question}} from {{docs}} only. After each sentence, cite the passage it relies on as [Title: "exact quote"]. Under 150 words. End with the one next step the reader should take.
    • PartlyAnswer the part of {{question}} that {{docs}} covers, citing each sentence as [Title: "exact quote"]. Then say exactly what the docs don't cover and who could answer it.
    • Not coveredSay in one sentence that the docs provided don't answer {{question}}. List the two closest passages with their titles, and suggest what document would answer it. Don't answer from general knowledge.
  3. Review loopCheck every claimCheck {{answer}} against {{docs}}. Pass only if every sentence that states a fact has a citation, every quoted passage appears word for word in the docs, no sentence says more than its quote supports, and nothing comes from outside the docs. Remove or soften any claim that fails rather than finding a new source.
  4. OutputReturn the answerReturn {{answer}} with its citations.→ chat

Good for

Support and internal-help teams who want answers that quote their own documentation, and that say so when the docs don't cover a question.

Last reviewed

Install as a skill

The whole workflow as one SKILL.md. Install it in Claude Code, Codex or Copilot and ask your agent to run “Grounded answer from your docs”.

Get the grounded-answer-from-your-docs skill

What each step does

  1. 1. Question and docs (Trigger)

    Start with {{question}} and {{docs}}.

  2. 2. Can the docs answer it? (Router)

    Read {{question}} and {{docs}}. Decide whether the docs fully answer the question, answer part of it, or don't cover it. Judge only from the docs, not from what you know.

    • Answered: Answer {{question}} from {{docs}} only. After each sentence, cite the passage it relies on as [Title: "exact quote"]. Under 150 words. End with the one next step the reader should take.
    • Partly: Answer the part of {{question}} that {{docs}} covers, citing each sentence as [Title: "exact quote"]. Then say exactly what the docs don't cover and who could answer it.
    • Not covered: Say in one sentence that the docs provided don't answer {{question}}. List the two closest passages with their titles, and suggest what document would answer it. Don't answer from general knowledge.
  3. 3. Check every claim (Review loop)

    Check {{answer}} against {{docs}}. Pass only if every sentence that states a fact has a citation, every quoted passage appears word for word in the docs, no sentence says more than its quote supports, and nothing comes from outside the docs. Remove or soften any claim that fails rather than finding a new source.

  4. 4. Return the answer (Output)

    Return {{answer}} with its citations.

Use it in your own agent

Fill in the inputs

Paste the relevant help articles or policy text, each with its title or URL.

Open in ClaudeOpen in ChatGPT2 inputs use their example until you fill them in.

Save as .claude/skills/grounded-answer-from-your-docs/SKILL.md for Claude Code, or .agents/skills/grounded-answer-from-your-docs/SKILL.md for Codex and other Agent Skills tools. Then ask: “run the Grounded answer from your docs workflow”.

SKILL.md
---
name: grounded-answer-from-your-docs
description: Checks whether your pasted docs can answer a question, answers by quoting the passages it used, then removes any claim it can't point to. Says plainly when the docs don't cover it. Use when asked to run the "Grounded answer from your docs" workflow.
---

# Grounded answer from your docs

Checks whether your pasted docs can answer a question, answers by quoting the passages it used, then removes any claim it can't point to. Says plainly when the docs don't cover it.

## Inputs

Ask for any of these that the user hasn't given:

- `question` (e.g. "Can I move my annual plan to monthly before it renews?")
- `docs` (e.g. "# Billing FAQ (docs.acme.test/billing)
Annual plans can be changed to monthly at renewal. Changes take effect at the next renewal date. Refunds for unused months are not available.
# Plans (docs.acme.test/plans)
Monthly plans can be cancelled at any time.")

## Steps

Run the steps in order. Refer to saved results by name. Don't skip a step that says STOP.

1. **Question and docs** — Start: Start with {{question}} and {{docs}}.
2. **Can the docs answer it?** — Read {{question}} and {{docs}}. Decide whether the docs fully answer the question, answer part of it, or don't cover it. Judge only from the docs, not from what you know. Pick one route: Save the result as `answer`.
   - **Answered**: Answer {{question}} from {{docs}} only. After each sentence, cite the passage it relies on as [Title: "exact quote"]. Under 150 words. End with the one next step the reader should take.
   - **Partly**: Answer the part of {{question}} that {{docs}} covers, citing each sentence as [Title: "exact quote"]. Then say exactly what the docs don't cover and who could answer it.
   - **Not covered**: Say in one sentence that the docs provided don't answer {{question}}. List the two closest passages with their titles, and suggest what document would answer it. Don't answer from general knowledge.
3. **Check every claim** — Review loop (max 3 passes): Check {{answer}} against {{docs}}. Pass only if every sentence that states a fact has a citation, every quoted passage appears word for word in the docs, no sentence says more than its quote supports, and nothing comes from outside the docs. Remove or soften any claim that fails rather than finding a new source. Save the result as `answer`.
4. **Return the answer** — Finish: Return {{answer}} with its citations.

## Done when

Every step has run, each approval was given, and you've reported what was produced and where it was saved.

Want different steps? Open it in the workflow builder.