Coding Vendor library

Sample prompt: investigate before answering

Reducing hallucinations about code not yet read

For
Claude
Source
Anthropic prompt engineering guide
Checked
Oct 2, 2026

The prompt

Copied verbatim from the vendor library
Never speculate about code you have not opened. If the user references a specific file,
you MUST read the file before answering. Make sure to investigate and read relevant
files BEFORE answering questions about the codebase. Never make any claims about code
before investigating unless you are certain of the correct answer - give grounded and
hallucination-free answers.
How to use this prompt: fill the variables, run it in Claude, check the resultYOU FILL INReady to runPaste the prompt as isNo variables to replaceTHE PROMPTClaude58 words · 5 linessource: vendor libraryYOU GETThe resultReducing hallucinations about cod…check the result against the tipscopy, paste, run in Claudefill → run → check · prompts are copied word for word from their source
How to use this prompt: what to fill in, where to run it, what comes back

Where to run it

More coding prompts

More prompts to try