The core problem
Claude's default posture is helpfulness. When the knowledge base doesn't contain the answer, Claude will try to be helpful anyway — filling gaps with general knowledge or plausible-sounding reasoning. This is the root cause of most hallucination in grounded skills. The fix is to invert the default: make "I don't know" the preferred answer when evidence is absent.
The three essential guardrails
These come directly from Anthropic's hallucination-reduction guidance and are ordered by impact.
1. Restrict to the knowledge base only
The single most important instruction. State it early, prominently, and in plain terms.
## Answering rules
- Answer ONLY using content from the knowledge base provided in `/mnt/ka/kb/`.
- Do not use general knowledge, training data, or reasoning beyond what the sources state.
- Do not speculate, infer, or extrapolate beyond what is explicitly written.
Anthropic's docs call this "external knowledge restriction" and list it as an advanced technique, but for a grounded skill it should be the first thing Claude reads.
2. Give Claude an out
Explicitly permit — and prefer — declining to answer.
- If the knowledge base does not contain the answer, respond:
"I don't have information on this in the knowledge base."
- This is the CORRECT response when information is missing.
Saying "I don't know" is always better than guessing.
Without this, Claude's helpfulness bias will override the restriction above.
3. Ground in the source, not in memory
Tell Claude to look at the actual documents rather than relying on whatever it might "remember" from training.
- Before answering, locate the relevant section(s) in the knowledge base.
- Base your answer on what those sections actually say.
- If you cannot find a relevant section, that means the answer is not available.
This is Anthropic's "direct quotes for factual grounding" technique, softened — you're not requiring verbatim quotes in the output, but you are requiring Claude to find the information in the source before answering.
Structural reinforcements from the Skills best-practices guide
Keep degrees of freedom low
Anthropic's skill-authoring guide describes three levels of freedom. For grounding-critical skills, keep it low: tell Claude exactly what to do, not "analyze and summarize."
## Workflow
1. Read the user's question.
2. Search the knowledge base for relevant content:
`grep -rn -i "<keyword>" /mnt/ka/kb/`
3. If relevant content is found, write the answer based on it.
4. If no relevant content is found, respond with the "not in knowledge base" message.
The grep step is optional but powerful — it forces Claude to mechanically locate information before composing an answer, rather than going from memory.
Use a self-check step
A lightweight version of Anthropic's "verify with citations" technique — without requiring formal citations.
## Before returning the answer
Re-read your answer. For each factual claim, ask:
- Can I point to where this comes from in the knowledge base?
- If not, remove the claim or flag it as uncertain.
Organize the knowledge base for discovery
From the skill best-practices page:
- Keep reference files one level deep from
SKILL.md(no nested chains of references). - Add a table of contents at the top of any reference file longer than ~100 lines.
- Name files descriptively:
product-pricing.md, notdoc2.md. - Use consistent terminology throughout — if you call it "deal" in one file, don't call it "opportunity" in another.
A minimal SKILL.md skeleton
---
name: grounded-kb-assistant
description: Answers questions using only the knowledge base in /mnt/ka/kb/. Never uses outside knowledge. Use when the user asks any question about [your domain].
---
# Grounded KB Assistant
## Rules
1. Answer ONLY from the files in `/mnt/ka/kb/`.
2. Do NOT use general knowledge, training data, or speculation.
3. If the answer is not in the knowledge base, say so clearly.
4. Saying "I don't know" is always preferred over guessing.
## How to answer
1. Identify the user's question.
2. Search `/mnt/ka/kb/` for relevant content.
3. If found: answer based on what the source says.
4. If not found: respond "I don't have information on this in the knowledge base."
## Self-check
Before returning, re-read your answer and confirm every claim
comes from something you found in `/mnt/ka/kb/`.
Remove anything you cannot trace back to a source.
Testing — three scenarios minimum
Anthropic recommends building evals before writing extensive docs. For a grounded skill, the minimum set is:
| Scenario | Expected behavior |
|---|---|
| Answer IS in the knowledge base | Claude answers correctly, drawing from the right source. |
| Answer is NOT in the knowledge base | Claude says "I don't have information on this" — does not guess. |
| Near-miss distractor content in the KB | Claude does not get fooled by similar-sounding but wrong content. |
The distractor case is critical — Anthropic's prompt-engineering tutorial shows that without grounding instructions, Claude falls for plausibly-worded near-misses.